-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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: override uri-js with fast-uri #18762
Conversation
By overriding uri-js with fasturi, the punycode deprecation can be fixed (eslint#17720) without having to upgrade ajv to version 8 (eslint#13888: comment-872591875)
✅ Deploy Preview for docs-eslint canceled.
|
package.json
Outdated
@@ -165,6 +165,11 @@ | |||
"webpack-cli": "^4.5.0", | |||
"yorkie": "^2.0.0" | |||
}, | |||
"overrides": { | |||
"ajv": { | |||
"uri-js": "npm:fast-uri@^2.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct syntax? Do we need "npm:" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the npm is required to tell the package.json that it should retrive a different package
Looks like there are some other dependencies that include punycode, but only show up after overriding this one. I will look into over-riding them over the next week. |
So it looks like the other packages that use punycode use a different version (punycode.js) that still triggers the warning. I would still recommend that this goes through as it reduces the number of dependencies that use punycode and brings the uri dependency in-line with current versions of ajv. |
If this is just to fix one deprecation warning, then I don't think it's very valuable. Deprecations aren't bad and I don't think deprecation hunting in our dependency tree is a good use of time. |
Note that not all package managers support "overrides": {
"eslint":{"ajv": {"uri-js": "npm:fast-uri@^2.3.0"}}
}, |
@nzakas for what it's worth this user noted there may be a security vuln downstream of uri-js
|
@HowieG that use case doesn't happen in ESLint. |
By overriding uri-js with fasturi, the punycode deprecation can be fixed (#17720) without having to upgrade ajv to version 8 (#13888: comment-872591875)
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Tell us about your environment (
npx eslint --env-info
):What parser are you using (place an "X" next to just one item)?
[ ]
Default (Espree)
[X]
@typescript-eslint/parser
[ ]
@babel/eslint-parser
[ ]
vue-eslint-parser
[ ]
@angular-eslint/template-parser
[ ]
Other
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
What actually happened? Please include the actual, raw output from ESLint.
NodeJS repeatedly logs punycode deprecation error
What changes did you make? (Give an overview)
Added an override to replace uri-js (dependency of ajv@6) with fast-uri (version now used by ajv@8)
Is there anything you'd like reviewers to focus on?