-
Notifications
You must be signed in to change notification settings - Fork 198
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
Update npm dependencies (especially @wordpress
)
#7695
base: trunk
Are you sure you want to change the base?
Conversation
427e4f8
to
41fe999
Compare
41fe999
to
710033b
Compare
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
WordPress Dependencies ReportThe
This comment was automatically generated by the |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
3e6bfe9
to
6ca3cf5
Compare
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
@@ -119,6 +118,8 @@ | |||
"react": "17.0.2", | |||
"react-dom": "17.0.2", | |||
"resolve-url-loader": "5.0.0", | |||
"sass": "1.35.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.
The @wordpress/scripts
installs other minor versions (it uses the ^
), and sass introduced a lot of deprecations because its API is changing.
I checked that Gutenberg codebase is still using it in the old way, so I also kept it using the same approach by installing the specific version.
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.
Before checking how Gutenberg was doing it, I tried to fix the deprecations but it's risky to break something and it's a big amount of work. So it's better to wait for Gutenberg decisions before changing it in Sensei. Notice that we also import scss files directly from Gutenberg and Calypso (which use the deprecated @import
).
@@ -63,7 +63,7 @@ const NoticeActions = ( { actions } ) => { | |||
return ( | |||
<div className="sensei-notice__actions"> | |||
{ actions.map( ( action ) => ( | |||
<NoticeAction key={ action.url } action={ action } /> | |||
<NoticeAction key={ action.label } action={ action } /> |
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.
Make sure the key will be always available since url
is not always available.
issuer: styleSheetFiles, | ||
type: 'asset/resource', |
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.
By default @wordpress/scripts
is adding it as type: 'asset/inline',
for style files.
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.
@renatho could you help me out with this? I've managed to break it when updating the packages and can't figure out why the inline SVGs are causing this error:
ERROR in ../node_modules/@automattic/data-stores/node_modules/@automattic/calypso-products/node_modules/@automattic/components/src/icons/protect.tsx 4:1
Module parse failed: Unexpected token (4:1)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| const icon = (
> <SVG width="16" height="20" viewBox="0 0 16 20" fill="none" xmlns="http://www.w3.org/2000/svg">
...
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.
Hi @m1r0! I'll take a look and see if I can find the cause on Monday. 😉
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've managed to solve the above by updating @automattic/components
and @automattic/tour-kit
(related PRs Automattic/wp-calypso#90267 woocommerce/woocommerce#47129) but now the test suite is throwing Cannot unlock an object that was not locked before
. 🙄 Are you familiar with this error?
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 found that this is an error coming from Gutenberg: WordPress/gutenberg@1b18104#diff-a115d786e2db4593eaf8ecdf7126885b1fb7f2c936c2884de7f52a5ab00eb1e0R142-R144
But no idea of what it means without investigating deeper. :(
@wordpress
)
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
ea247dc
to
cda2399
Compare
Test the previous changes of this PR with WordPress Playground. |
cda2399
to
ab5f7be
Compare
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
"@wordpress/url": "wp-5.9", | ||
"@automattic/components": "2.1.1", | ||
"@automattic/tour-kit": "1.1.3", | ||
"@wordpress/api-fetch": "wp-6.7", |
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.
For these, I was thinking we should probably use Sensei's minimum supported WP version (i.e. wp-6.5
). It seems risky to go to the current version. It actually might make our lives a bit easier too with potentially less things to fix.
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.
Makes sense. I'll try it once I get back to this.
Btw, if you're interested in working on this - feel free! 🙂
Resolves #7692 #6123
Proposed Changes
Testing Instructions
New/Updated Hooks
Deprecated Code
Pre-Merge Checklist