Skip to content

release: @eddacraft/[email protected] — cargo package pin + option allowlist#6

Merged
joshuaboys merged 8 commits into
mainfrom
release/scoped-npm-package
May 8, 2026
Merged

release: @eddacraft/[email protected] — cargo package pin + option allowlist#6
joshuaboys merged 8 commits into
mainfrom
release/scoped-npm-package

Conversation

@joshuaboys
Copy link
Copy Markdown
Contributor

@joshuaboys joshuaboys commented May 8, 2026

Patch release. 0.1.0 is already published to npm and can't be overwritten, so these consumer-surfaced fixes ship as 0.1.1.

Summary

  • graph.ts — pin the cargo package name on every inferred target via { package: pkg.name }. Fixes cargo -p @scope/name failures when @nx/js claims the project name from a sibling package.json (napi-rs bindings).
  • build-command.ts — drop options outside a per-subcommand allowlist before forwarding to cargo. Fixes Nx-merged CLI args (--run, --coverage from nx run-many -t test in mixed JS+Rust workspaces) leaking into cargo test.
  • Bump package.json to 0.1.1 and add a CHANGELOG entry.
  • Inherits the release-prep tooling already on this branch (scoped-package metadata, prepublishOnly gates, e2e smoke workflow).

Test plan

  • pnpm test — 47/47 green (incl. new specs covering both fixes)
  • pnpm typecheck — clean
  • pnpm build — clean
  • CI smoke green on this PR
  • After merge to main: pnpm publish and verify npm view @eddacraft/[email protected] resolves
  • Re-run Anvil's failing CI jobs (Check/Format and Test/Unit Tests) against @eddacraft/nxrust@^0.1.1

joshuaboys added 7 commits May 8, 2026 13:26
Nx writes analytics: true into the fixture during e2e runs. Commit the
current state so subsequent runs see a clean working tree.
Two consumer-surfaced defects that broke pre-publish validation:

- inferProjectConfig now seeds every cargo-backed target with
  { package: pkg.name }. Without it, the cargo executor fell back to
  context.projectName, and when @nx/js claimed the project name from a
  sibling package.json (napi-rs bindings) cargo received -p @scope/name
  and rejected the invocation.
- buildCargoArgs takes a per-subcommand allowedKeys set unioned with
  the base cargo keys. Anything outside that union is dropped before
  argv is built, so Nx-merged CLI args (e.g. vitest --run/--coverage
  from `nx run-many -t test`) no longer leak into `cargo test`.

Each cargo-wrapping executor declares its own allowlist; fmt and
release-publish use a hand-rolled argv builder and were unaffected.
0.1.0 is already on npm; the cargo-package and option-leak fixes ship
as a patch release. CHANGELOG promotes the Unreleased block to
0.1.1; APS module records R4 complete and R4.1 in progress.
@joshuaboys joshuaboys changed the title release: @eddacraft/[email protected] release: @eddacraft/[email protected] — cargo package pin + option allowlist May 8, 2026
Previously hard-coded `eddacraft-nxrust-0.1.0.tgz`, so the 0.1.1 bump
broke the e2e smoke job (`pnpm pack` produced 0.1.1.tgz, the install
step still asked for 0.1.0.tgz). Derive the name from the package's
own metadata so version bumps don't need a parallel edit here.
@joshuaboys joshuaboys merged commit aa9e3c7 into main May 8, 2026
1 check passed
@joshuaboys joshuaboys deleted the release/scoped-npm-package branch May 12, 2026 07:56
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.

1 participant