Skip to content
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

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

Open
stein2nd opened this issue May 31, 2024 · 2 comments
Open

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

stein2nd opened this issue May 31, 2024 · 2 comments
Labels
[Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended

Comments

@stein2nd
Copy link

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 [email protected]:
Glob versions prior to v9 are no longer supported
babel-jest@29 7 0

npm warn deprecated [email protected]:
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 [email protected]:
Rimraf versions prior to v4 are no longer supported
del@4 1 1

npm warn deprecated [email protected]:
Use your platform's native atob() and btoa() methods instead
jsdom@20 0 3

npm warn deprecated [email protected]:
Use your platform's native DOMException instead
domexception@4 0 0

npm warn deprecated [email protected]:
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:

  • OS: macOS 14.5
  • CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  • Memory: 277.53 MB / 32.00 GB
  • Shell: 3.2.57 - /bin/bash

Binaries:

  • Node: 22.2.0 - ~/.nodebrew/current/bin/node
  • Yarn: 1.22.22 - /usr/local/bin/yarn
  • npm: 10.8.1 - ~/.nodebrew/current/bin/npm

npmPackages:

  • @babel/core: ^7.24.6 => 7.24.6
  • @pmmmwh/react-refresh-webpack-plugin: ^0.5.13 => 0.5.13
  • @svgr/webpack: ^8.1.0 => 8.1.0
  • @wordpress/babel-preset-default: file:../babel-preset-default => 7.42.0
  • @wordpress/browserslist-config: file:../browserslist-config => 5.41.0
  • @wordpress/dependency-extraction-webpack-plugin: file:../dependency-extraction-webpack-plugin => 5.9.0
  • @wordpress/e2e-test-utils-playwright: file:../e2e-test-utils-playwright => 0.26.0
  • @wordpress/eslint-plugin: file:../eslint-plugin => 18.1.0
  • @wordpress/jest-preset-default: file:../jest-preset-default => 11.29.0
  • @wordpress/npm-package-json-lint-config: file:../npm-package-json-lint-config => 4.43.0
  • @wordpress/postcss-plugins-preset: file:../postcss-plugins-preset => 4.42.0
  • @wordpress/prettier-config: file:../prettier-config => 3.15.0
  • @wordpress/stylelint-config: file:../stylelint-config => 21.41.0
  • adm-zip: ^0.5.12 => 0.5.12
  • babel-jest: ^29.7.0 => 29.7.0
  • babel-loader: ^9.1.3 => 9.1.3
  • browserslist: ^4.23.0 => 4.23.0
  • chalk: ^5.3.0 => 5.3.0
  • check-node-version: ^4.2.1 => 4.2.1
  • clean-webpack-plugin: ^4.0.0 => 4.0.0
  • copy-webpack-plugin: ^12.0.2 => 12.0.2
  • cross-spawn: ^7.0.3 => 7.0.3
  • css-loader: ^7.1.2 => 7.1.2
  • cssnano: ^7.0.1 => 7.0.1
  • cwd: ^0.10.0 => 0.10.0
  • dir-glob: ^3.0.1 => 3.0.1
  • eslint: ^9.3.0 => 9.3.0
  • expect-puppeteer: ^10.0.0 => 10.0.0
  • fast-glob: ^3.3.2 => 3.3.2
  • filenamify: ^6.0.0 => 6.0.0
  • jest: ^29.7.0 => 29.7.0
  • jest-dev-server: ^10.0.0 => 10.0.0
  • jest-environment-jsdom: ^29.7.0 => 29.7.0
  • jest-environment-node: ^29.7.0 => 29.7.0
  • markdownlint-cli: ^0.41.0 => 0.41.0
  • merge-deep: ^3.0.3 => 3.0.3
  • mini-css-extract-plugin: ^2.9.0 => 2.9.0
  • minimist: ^1.2.8 => 1.2.8
  • npm-package-json-lint: ^7.1.0 => 7.1.0
  • npm-packlist: ^8.0.2 => 8.0.2
  • postcss: ^8.4.38 => 8.4.38
  • postcss-loader: ^8.1.1 => 8.1.1
  • puppeteer-core: ^22.10.0 => 22.10.0
  • react-refresh: ^0.14.2 => 0.14.2
  • read-pkg-up: ^10.1.0 => 10.1.0
  • resolve-bin: ^1.0.1 => 1.0.1
  • rtlcss-webpack-plugin: ^4.0.7 => 4.0.7
  • sass: ^1.77.4 => 1.77.4
  • sass-loader: ^14.2.1 => 14.2.1
  • source-map-loader: ^5.0.0 => 5.0.0
  • stylelint: ^16.6.1 => 16.6.1
  • terser-webpack-plugin: ^5.3.10 => 5.3.10
  • url-loader: ^4.1.1 => 4.1.1
  • webpack: ^5.91.0 => 5.91.0
  • webpack-bundle-analyzer: ^4.10.2 => 4.10.2
  • webpack-cli: ^5.1.4 => 5.1.4
  • webpack-dev-server: ^5.0.4 => 5.0.4
  • wp-prettier: 3.0.3

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

@stein2nd stein2nd added the [Type] Bug An existing feature does not function as intended label May 31, 2024
@jordesign jordesign added the [Tool] WP Scripts /packages/scripts label Jun 2, 2024
@ghostintranslation
Copy link

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

@gziolo
Copy link
Member

gziolo commented Dec 20, 2024

I tested it today with the latest @wordpress/scripts version, and it's still an issue:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants