fix: add engine-strict = false to npmrc#5771
Conversation
Summary of ChangesHello @ginna-baker, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to fix a dependency installation error by adding engine-strict = false to the .npmrc file. While this change successfully resolves the immediate issue, it does so by globally disabling engine compatibility checks, which is a potential risk. I've provided a review comment suggesting a more targeted and safer alternative using pnpm.packageExtensions to override the engine requirement for only the specific problematic dependency. This alternative approach would solve the problem without compromising the project's overall dependency integrity.
| link-workspace-packages = deep | ||
| hoist = true | ||
| shamefully-hoist = true | ||
| engine-strict = false |
There was a problem hiding this comment.
Disabling engine-strict globally is a risky workaround as it suppresses important compatibility checks for all dependencies, potentially leading to subtle runtime errors.
A safer, more targeted solution is to use pnpm.packageExtensions in package.json to override the engine requirement for the specific problematic package (@typescript-eslint/typescript-estree). This resolves the immediate issue without sacrificing the safety of engine checks for other dependencies.
I recommend removing this change and instead adding a packageExtensions field to the pnpm object in package.json:
// in package.json
"pnpm": {
"onlyBuiltDependencies": [ ... ],
"overrides": { ... },
"packageExtensions": {
"@typescript-eslint/typescript-estree@^7.13.1": {
"engines": {
"node": ">=18.15.0"
}
}
}
}There was a problem hiding this comment.
I like this idea, but it doesn't work. I suspect pnpm enforces engine checks before reading this packageExtensions object
Prevent errors when running
pnpm i. Example error: