Skip to content

fix: make local-build e2e independent of the library version - #79

Merged
alphacrack merged 1 commit into
mainfrom
fix/local-build-e2e-tarball-ref
Aug 7, 2026
Merged

fix: make local-build e2e independent of the library version#79
alphacrack merged 1 commit into
mainfrom
fix/local-build-e2e-tarball-ref

Conversation

@alphacrack

Copy link
Copy Markdown
Owner

Problem

examples/local-consumer/package.json pinned aws-cdk-secure-constructs to file:../../aws-cdk-secure-constructs-1.0.0.tgz. The 0.1.0 release (#70) bumped the version, so npm pack now produces -0.1.0.tgz and npm run test:local-build failed at the consumer install step (ENOENT on the 1.0.0 tarball). CI did not catch this because CI doesn't run the local-build e2e — I found it running the e2e manually while reviewing the open PRs.

Fix

  • Remove the version-pinned dependency from the consumer's committed package.json.
  • Install the freshly packed tarball with npm install --no-save (into node_modules only), so the check is version-independent and never mutates the consumer's package.json.

This also removes a footgun in the earlier approach (rewriting + git checkout-restoring the file would silently discard a developer's uncommitted edits to it).

Verification

npm run test:local-build now succeeds end-to-end (pack → install → cdk synth) and leaves the working tree clean. Ran locally against Node v25.8.1.

Regression from #70.

🤖 Generated with Claude Code

The local-consumer pinned 'file:../../aws-cdk-secure-constructs-1.0.0.tgz'.
The 0.1.0 release (#70) bumped the version, orphaning that path, so
'npm run test:local-build' failed at the consumer install step. CI didn't
catch it because CI doesn't run the local-build e2e.

Remove the version-pinned dependency from the consumer's package.json and
install the freshly packed tarball with 'npm install --no-save' instead.
The check now works across version bumps and never mutates the consumer's
package.json (no git-restore footgun).

Verified: npm run test:local-build succeeds end-to-end (pack -> install ->
cdk synth) and leaves the working tree clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alphacrack
alphacrack merged commit 1eb80ff into main Aug 7, 2026
13 checks passed
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