ci(release): configure oclif update targets in package.json, drop --targets for deb#3717
ci(release): configure oclif update targets in package.json, drop --targets for deb#3717shumkov wants to merge 2 commits into
Conversation
Node 24 stopped publishing 32-bit Linux ARM (armv7l) and 32-bit Windows (win-x86) binaries: https://nodejs.org/dist/v24.14.1/SHASUMS256.txt -> linux: x64, arm64, ppc64le, s390x -> win: x64, arm64 When `oclif pack` tries to bundle a Node runtime for an embedded target, it downloads the matching nodejs.org tarball. Since the composite `Setup Node.JS` action defaulted to Node 24 (commit ec4665b, before v3.1.0-dev.1), every `Release Dashmate packages` matrix run since v3.1.0-dev.1 has 404'd: oclif: downloading node-v24.14.1-linux-armv7l HTTPError: Response code 404 (Not Found) This was masked on v3.1.0-dev.2 because the upstream `release-npm` job failed first and `needs: release-npm` blocked the matrix. With release-npm fixed in #3702, the latent failure resurfaced on v3.1.0-dev.3. Restrict oclif targets to architectures Node 24 still ships: - tarballs: linux-arm -> linux-arm64 - deb: explicit linux-x64,linux-arm64 (drop armv7l) - win: explicit win32-x64 (drop win32-x86) Trade-off: v3.0.1 shipped armv7l tarball, armel deb, and x86 win .exe artifacts. Modern hardware on those platforms is essentially extinct (Raspberry Pi 4+ is 64-bit, current Windows is x64/arm64), and Node 24+ cannot package against them anyway. The alternative — pinning a separate older Node for the pack step — splits Node versions across release stages and adds significant complexity for niche platforms. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…argets for deb The previous attempt passed `--targets=linux-x64,linux-arm64` to `oclif pack deb`, but oclif 4.0.3 rejects that flag for the deb subcommand: Error: Nonexistent flag: --targets=linux-x64,linux-arm64 Process completed with exit code 2 `--targets` is accepted by `pack tarballs` and `pack win` but not `pack deb`. The portable way to restrict targets across all `pack` subcommands is the `oclif.update.node.targets` config in package.json, which each subcommand filters to its own platform prefix. Set it to the four architectures Node 24 still publishes binaries for (linux-x64, linux-arm64, win32-x64, darwin-x64, darwin-arm64), and revert the script back to only setting `--targets` for tarballs (which would otherwise emit tarballs for every configured platform, not just linux). `pack win` and `pack macos` now inherit their targets from the same package.json config, so the script no longer needs per-command flags for them either. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR configures official Node update platforms for the dashmate oclif CLI by adding an ChangesBuild platform targets configuration
Possibly related PRs
Suggested reviewers
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Correction (shell ate the backticks above): the fix is |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Small, well-scoped CI/release fix that moves dashmate's pack target list into oclif.update.node.targets so pack deb (which rejects --targets in oclif 4.0.3) inherits restricted targets, while keeping an explicit --targets override on pack tarballs to avoid emitting non-linux tarballs. Also completes the linux-arm → linux-arm64 cleanup from the prior Node 24 commit. No blocking issues.
💬 1 nitpick(s)
Inline posting hit GitHub HTTP 422, so I'm posting the verified finding in the review body instead.
nitpick: Linux targets duplicated between package.json and pack_dashmate.sh
scripts/pack_dashmate.sh:23-33
The linux subset of oclif.update.node.targets is now expressed in two places: packages/dashmate/package.json (linux-x64, linux-arm64) and scripts/pack_dashmate.sh (--targets=linux-arm64,linux-x64). Adding or removing a linux target in package.json without updating the script will cause pack tarballs to silently drift out of sync with the other pack subcommands. The script's comment already calls this out, so this is a maintainability nit — deriving the list dynamically (e.g., piping the linux-prefixed entries through jq) would remove the foot-gun.
source: ['claude']
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `scripts/pack_dashmate.sh`:
- [NITPICK] lines 23-33: Linux targets duplicated between package.json and pack_dashmate.sh
The linux subset of `oclif.update.node.targets` is now expressed in two places: `packages/dashmate/package.json` (`linux-x64`, `linux-arm64`) and `scripts/pack_dashmate.sh` (`--targets=linux-arm64,linux-x64`). Adding or removing a linux target in package.json without updating the script will cause `pack tarballs` to silently drift out of sync with the other pack subcommands. The script's comment already calls this out, so this is a maintainability nit — deriving the list dynamically (e.g., piping the linux-prefixed entries through `jq`) would remove the foot-gun.
Reviewed commit: 7aecc74
Summary
oclif.update.node.targetsinpackages/dashmate/package.json.scripts/pack_dashmate.shto only set--targetsfor thetarballssubcommand.Background
#3709 tried to restrict dashmate pack targets by passing
--targets=linux-x64,linux-arm64tooclif pack deb. That fixedtarballsandwin, butdebstill failed on v3.1.0-dev.4:In oclif 4.0.3,
--targetsis accepted bypack tarballsandpack winbut notpack deb. Inconsistent CLI surface.The portable way to restrict targets across all
packsubcommands is theoclif.update.node.targetsfield inpackage.json. Each subcommand filters that list to its own platform prefix (linux-*for deb,win32-*for win,darwin-*for macos).pack tarballsbuilds for every configured target, which is why it still needs a--targetsoverride to stay linux-only.Test plan
Release Dashmate packagesjobs ✓.🤖 Generated with Claude Code
Summary by CodeRabbit