-
Notifications
You must be signed in to change notification settings - Fork 21
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
Upgrade to use Node.js 20 and bump npm dependencies #2517
Conversation
Fixed by running `npm run lint:js -- --fix`.
8e1905e
to
fccc0cd
Compare
I still see the deprecations in both this PR and in #2544 |
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.
Howdy @eason9487 I tested all the scripts, code and did several smoke testing:
- Onboarding
- Edit campaigns
- Create rules in attribute mapping
- Campaign assets
Everything is working fine without errors so far.
I just left some comments regarding one CSS and just to be sure dependabot is compatible with the new node version.
@include placeholder; | ||
|
||
display: inline-block; | ||
width: 18em; | ||
|
||
@include placeholder; |
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 change necessary? I wonder if placeholder includes display
or width
props. Then it will be overrided
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 change necessary?
The change fixes a Sass deprecation warning. The explanation can be found in https://sass-lang.com/documentation/breaking-changes/mixed-decls/
I wonder if placeholder includes
display
orwidth
props. Then it will be overrided
They don't have. Please refer to:
google-listings-and-ads/js/src/css/abstracts/_mixins.scss
Lines 9 to 21 in fccc0cd
@mixin placeholder($lighten-percentage: 30%) { | |
animation: loading-fade 1.6s ease-in-out infinite; | |
background-color: $gray-100; | |
color: transparent; | |
&::after { | |
content: "\00a0"; | |
} | |
@media screen and (prefers-reduced-motion: reduce) { | |
animation: none; | |
} | |
} |
@@ -2,6 +2,7 @@ | |||
* External dependencies | |||
*/ | |||
import { useRef } from '@wordpress/element'; | |||
import { Form } from '@woocommerce/components'; |
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.
Wondering if it's worth it to import the component just for the docs.
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.
"node": "^16 || ^18", | ||
"npm": "^8 || ^9" |
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.
So I assume dependabot now supports
"node": "^20", and "npm": "^10"
?
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.
Thanks for catching this!
I thought dependabot would use paired node and npm versions. Surprisingly, it's using unpaired Node.js 20 and npm 9. Even the npm version claimed by its error message is incorrect, bringing more confusion.
Dependabot uses Node.js v20.17.0 and NPM 10.8.2. Due to the engine-strict setting, the update will not succeed.
Fixed in b2a3d13
.eslintrc.js
Outdated
'jest/expect-expect': [ | ||
'warn', | ||
{ assertFunctionNames: [ 'expect', 'expect[A-Z]\\w*' ] }, | ||
], | ||
// Turn it off temporarily because it involves a lot of re-alignment. We can revisit it later. | ||
'jsdoc/check-line-alignment': 'off', | ||
// The JS package `tracking-jsdoc` changes the definition of the `@fires` tag. |
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.
Can you elaborate what do you mean by this?
The JS package tracking-jsdoc
changes the definition of the @fires
tag.
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.
Adjusted the code comment in c76514b. Let me know if it's still not clear enough.
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.
I will just write "Listing our event names to avoid eslint false alarms"
But not a blocker tho.
…t pair with Node.js 20. Address: #2517 (comment)
Hi @puntope, thanks for the review! This PR is ready for a new round of code reviews. |
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.
✅ LGTM
Thanks for the changes and all your work here
Changes proposed in this Pull Request:
Closes #2002
This PR:
react/react-in-jsx-scope
rulejsdoc/check-line-alignment
ruleimport/no-named-as-default
rulenpm run lint:js -- --fix
: c41ef64@wordpress/i18n-text-domain
rule: cdd9aabjsdoc/no-undefined-types
rule: 67ef0e2import/no-unresolved
rule: c4db2a3no-redeclare
rule: 6997b6fjsdoc/require-yields-check
rule: 47d1f9f@typescript-eslint/no-use-before-define
rule: 9886344jsdoc/tag-lines
rule: fccc0cd❗ Since the jest testing requires a lot of adjustments, it will be handled by #2544. Two of the eslint rule errors are highly related to jest and are therefore handled by #2544 as well.
Detailed test instructions:
npm install
to see if it can finish without errorsnpm run build
npm run dev
npm run start
npm run start:hot
npm run lint:css
npm run lint:js
testing-library/no-unnecessary-act
andtesting-library/no-unnecessary-act
rules are handled separately in Migrate jest tests to use Node.js 20 and make components compatible with upgraded packages #2544node ./node_modules/.bin/bundlewatch
to check if the check worksChangelog entry