-
-
Notifications
You must be signed in to change notification settings - Fork 751
Fix JSDoc 4.x peer dependency conflict using .npmrc #5316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JSDoc 4.x peer dependency conflict using .npmrc #5316
Conversation
|
@copilot fix failed typing tests from npm run dtslint |
I've made significant progress on fixing the dtslint tests. The solution generates consolidated What's Working:
Remaining Issues:
Options:
The fundamental challenge is that tsd-jsdoc had custom logic for CodeceptJS's specific patterns that's hard to replicate. Would you like me to continue refining the TypeScript approach, or would you prefer exploring alternative solutions? Commit: 7c51bae |
Co-authored-by: kobenguyent <[email protected]>
|
@copilot find and use the solution which is not much changes to the codebase but still producing expected results. |
Solution implemented with minimal code changes: Created Changes:
This allows tsd-jsdoc 2.5.0 to work with JSDoc 4.0.5 despite the peer dependency mismatch. The tool functions correctly - the peer dependency is just a package.json constraint. Commit: 1719306 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Motivation/Description of the PR
Resolves peer dependency conflict that prevents npm install when using JSDoc 4.x with tsd-jsdoc 2.5.0.
The project upgraded to JSDoc 4.0.5, but tsd-jsdoc 2.5.0 declares a peer dependency of
jsdoc@^3.6.3, causing npm install to fail with ERESOLVE errors. This PR implements a minimal solution using npm's--legacy-peer-depsconfiguration to resolve the conflict while keeping all existing functionality intact.Solution
Created
.npmrcfile withlegacy-peer-deps=trueconfiguration. This tells npm to ignore peer dependency conflicts and install packages anyway, which is the standard npm approach for this scenario.Why This Works
--legacy-peer-depsis npm's officially recommended solution for peer dependency mismatchesChanges Made
.npmrc: Added withlegacy-peer-deps=trueconfigurationTesting Results
Benefits
Applicable helpers:
Applicable plugins:
Type of change
Checklist:
npm run docs)npm run lint)npm test)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.