diff --git a/projects/packages/wp-build-polyfills/.gitignore b/projects/packages/wp-build-polyfills/.gitignore index 11e83b9def90..29d5b37b3ad4 100644 --- a/projects/packages/wp-build-polyfills/.gitignore +++ b/projects/packages/wp-build-polyfills/.gitignore @@ -1,4 +1,5 @@ /node_modules /build +/build-prod-test /.cache /tests/fixtures/wp-build-source/**/build diff --git a/projects/packages/wp-build-polyfills/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/packages/wp-build-polyfills/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..4190c36dfbcd --- /dev/null +++ b/projects/packages/wp-build-polyfills/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Bundle a local `keyedReducer` helper so the notices polyfill keeps working with newer `@wordpress/notices` on WordPress versions that ship an older `@wordpress/data`. Upstream Gutenberg PR https://github.com/WordPress/gutenberg/pull/77364 consolidated `keyedReducer` into `@wordpress/data` 10.45.0, after which `@wordpress/notices` 5.45.0 and `@wordpress/core-data` 7.45.0 began importing it from `@wordpress/data`. Sites running older WordPress Core (whose bundled `@wordpress/data` predates 10.45.0) would hit `undefined is not a function` at polyfill load time. This is a workaround: a webpack loader rewrites the `keyedReducer` named import in the affected upstream files to a local shim, while every other `@wordpress/data` symbol stays externalized to the runtime `window.wp.data` global. A longer-term fix (e.g. shipping a `wp-data` polyfill IIFE, or waiting for Core upgrades to catch up) is out of scope for this change. The loader rule is currently scoped to `@wordpress/notices` and `@wordpress/core-data`; future polyfill additions that pull in other upstream packages importing `keyedReducer` from `@wordpress/data` should extend the rule and regression test. diff --git a/projects/packages/wp-build-polyfills/composer.json b/projects/packages/wp-build-polyfills/composer.json index 22d1a521a929..24ee39b643e3 100644 --- a/projects/packages/wp-build-polyfills/composer.json +++ b/projects/packages/wp-build-polyfills/composer.json @@ -40,6 +40,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "config": { diff --git a/projects/packages/wp-build-polyfills/src/internal/keyed-reducer.js b/projects/packages/wp-build-polyfills/src/internal/keyed-reducer.js new file mode 100644 index 000000000000..5215925c98ee --- /dev/null +++ b/projects/packages/wp-build-polyfills/src/internal/keyed-reducer.js @@ -0,0 +1,45 @@ +/** + * Local `keyedReducer` higher-order reducer. + * + * `@wordpress/notices` >= 5.45.0 imports `keyedReducer` from `@wordpress/data`, + * which only added this export in `@wordpress/data` 10.45.0 (Gutenberg + * consolidated copies previously maintained inside notices and core-data; + * see WordPress/gutenberg#77364). The polyfill externalizes `@wordpress/data` + * to the runtime `window.wp.data` global so notices state stays in the shared + * registry. On sites that still ship an older `@wordpress/data` (current + * WordPress Core), `window.wp.data.keyedReducer` is `undefined` and the + * polyfill bundle throws at load time. + * + * To keep `@wordpress/data` externalized for every other symbol (so the store + * registers in the shared registry) while staying robust to the missing + * helper, we ship a local copy and alias only the file that needs it. + * Implementation kept byte-identical to upstream. + * + * @see https://github.com/WordPress/gutenberg/pull/77364 + */ + +/** + * Returns a higher-order reducer that maintains a sub-state keyed by + * `action[ actionProperty ]`. The wrapped reducer runs against the slice of + * state belonging to that key. + * + * @param {string} actionProperty - Action key whose value selects the sub-state. + * @return {Function} Higher-order reducer factory. + */ +export const keyedReducer = + actionProperty => + reducer => + ( state = {}, action ) => { + const key = action[ actionProperty ]; + if ( key === undefined ) { + return state; + } + const nextKeyState = reducer( state[ key ], action ); + if ( nextKeyState === state[ key ] ) { + return state; + } + return { + ...state, + [ key ]: nextKeyState, + }; + }; diff --git a/projects/packages/wp-build-polyfills/tests/js/keyed-reducer-inlined.test.js b/projects/packages/wp-build-polyfills/tests/js/keyed-reducer-inlined.test.js new file mode 100644 index 000000000000..0c0ffd35b61d --- /dev/null +++ b/projects/packages/wp-build-polyfills/tests/js/keyed-reducer-inlined.test.js @@ -0,0 +1,215 @@ +/** + * Regression test for the `keyedReducer` runtime breakage introduced when + * `@wordpress/notices` >= 5.45.0 began importing `keyedReducer` from + * `@wordpress/data` (added upstream in `@wordpress/data` 10.45.0). Without + * the inlining loader, the polyfill bundle would call + * `window.wp.data.keyedReducer()` at load time and throw on older WordPress + * Cores that ship `@wordpress/data` < 10.45.0. + * + * The test verifies the built `wp-notices` polyfill ships a working + * `keyedReducer` that does NOT depend on a `keyedReducer` export from the + * runtime `wp.data` global. We extract the reducer function from the bundle + * with an isolated `wp.data` stub (and a stub for every other external + * symbol the bundle touches) and execute it on a fixture state shape. + * + * The same assertions run against BOTH the development (non-minified) and + * production (minified) outputs, because minifiers can rewrite the shape of + * `window["wp"]["data"]["keyedReducer"]` references in ways the static + * regex could otherwise miss (e.g. aliasing `wp.data` into a single + * identifier and then doing `.keyedReducer` off of it). + */ + +const { existsSync, readFileSync, rmSync } = require( 'fs' ); +const assert = require( 'node:assert/strict' ); +const { execFileSync } = require( 'node:child_process' ); +const { describe, it, before } = require( 'node:test' ); +const vm = require( 'node:vm' ); +const path = require( 'path' ); + +const PACKAGE_ROOT = path.resolve( __dirname, '..', '..' ); +const DEV_BUILD_PATH = path.join( PACKAGE_ROOT, 'build', 'scripts', 'notices', 'index.js' ); + +// We render production output into a sibling tree so the dev build at +// `build/` stays usable for other tests / inspection without interleaving. +const PROD_BUILD_ROOT = path.join( PACKAGE_ROOT, 'build-prod-test' ); +const PROD_BUILD_PATH = path.join( PROD_BUILD_ROOT, 'scripts', 'notices', 'index.js' ); + +/** + * Run the package's webpack build with the given NODE_ENV and output base. + * We invoke webpack-cli directly (rather than the package's `build` script) + * so we can redirect the output path without clobbering the dev build. + * + * @param {object} env - Extra env vars for the child process. + * @param {string} outputBase - Absolute path for `output.path`'s base. + */ +function buildWithEnv( env, outputBase ) { + execFileSync( + process.execPath, + [ + require.resolve( 'webpack-cli/bin/cli.js' ), + '--config', + path.join( PACKAGE_ROOT, 'webpack.config.js' ), + ], + { + cwd: PACKAGE_ROOT, + env: { ...process.env, ...env, WP_BUILD_POLYFILLS_OUTPUT_BASE: outputBase }, + stdio: 'pipe', + } + ); +} + +/** + * Assertion shared by both build modes: the bundle must not statically + * reference `wp.data.keyedReducer` (whatever shape the minifier picks). + * + * @param {string} source - Raw bundle source. + * @param {string} label - Human-readable build label for assertion msgs. + */ +function assertNoWpDataKeyedReducer( source, label ) { + // Strip block and line comments before matching so JSDoc text in + // preserved source (e.g. the loader / shim) doesn't trip the check. + const stripped = source + .replace( /\/\*[\s\S]*?\*\//g, '' ) + .replace( /(^|[^:'"`])\/\/[^\n]*/g, '$1' ); + + // `keyedReducer` should only appear as the local inlined export, not + // dereferenced off the externalized `wp.data` module. Both the dev and + // minified outputs route `@wordpress/data` through + // `window.wp.data` / `window["wp"]["data"]`, so any property access + // off that reference for `keyedReducer` would indicate the helper is + // being read from the runtime instead of the local copy. + const wpDataKeyedReducer = + /(?:window\s*(?:\.\s*wp|\[\s*['"]wp['"]\s*\])\s*(?:\.\s*data|\[\s*['"]data['"]\s*\])\s*(?:\.\s*keyedReducer|\[\s*['"]keyedReducer['"]\s*\]))/; + assert.ok( + ! wpDataKeyedReducer.test( stripped ), + `${ label }: built bundle still reaches for \`wp.data.keyedReducer\`. Confirm the keyed-reducer loader is wired up for the affected reducer source paths.` + ); + + // Belt-and-braces: in a minified bundle the property may be quoted but + // not chained directly off `wp.data` (e.g. `const d = wp.data; … + // d["keyedReducer"]`). Asserting that the literal string `keyedReducer` + // is absent from the bundle entirely catches that escape hatch. (The + // helper function body in `src/internal/keyed-reducer.js` does not + // itself mention `keyedReducer` — it's exported by that name but + // referenced internally by parameter / closure variables only — so + // this assertion is safe for the inlined-shim case.) + assert.ok( + ! /['"]keyedReducer['"]/.test( stripped ) && ! /\bkeyedReducer\b/.test( stripped ), + `${ label }: built bundle contains the literal token \`keyedReducer\`, which suggests an unexpected externalized property access slipped past the static check above.` + ); +} + +/** + * Runtime assertion: load the bundle in a vm with a stub `wp.data` that + * deliberately omits `keyedReducer`, and exercise the registered notices + * reducer end-to-end. + * + * @param {string} source - Raw bundle source. + */ +function assertReducerWorksWithoutWpDataKeyedReducer( source ) { + const recordedStore = {}; + const sandbox = { + window: { + wp: { + components: { SnackbarList: () => null, NoticeList: () => null }, + data: { + // Intentionally omit `keyedReducer` — the polyfill must not need it. + createReduxStore: ( name, options ) => { + recordedStore.name = name; + recordedStore.reducer = options.reducer; + return { name }; + }, + register: () => {}, + useDispatch: () => ( {} ), + useSelect: () => undefined, + }, + }, + polyfill: true, + }, + ReactJSXRuntime: { jsx: () => null, jsxs: () => null, Fragment: Symbol( 'Fragment' ) }, + }; + sandbox.window.window = sandbox.window; + sandbox.globalThis = sandbox.window; + sandbox.self = sandbox.window; + + vm.createContext( sandbox ); + vm.runInContext( source, sandbox ); + + assert.equal( + recordedStore.name, + 'core/notices', + 'expected the bundle to register the `core/notices` store' + ); + assert.equal( typeof recordedStore.reducer, 'function', 'reducer must be a function' ); + + // Empty state, create one notice in the `default` context. + // Compare JSON so deepStrictEqual doesn't flag cross-realm object identity. + const created = recordedStore.reducer( undefined, { + type: 'CREATE_NOTICE', + context: 'default', + notice: { id: 'a', content: 'hi' }, + } ); + assert.equal( + JSON.stringify( created ), + JSON.stringify( { default: [ { id: 'a', content: 'hi' } ] } ) + ); + + // Remove the only notice. + const removed = recordedStore.reducer( created, { + type: 'REMOVE_NOTICE', + context: 'default', + id: 'a', + } ); + assert.equal( JSON.stringify( removed ), JSON.stringify( { default: [] } ) ); +} + +describe( 'wp-notices polyfill bundle (development build)', () => { + it( 'must not be missing the build artifact', () => { + assert.ok( + existsSync( DEV_BUILD_PATH ), + `Run \`pnpm run build\` first; missing ${ DEV_BUILD_PATH }` + ); + } ); + + it( 'must not reference `wp.data.keyedReducer` in the built bundle', () => { + const raw = readFileSync( DEV_BUILD_PATH, 'utf8' ); + assertNoWpDataKeyedReducer( raw, 'dev build' ); + } ); + + it( 'must produce a notices reducer that works without `wp.data.keyedReducer`', () => { + const source = readFileSync( DEV_BUILD_PATH, 'utf8' ); + assertReducerWorksWithoutWpDataKeyedReducer( source ); + } ); +} ); + +describe( 'wp-notices polyfill bundle (production minified build)', () => { + before( () => { + // Tear down any prior run so we always assert against fresh output. + rmSync( PROD_BUILD_ROOT, { recursive: true, force: true } ); + buildWithEnv( { NODE_ENV: 'production', BABEL_ENV: 'production' }, PROD_BUILD_ROOT ); + } ); + + it( 'must produce a minified build artifact', () => { + assert.ok( + existsSync( PROD_BUILD_PATH ), + `Production webpack build did not emit ${ PROD_BUILD_PATH }` + ); + const stats = readFileSync( PROD_BUILD_PATH, 'utf8' ); + // Sanity-check minification actually happened — non-minified bundles + // are tens of KB; minified should be a fraction of that. + assert.ok( + stats.length < 10000, + `Expected minified bundle, got ${ stats.length } bytes — webpack may not have minified.` + ); + } ); + + it( 'must not reference `wp.data.keyedReducer` in the minified bundle', () => { + const raw = readFileSync( PROD_BUILD_PATH, 'utf8' ); + assertNoWpDataKeyedReducer( raw, 'production build' ); + } ); + + it( 'must produce a notices reducer that works without `wp.data.keyedReducer`', () => { + const source = readFileSync( PROD_BUILD_PATH, 'utf8' ); + assertReducerWorksWithoutWpDataKeyedReducer( source ); + } ); +} ); diff --git a/projects/packages/wp-build-polyfills/webpack.config.js b/projects/packages/wp-build-polyfills/webpack.config.js index 2e13a1f8a988..f6f9ad6dcb12 100644 --- a/projects/packages/wp-build-polyfills/webpack.config.js +++ b/projects/packages/wp-build-polyfills/webpack.config.js @@ -20,7 +20,12 @@ const jetpackWebpackConfig = require( '@automattic/jetpack-webpack-config/webpac const packageRoot = __dirname; const localRequire = require; -const outputBase = path.join( packageRoot, 'build' ); +// Allow the regression test (or any external driver) to redirect the +// emitted output base without clobbering the normal `build/` tree, e.g. +// for asserting against a freshly-rebuilt production bundle in parallel. +const outputBase = process.env.WP_BUILD_POLYFILLS_OUTPUT_BASE + ? path.resolve( process.env.WP_BUILD_POLYFILLS_OUTPUT_BASE ) + : path.join( packageRoot, 'build' ); // ── Helpers ────────────────────────────────────────────────────────────────── @@ -94,6 +99,43 @@ function resolveEntry( packageName, subEntry = null ) { // ── Shared config ─────────────────────────────────────────────────────────── +// Files inside upstream @wordpress packages that import a helper from +// `@wordpress/data` that is not guaranteed to exist on the runtime +// `window.wp.data` (i.e. older WordPress Core's bundled `@wordpress/data`). +// For these specific files, rewrite the `keyedReducer` named import to come +// from a local copy bundled with the polyfill, so the helper resolves +// against the inlined implementation instead of the external global. Other +// `@wordpress/data` symbols (`createReduxStore`, `register`, `useSelect`, +// `useDispatch`) remain externalized via the DEP plugin's standard path so +// the notices store registers in the shared `window.wp.data` registry. +// +// A custom loader (rather than `Rule.resolve.alias`) is required because the +// DEP plugin's `externals` callback runs before module resolution, so an +// alias on `@wordpress/data` is bypassed for the externalized request. +// +// Currently only `keyedReducer` is affected — added to `@wordpress/data` +// 10.45.0 alongside a `@wordpress/notices` 5.45.0 / `@wordpress/core-data` +// 7.45.0 refactor that consolidated a local copy (see WordPress/gutenberg#77364). +// +// The rule's `test` is intentionally restricted to upstream files known to +// import `keyedReducer` from `@wordpress/data`: `notices` ships it in +// `store/reducer.{mjs,cjs}`, and `core-data` ships it in +// `queried-data/reducer.{mjs,cjs}`. The loader itself is also defensive — it +// is a no-op for files that do not import `keyedReducer` — so the worst-case +// failure mode on a too-broad path match is a small perf hit, not incorrect +// rewrites. If a future polyfill addition pulls in another upstream package +// that imports `keyedReducer` from `@wordpress/data`, extend this `test` +// regex (and the regression test below) accordingly. +const wpDataKeyedReducerRule = { + test: [ + // `@wordpress/notices` >= 5.45.0 `store/reducer.{mjs,cjs}`. + // `@wordpress/core-data` >= 7.45.0 `queried-data/reducer.{mjs,cjs}`. + /[\\/]@wordpress[\\/](?:notices[\\/](?:build|build-module)[\\/]store|core-data[\\/](?:build|build-module)[\\/]queried-data)[\\/]reducer\.(?:m?js|cjs)$/, + ], + enforce: 'pre', + loader: path.resolve( packageRoot, 'wp-data-keyed-reducer-loader.js' ), +}; + const sharedConfig = { mode: jetpackWebpackConfig.mode, devtool: jetpackWebpackConfig.devtool, @@ -106,6 +148,7 @@ const sharedConfig = { }, module: { rules: [ + wpDataKeyedReducerRule, // Transpile @wordpress/* packages from node_modules. jetpackWebpackConfig.TranspileRule( { includeNodeModules: [ '@wordpress/' ], diff --git a/projects/packages/wp-build-polyfills/wp-data-keyed-reducer-loader.js b/projects/packages/wp-build-polyfills/wp-data-keyed-reducer-loader.js new file mode 100644 index 000000000000..3f072d02f167 --- /dev/null +++ b/projects/packages/wp-build-polyfills/wp-data-keyed-reducer-loader.js @@ -0,0 +1,61 @@ +/** + * Webpack loader that rewrites the `keyedReducer` named import of + * `@wordpress/data` to a local copy bundled with the polyfill. + * + * `@wordpress/notices` >= 5.45.0 imports `keyedReducer` from `@wordpress/data` + * (consolidated upstream in `@wordpress/data` 10.45.0; see + * WordPress/gutenberg#77364). The polyfill externalizes `@wordpress/data` to + * the runtime `window.wp.data` global so the notices store registers in the + * shared registry. On sites that still ship an older `@wordpress/data` + * (current WordPress Core), `window.wp.data.keyedReducer` is `undefined` and + * the bundle throws at load time. + * + * This loader leaves every other `@wordpress/data` named import untouched so + * those continue to be resolved against the runtime global. The DEP plugin's + * `externals` callback runs before module resolution, which means a + * `Rule.resolve.alias` mapping for `@wordpress/data` is bypassed for the + * externalized request. Rewriting the import in source — before webpack sees + * the request — is the only path that survives the externals pipeline. + */ + +/* global __dirname */ + +const path = require( 'path' ); + +const LOCAL_PATH = path.resolve( __dirname, 'src/internal/keyed-reducer.js' ); + +/** + * Rewrites `import { keyedReducer } from '@wordpress/data'` (alone or + * combined with other named imports) so `keyedReducer` resolves to the local + * shim while every other name continues to resolve to `@wordpress/data`. + * + * Bails out without changes when the import does not include `keyedReducer` + * or when the import shape isn't a simple named-imports list (we don't try to + * be clever about renames or namespace imports — there are none in the + * affected upstream files, and a loud miss is preferable to a quiet rewrite). + * + * @param {string} source - Source code of the matched module. + * @return {string} Rewritten source. + */ +module.exports = function wpDataKeyedReducerLoader( source ) { + const importRegex = /import\s*\{\s*([^}]+?)\s*\}\s*from\s*(['"])@wordpress\/data\2\s*;?/g; + const localImport = `import { keyedReducer } from ${ JSON.stringify( LOCAL_PATH ) };`; + + return source.replace( importRegex, ( match, namedList, quote ) => { + const names = namedList + .split( ',' ) + .map( n => n.trim() ) + .filter( Boolean ); + if ( ! names.includes( 'keyedReducer' ) ) { + return match; + } + const remaining = names.filter( n => n !== 'keyedReducer' ); + if ( remaining.length === 0 ) { + return localImport; + } + const remainingImport = `import { ${ remaining.join( + ', ' + ) } } from ${ quote }@wordpress/data${ quote };`; + return `${ remainingImport } ${ localImport }`; + } ); +}; diff --git a/projects/plugins/backup/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/plugins/backup/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..f852a32eaf51 --- /dev/null +++ b/projects/plugins/backup/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update composer.lock files. diff --git a/projects/plugins/backup/composer.lock b/projects/plugins/backup/composer.lock index bac7cfbd08c8..21fc6a8b27cd 100644 --- a/projects/plugins/backup/composer.lock +++ b/projects/plugins/backup/composer.lock @@ -1833,7 +1833,7 @@ "dist": { "type": "path", "url": "../../packages/wp-build-polyfills", - "reference": "50a49082c2623dd4e295860c6a3d9b6be5b66f4c" + "reference": "b3add2c04a4cd1844f5686cbc8515404cbe6d83d" }, "require": { "php": ">=7.2" @@ -1875,6 +1875,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "license": [ diff --git a/projects/plugins/jetpack/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/plugins/jetpack/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..5728a2db690d --- /dev/null +++ b/projects/plugins/jetpack/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +General: update composer.lock files. diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 689d7cccbf31..104d08f1893f 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -3824,7 +3824,7 @@ "dist": { "type": "path", "url": "../../packages/wp-build-polyfills", - "reference": "50a49082c2623dd4e295860c6a3d9b6be5b66f4c" + "reference": "b3add2c04a4cd1844f5686cbc8515404cbe6d83d" }, "require": { "php": ">=7.2" @@ -3866,6 +3866,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "license": [ diff --git a/projects/plugins/mu-wpcom-plugin/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/plugins/mu-wpcom-plugin/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..f852a32eaf51 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update composer.lock files. diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index 7db7f63877d2..c118be76dc3e 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -2152,7 +2152,7 @@ "dist": { "type": "path", "url": "../../packages/wp-build-polyfills", - "reference": "50a49082c2623dd4e295860c6a3d9b6be5b66f4c" + "reference": "b3add2c04a4cd1844f5686cbc8515404cbe6d83d" }, "require": { "php": ">=7.2" @@ -2194,6 +2194,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "license": [ diff --git a/projects/plugins/videopress/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/plugins/videopress/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..f852a32eaf51 --- /dev/null +++ b/projects/plugins/videopress/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update composer.lock files. diff --git a/projects/plugins/videopress/composer.lock b/projects/plugins/videopress/composer.lock index 9f04068508b8..9481ce9c2a74 100644 --- a/projects/plugins/videopress/composer.lock +++ b/projects/plugins/videopress/composer.lock @@ -1773,7 +1773,7 @@ "dist": { "type": "path", "url": "../../packages/wp-build-polyfills", - "reference": "50a49082c2623dd4e295860c6a3d9b6be5b66f4c" + "reference": "b3add2c04a4cd1844f5686cbc8515404cbe6d83d" }, "require": { "php": ">=7.2" @@ -1815,6 +1815,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "license": [ diff --git a/projects/plugins/wpcomsh/changelog/change-fix-polyfills-wp-monorepo-upgrade b/projects/plugins/wpcomsh/changelog/change-fix-polyfills-wp-monorepo-upgrade new file mode 100644 index 000000000000..f852a32eaf51 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/change-fix-polyfills-wp-monorepo-upgrade @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +General: update composer.lock files. diff --git a/projects/plugins/wpcomsh/composer.lock b/projects/plugins/wpcomsh/composer.lock index 1e93ef48358c..23680da49a89 100644 --- a/projects/plugins/wpcomsh/composer.lock +++ b/projects/plugins/wpcomsh/composer.lock @@ -2424,7 +2424,7 @@ "dist": { "type": "path", "url": "../../packages/wp-build-polyfills", - "reference": "50a49082c2623dd4e295860c6a3d9b6be5b66f4c" + "reference": "b3add2c04a4cd1844f5686cbc8515404cbe6d83d" }, "require": { "php": ">=7.2" @@ -2466,6 +2466,10 @@ ], "test-php": [ "@composer phpunit" + ], + "test-js": [ + "pnpm run build", + "pnpm run test" ] }, "license": [