-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 many JS vulns, fix tests #1775
Fix many JS vulns, fix tests #1775
Conversation
@@ -227,7 +227,7 @@ function remeasure() { | |||
|
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.
NOTE: all application code changes are as a result of yarn run lint --fix
and not manually performed
Need this library to be updated so I can close JS vulns that are blocking our build pipeline |
Not necessary. Maintainer is busy but responsive |
Includes updating and installing missing/wrong peer deps
2.x broke tests so left a 1.x
0c4533c
to
8c6cb1b
Compare
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.2", |
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.
Could you briefly explain why all those newly added libs are necessary? I can see that @babel/plugin-syntax-flow
, @babel/plugin-transform-react-jsx
etc. were added. If there is a good reason behind it, I think it is probably ready to be merged then.
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.
Sure, good question.
After updating the eslint
related packages that already exist, yarn
shows warnings about peer deps:
warning " > [email protected]" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning " > [email protected]" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0".
So to resolve these warnings I've installed the peer deps as well using yarn add -D
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.
Ok, the last thing that I am afraid of is updating the css-select
and css-tree
deps since it will directly affect the users of the library. Is it fixing any vulnerabilities? If not, maybe it should be added in some other PR in order not to mix things for lib developers with those of lib users. Wdyt?
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.
Updating css-select
is important to close vulnerability (this is the original reason I need to make this PR)
The dep tree is:
react-native-svg>css-select>nth-check
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.
css-tree
we could undo, but I was thinking if tests pass why not update it while I'm doing all this other work
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.
@WoLewicki please let me know your final decision 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.
Sorry for the delay, I think we can do it here, so it is ready to be merged 🎉 Thanks for your contribution!
Summary
Upgrades a ton of dependencies, closes JS vulns, gets lint & test working as intended. Only barely touches application code, due to TypeScript version upgrade and prettier upgrade.
Also makes
yarn run test
work again, by ignoringExample
folders which aren't working right now.Test Plan
I ensured that
tsc
,lint
andtest
pass