WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

[@wordpress/scripts] Some internal modules are deprecated. #62162

Open stein2nd opened 5 months ago

stein2nd commented 5 months ago

Description

For verification, I temporarily modernised package.json by running 'ncu' and 'ncu -u' under the ‘@wordpress/scripts’ installation folder. Pasted Graphic

When ’npm install' was executed, a deprecated warning for an internal module was displayed. Pasted Graphic 1

npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported babel-jest@29 7 0

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. babel-plugin-istanbul@6 1 1

npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported del@4 1 1

npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead jsdom@20 0 3

npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead domexception@4 0 0

npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. core-js@2 6 12

Step-by-step reproduction instructions

  1. Go to the ‘@wordpress/scripts’ installation folder.
  2. temporarily modernised package.json by running 'ncu' and 'ncu -u'.
  3. run 'npm install'.

Screenshots, screen recording, code snippet

No response

Environment info

System:

Please confirm that you have searched existing issues in the repo.

No

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

ghostintranslation commented 4 months ago

I left a comment about the upgrade of the css-loader package in #62496 but I feel that it should also be mentioned here as this issue is about upgrading packages:

The css-loader package upgrade is especially important as it would bring in the new getJson function which would allow a plugin's webpack to be configured so that in the case of using SCSS modules it could export a JSON file containing the mapping of the original css class names with the hashed names.

From the Javascript side it's not a problem as we can import the module and use the classes, but this is required for dynamic blocks as there is no other way from PHP to know and use css classes when they are hashed.

Reference to the getJson function: https://webpack.js.org/loaders/css-loader/#getjson