`npm dedupe` is a command that attempts to simplify the structure of the local package tree by moving dependencies higher up. This allows for more effective package sharing, less transfer, and smaller `node_modules` folders.
This change configures npm to `prefer-dedupe` by default so that these benefits persist and the command is not required to be run regularly.
This also brings better alignment with the Gutenberg repository, which has already configured `prefer-dedupe`.
Props jonsurrell.
Fixes#62190.
git-svn-id: https://develop.svn.wordpress.org/trunk@59207 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `package-lock.json` file to use the version 3 format.
Version 3 removes the version 1 format data, resulting in a smaller file. While version 3 format is not supported in npm < 7, a lower limit is enforced in the `engines` declaration within `package.json` and has been >= 7 since [56378].
The Gutenberg repository has already been updated to use version 3.
Props jonsurrell.
See #62190.
git-svn-id: https://develop.svn.wordpress.org/trunk@59206 602fd350-edb4-49c9-b593-d223f7449a82
This updates several `devDependencies` to their latest versions:
- `autoprefixer` (`10.4.20`)
- `cssnano` (`7.0.6`)
- `grunt-contrib-qunit` (`10.1.1`)
- `grunt-webpack` (`7.0.0`)
- `postcss` (`8.4.47`)
- `qunit` (`2.22.0`)
- `sass` (`1.79.4`)
- `uuid` (`10.0.0`)
- `wait-on` (18.0.1`)
Also included are two minor updates to bundled dependencies:
- `json2php` (`0.0.9`)
- `wicg-inert` (`3.1.3`).
After applying these updates, `npm audit fix` and `grunt precommit:css` were run.
See #62137.
git-svn-id: https://develop.svn.wordpress.org/trunk@59135 602fd350-edb4-49c9-b593-d223f7449a82
The Moment.js project is in maintenance mode, so the changes in this update are minor.
Props manooweb, rishit30g.
Fixes#60516.
git-svn-id: https://develop.svn.wordpress.org/trunk@59129 602fd350-edb4-49c9-b593-d223f7449a82
Expands tests to ensure the version number of packages updated via NPM matches the version number used for registering the script in the script loader.
This adds tests for (by their registered name in WordPress):
* backbone
* clipboard
* hoverIntent
* hoverintent-js
* imagesloaded
* jquery-color
* jquery-core
* jquery-form
* masonry
* react-jsx-runtime
* underscore
* wp-polyfill-dom-rect
* wp-polyfill-element-closest
* wp-polyfill-fetch
* wp-polyfill-formdata
* wp-polyfill-inert
* wp-polyfill-node-contains
* wp-polyfill-object-fit
* wp-polyfill-url
This expands on the earlier tests introduced for:
* lodash
* moment
* react
* react-dom
* regenerator-runtime
An additional test is added to ensure that the data provider for these tests is maintained as libraries are added via package.json.
`@wordpress/*` scripts are excluded from these tests as wp-scripts generates a version number automatically based on the file's contents.
Additionally, the version of element-closest listed in package.json is updated to use a fixed version rather than a range. This reflects the current practice of WordPress to define the specific version in core. For the avoidance of doubt, this does not affect the version shipped in WordPress.
Follow up to [57185].
Props peterwilsoncc, jorbin.
Fixes#61855.
git-svn-id: https://develop.svn.wordpress.org/trunk@59071 602fd350-edb4-49c9-b593-d223f7449a82
This update most notably drops support for jQuery `< 1.12` and `< 2.2`. WordPress has not shipped with a version that matches these ranges since version 4.4 (see [36285]/#35380).
The update also changes the library’s browser support policy to only support the latest Chrome, Firefox, Safari, and Edge. This closely matches Core’s current policy to support the last 2 versions of these browsers. The library’s README notes that other versions nay “also work correctly with this plugin but support is not guaranteed”, which is reasonably similar.
Props vipulgupta003.
Fixes#61835.
git-svn-id: https://develop.svn.wordpress.org/trunk@58956 602fd350-edb4-49c9-b593-d223f7449a82
The polyfill was added in [57492], but all browsers supported by WordPress already support import maps.
This not only disables the polyfill, but completely removes it as it was only added recently and there is no usage outside of core.
Props swissspidy, desrosj, luisherranz, gziolo.
Fixes#60970.
git-svn-id: https://develop.svn.wordpress.org/trunk@58952 602fd350-edb4-49c9-b593-d223f7449a82
This updates the Underscore library from version 1.13.6 to 1.13.7. This is a minor bug fix release.
The full list of changes can be found in the Underscore.js change log: https://underscorejs.org/#changelog.
Props hbhalodia, aristath, desrosj, mcrisp1972.
Fixes#61836.
git-svn-id: https://develop.svn.wordpress.org/trunk@58880 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `backbone` library from version `1.5.0` to `1.6.0`. This is a minor bug fix release.
The full list of changes can be found in the Backbone.js change log: https://backbonejs.org/#changelog.
Props manooweb mardroid.
Fixes#60512.
git-svn-id: https://develop.svn.wordpress.org/trunk@58872 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `whatwg-fetch` library from version `3.6.17` to `3.6.20`, the latest current version.
This library is included and registered within WordPress as the `wp-polyfill-fetch` script but is no longer used by WordPress itself. Updates are provided as a courtesy, and all projects using this polyfill should reevaluate usage.
Props manooweb.
Fixes#60514.
git-svn-id: https://develop.svn.wordpress.org/trunk@58860 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `regenerator-runtime` library to version `0.14.1`.
This library has not been used by Core itself in quite a while and only maintained as a courtesy. Any projects relying on `regenerator-runtime` should reevaluate their usage.
Props manooweb.
Fixes#60515.
git-svn-id: https://develop.svn.wordpress.org/trunk@58800 602fd350-edb4-49c9-b593-d223f7449a82
This partially reverts [58563], which applied an update of the `uglify-js` `devDependency` from `3.17.4` to `3.18.0`.
The `3.18.0` update is causing some JavaScript errors in the `media-views.min.js` file, so needs to be investigated further.
Props david.binda, mukesh27, alshakero.
Fies #61519.
git-svn-id: https://develop.svn.wordpress.org/trunk@58585 602fd350-edb4-49c9-b593-d223f7449a82
This updates the npm `devDependencies` for Core to their latest versions, with one exception. The latest version of `sinon` causes some test failures and requires more investigation.
Fixes#61498.
git-svn-id: https://develop.svn.wordpress.org/trunk@58563 602fd350-edb4-49c9-b593-d223f7449a82
This removes the `is-plain-object`, `memize`, `path-to-regexp`, and `tslib`.
These were also introduced in [56065] and have been integrated into the build process. Instead, these are now installed as peer dependencies through the `@/wordpress/*` packages that actually require them.
Follow up to [57634].
Props swissspidy.
See #59658.
git-svn-id: https://develop.svn.wordpress.org/trunk@57636 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following dependencies:
- `@pmmmwh/react-refresh-webpack-plugin` from `0.5.5` to `0.5.11`.
- `autoprefixer` from `10.4.16` to `10.4.17`.
- `copy-webpack-plugin` from `11.0.0` to `12.0.2`.
- `cssnano` from `6.0.1` to `6.0.3`.
- `dotenv` from `16.3.1` to `16.4.4`.
- `dotenv-expand` from `10.0.0` to `11.0.3`.
- `postcss` from `8.4.31` to `8.4.35`.
- `sass` from `1.69.3` to `1.70.0`.
- `sinon` from `16.0.3` to `16.1.3`.
- `source-map-loader` from `4.0.1` to `5.0.0`.
- `terser-webpack-plugin` from `5.3.9` to `5.3.10`.
- `wait-on` from `7.0.1` to `7.2.0`.
- `webpack` from `5.89.0` to `5.90.2`.
Additionally, `npm audit fix` has been run.
See #59658.
git-svn-id: https://develop.svn.wordpress.org/trunk@57635 602fd350-edb4-49c9-b593-d223f7449a82
This removes the `@emotion/is-prop-valid`, `@emotion/memoize`, and `framer-motion` packages as direct dependencies.
These were introduced in [56065], but do not appear to have been integrated into the build process. Instead, these are now installed as peer dependencies to the `@wordpress/block-editor` and `@wordpress/components` packages.
Props gziolo, huzaifaalmesbah.
See #59658.
git-svn-id: https://develop.svn.wordpress.org/trunk@57634 602fd350-edb4-49c9-b593-d223f7449a82
It brings with a set of iterations and follow-ups to the initial package update.
It also fixes a regression that happened for interactive blocks.
Props gziolo, luisherranz, cbravobernal.
See #60315.
git-svn-id: https://develop.svn.wordpress.org/trunk@57499 602fd350-edb4-49c9-b593-d223f7449a82