Skip to content

fix: tolerate node_modules path differences in lib/ verification#34

Open
sverdlov93 wants to merge 1 commit intomainfrom
fix/ci-lib-verify-node-modules-paths
Open

fix: tolerate node_modules path differences in lib/ verification#34
sverdlov93 wants to merge 1 commit intomainfrom
fix/ci-lib-verify-node-modules-paths

Conversation

@sverdlov93
Copy link
Copy Markdown
Collaborator

Summary

  • Without a committed package-lock.json, npm may hoist transitive dependencies differently across environments. esbuild embeds these node_modules paths as comments and __commonJS keys in the bundle, causing the byte-for-byte lib/ verification step to fail even when the actual code is functionally identical.
  • Replaced git status --porcelain with git diff -I 'node_modules/', which ignores hunks where every changed line is a node_modules path annotation, while still catching real source drift.
  • Added git ls-files --others check to preserve detection of untracked files in lib/.

Test plan

  • Verify the CI "Verify lib/ is compiled and up to date" step passes on this PR
  • Confirm that a real source change to src/ without rebuilding lib/ still fails the check

Without a lockfile, npm may hoist transitive dependencies differently
across environments. esbuild embeds node_modules paths as comments and
__commonJS keys in the bundle, causing the byte-for-byte lib/ check to
fail even when the actual code is identical.

Use `git diff -I 'node_modules/'` to ignore hunks where every changed
line is a node_modules path annotation, while still catching real
source drift.
@github-actions
Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


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