fix: make local-build e2e independent of the library version - #79
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
examples/local-consumer/package.jsonpinnedaws-cdk-secure-constructstofile:../../aws-cdk-secure-constructs-1.0.0.tgz. The 0.1.0 release (#70) bumped the version, sonpm packnow produces-0.1.0.tgzandnpm run test:local-buildfailed 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
package.json.npm install --no-save(intonode_modulesonly), so the check is version-independent and never mutates the consumer'spackage.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-buildnow 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