chore: remove package-lock.json and update CI to use npm install#2764
Open
ankita10119 wants to merge 4 commits intomasterfrom
Open
chore: remove package-lock.json and update CI to use npm install#2764ankita10119 wants to merge 4 commits intomasterfrom
ankita10119 wants to merge 4 commits intomasterfrom
Conversation
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.
🛠️ Changes
package-lock.jsonfrom version control and adds it to.gitignore.npm installinstead ofnpm ciand removescache: 'npm'fromactions/setup-nodewhich requires a lockfile to function.cheerioto1.0.0-rc.12via npmoverrides.Cheerio Override
Why:
enzyme@3.11.0(test-only dependency) was built against cheerio's rc-series internals. Whenpackage-lock.jsonwas removed, npm resolvedcheerioto1.2.0(stable), which restructured the package entirely, removing internal paths enzyme depends on and addingundicias a new transitive dependency incompatible with the Jest/jsdom test environment.Without it: Jest test suites fail with a cascade of errors ,
Cannot find module 'cheerio/lib/utils',ReferenceError: TextEncoder is not defined,ReferenceError: ReadableStream is not defined, andSyntaxError: Unexpected token 'export'.Justification: The enzyme maintainer committed this exact fix (
cafdb2b) in December 2020 but never cut a release.enzyme@3.11.0remains the latest published version, carrying the unfixed^1.0.0-rc.3range. This override is the community workaround for a known upstream issue that will never be released.Effect on consumers:
overridesis a local package manager instruction and not published to npm, not bundled in build output, ignored entirely by consumers' own installs.