Skip to content

ci(release): configure oclif update targets in package.json, drop --targets for deb#3717

Closed
shumkov wants to merge 2 commits into
v3.1-devfrom
ci/fix-dashmate-pack-node24-targets
Closed

ci(release): configure oclif update targets in package.json, drop --targets for deb#3717
shumkov wants to merge 2 commits into
v3.1-devfrom
ci/fix-dashmate-pack-node24-targets

Conversation

@shumkov

@shumkov shumkov commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move the dashmate pack target list from script flags to oclif.update.node.targets in packages/dashmate/package.json.
  • Revert scripts/pack_dashmate.sh to only set --targets for the tarballs subcommand.

Background

#3709 tried to restrict dashmate pack targets by passing --targets=linux-x64,linux-arm64 to oclif pack deb. That fixed tarballs and win, but deb still failed on v3.1.0-dev.4:

Error: Nonexistent flag: --targets=linux-x64,linux-arm64
Process completed with exit code 2

In oclif 4.0.3, --targets is accepted by pack tarballs and pack win but not pack deb. Inconsistent CLI surface.

The portable way to restrict targets across all pack subcommands is the oclif.update.node.targets field in package.json. Each subcommand filters that list to its own platform prefix (linux-* for deb, win32-* for win, darwin-* for macos). pack tarballs builds for every configured target, which is why it still needs a --targets override to stay linux-only.

Test plan

  • CI green on this PR.
  • Next release run shows all four Release Dashmate packages jobs ✓.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced multi-platform support for node updates across Windows, macOS, and Linux.
    • Improved release build process to support both x64 and ARM64 architectures on all platforms.

Review Change Stack

shumkov and others added 2 commits May 21, 2026 02:02
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>
@shumkov
shumkov requested a review from QuantumExplorer as a code owner May 21, 2026 04:17
@github-actions github-actions Bot added this to the v3.1.0 milestone May 21, 2026
@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa98f060-c3ee-4f3c-8a52-0f13571ba378

📥 Commits

Reviewing files that changed from the base of the PR and between ac90e10 and 7aecc74.

📒 Files selected for processing (2)
  • packages/dashmate/package.json
  • scripts/pack_dashmate.sh

📝 Walkthrough

Walkthrough

This PR configures official Node update platforms for the dashmate oclif CLI by adding an oclif.update.node.targets section in package.json, and updates the pack script to align Linux tarball builds with the newly defined platform matrix, changing linux-arm to the correct linux-arm64.

Changes

Build platform targets configuration

Layer / File(s) Summary
Node update targets and Linux build alignment
packages/dashmate/package.json, scripts/pack_dashmate.sh
oclif.update.node.targets configuration specifies five supported platforms (linux-x64, linux-arm64, win32-x64, darwin-x64, darwin-arm64). pack_dashmate.sh tarballs command targets are updated from linux-arm,linux-x64 to linux-arm64,linux-x64 with documentation explaining that oclif pack tarballs is limited to Linux while deb/win/macos packaging relies on oclif.update.node.targets filtering.

Possibly related PRs

  • dashpay/platform#3713: Both PRs modify packages/dashmate/package.json to set oclif.update.node.targets and adjust scripts/pack_dashmate.sh tarballs and target handling to align Linux outputs with those oclif-configured targets.
  • dashpay/platform#3709: Both PRs change scripts/pack_dashmate.sh to restrict oclif pack release packaging targets to Node 24-compatible Linux/Windows 64-bit platforms, dropping 32-bit ones.

Suggested reviewers

  • QuantumExplorer

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rabbit hops with glee so bright,
Configuring targets, getting platforms right!
From linux-arm to arm64's embrace,
The dashmate builds find their proper place! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: configuring oclif update targets in package.json and removing --targets flag from deb command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/fix-dashmate-pack-node24-targets
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch ci/fix-dashmate-pack-node24-targets

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shumkov

shumkov commented May 21, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #3713 (54e54d4), which landed essentially the same fix — in packages/dashmate/package.json + drop the bogus --targets on pack deb. Closing as redundant.

@shumkov shumkov closed this May 21, 2026
@shumkov

shumkov commented May 21, 2026

Copy link
Copy Markdown
Collaborator Author

Correction (shell ate the backticks above): the fix is oclif.update.node.targets in packages/dashmate/package.json.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-armlinux-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants