Update to pnpm 9.1 (#47385)
* Update to pnpm 9.1 and fix a mini css bug * Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/extend-cart-checkout-block, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/create-woo-extension, @woocommerce/create-product-editor-block, @woocommerce/components, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-e2e-tests, woocommerce-blocks, woocommerce-beta-tester, woocommerce, woo-ai * temporarily disable swallowing build output to diagnose issue with perf workflow * Ignore some type issues that commonly resurface when deps slightly change * Fix persistent type issues that have recurred many times * Add more ignores * Fix lint issue * Revert change to swallow build error * Improve access of the config that needs updated build dir. --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
69fa74ef8d
commit
2db29164f9
|
@ -12,7 +12,7 @@
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"pnpm"
|
"pnpm"
|
||||||
],
|
],
|
||||||
"pinVersion": "^8.12.1",
|
"pinVersion": "^9.1.0",
|
||||||
"packages": [
|
"packages": [
|
||||||
"**"
|
"**"
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"homepage": "https://woocommerce.com/",
|
"homepage": "https://woocommerce.com/",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -2,12 +2,14 @@
|
||||||
* External dependencies
|
* External dependencies
|
||||||
*/
|
*/
|
||||||
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
|
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
|
||||||
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
const { webpackConfig } = require( '@woocommerce/internal-style-build' );
|
const {
|
||||||
|
webpackConfig,
|
||||||
|
plugin,
|
||||||
|
} = require( '@woocommerce/internal-style-build' );
|
||||||
|
|
||||||
const NODE_ENV = process.env.NODE_ENV || 'development';
|
const NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ module.exports = {
|
||||||
rules: webpackConfig.rules,
|
rules: webpackConfig.rules,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new MiniCssExtractPlugin( {
|
new plugin( {
|
||||||
filename: ( data ) => {
|
filename: ( data ) => {
|
||||||
return data.chunk.name.startsWith( '/build/blocks' )
|
return data.chunk.name.startsWith( '/build/blocks' )
|
||||||
? `[name].css`
|
? `[name].css`
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"e2e": "jest",
|
"e2e": "jest",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -7,7 +7,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"changelog": "composer install && composer exec -- changelogger"
|
"changelog": "composer install && composer exec -- changelogger"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -11,7 +11,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -10,7 +10,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -11,7 +11,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -118,6 +118,8 @@ export const useUserPreferences = () => {
|
||||||
// Get our dispatch methods now - this can't happen inside the callback below.
|
// Get our dispatch methods now - this can't happen inside the callback below.
|
||||||
const dispatch = useDispatch( STORE_NAME );
|
const dispatch = useDispatch( STORE_NAME );
|
||||||
const { addEntities, receiveCurrentUser, saveEntityRecord } = dispatch;
|
const { addEntities, receiveCurrentUser, saveEntityRecord } = dispatch;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
let { saveUser } = dispatch;
|
let { saveUser } = dispatch;
|
||||||
|
|
||||||
const userData = useSelect( ( select ) => {
|
const userData = useSelect( ( select ) => {
|
||||||
|
@ -125,8 +127,14 @@ export const useUserPreferences = () => {
|
||||||
getCurrentUser,
|
getCurrentUser,
|
||||||
getEntity,
|
getEntity,
|
||||||
getEntityRecord,
|
getEntityRecord,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
getLastEntitySaveError,
|
getLastEntitySaveError,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
hasStartedResolution,
|
hasStartedResolution,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
hasFinishedResolution,
|
hasFinishedResolution,
|
||||||
} = select( STORE_NAME );
|
} = select( STORE_NAME );
|
||||||
|
|
||||||
|
@ -149,8 +157,8 @@ export const useUserPreferences = () => {
|
||||||
) => {
|
) => {
|
||||||
// WP 5.3.x doesn't have the User entity defined.
|
// WP 5.3.x doesn't have the User entity defined.
|
||||||
if ( typeof saveUser !== 'function' ) {
|
if ( typeof saveUser !== 'function' ) {
|
||||||
// Polyfill saveUser() - wrapper of saveEntityRecord.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-expect-error No types exist.
|
// @ts-ignore
|
||||||
saveUser = async ( userToSave: {
|
saveUser = async ( userToSave: {
|
||||||
id: number;
|
id: number;
|
||||||
woocommerce_meta: { [ key: string ]: boolean };
|
woocommerce_meta: { [ key: string ]: boolean };
|
||||||
|
|
|
@ -16,7 +16,8 @@ import { WCUser } from './types';
|
||||||
*/
|
*/
|
||||||
export const useUser = () => {
|
export const useUser = () => {
|
||||||
const userData = useSelect( ( select ) => {
|
const userData = useSelect( ( select ) => {
|
||||||
// TODO: Update @types/wordpress__core-data to include the 'hasStartedResolution', 'hasFinishedResolution' method.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { getCurrentUser, hasStartedResolution, hasFinishedResolution } =
|
const { getCurrentUser, hasStartedResolution, hasFinishedResolution } =
|
||||||
select( STORE_NAME );
|
select( STORE_NAME );
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ export const withCurrentUserHydration = ( currentUser: WCUser ) =>
|
||||||
if ( ! currentUser ) {
|
if ( ! currentUser ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { isResolving, hasFinishedResolution } =
|
const { isResolving, hasFinishedResolution } =
|
||||||
select( STORE_NAME );
|
select( STORE_NAME );
|
||||||
return (
|
return (
|
||||||
|
@ -33,6 +35,8 @@ export const withCurrentUserHydration = ( currentUser: WCUser ) =>
|
||||||
);
|
);
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { startResolution, finishResolution, receiveCurrentUser } =
|
const { startResolution, finishResolution, receiveCurrentUser } =
|
||||||
useDispatch( STORE_NAME );
|
useDispatch( STORE_NAME );
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -11,7 +11,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -10,7 +10,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"module": "build-module/index.js",
|
"module": "build-module/index.js",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
"module": "build-module/index.js",
|
"module": "build-module/index.js",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -12,7 +12,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -5,7 +5,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"e2e-builds": "./build.js"
|
"e2e-builds": "./build.js"
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md",
|
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -11,6 +11,7 @@ const StyleAssetPlugin = require( './style-asset-plugin' );
|
||||||
const NODE_ENV = process.env.NODE_ENV || 'development';
|
const NODE_ENV = process.env.NODE_ENV || 'development';
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
plugin: MiniCssExtractPlugin,
|
||||||
webpackConfig: {
|
webpackConfig: {
|
||||||
parser: {
|
parser: {
|
||||||
javascript: {
|
javascript: {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -39,7 +39,8 @@ export function Edit( {
|
||||||
|
|
||||||
const displayBlocks = useSelect(
|
const displayBlocks = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const product: Product = select( 'core' ).getEditedEntityRecord(
|
const product: Product = select( 'core' ).getEditedEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
postType,
|
postType,
|
||||||
|
|
|
@ -73,7 +73,8 @@ export const CreateTaxonomyModal: React.FC< CreateTaxonomyModalProps > = ( {
|
||||||
setErrorMessage( null );
|
setErrorMessage( null );
|
||||||
setIsCreating( true );
|
setIsCreating( true );
|
||||||
try {
|
try {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const newTaxonomy: Taxonomy = await saveEntityRecord(
|
const newTaxonomy: Taxonomy = await saveEntityRecord(
|
||||||
'taxonomy',
|
'taxonomy',
|
||||||
slug,
|
slug,
|
||||||
|
@ -81,7 +82,8 @@ export const CreateTaxonomyModal: React.FC< CreateTaxonomyModalProps > = ( {
|
||||||
name,
|
name,
|
||||||
parent: parent ? parent.id : null,
|
parent: parent ? parent.id : null,
|
||||||
},
|
},
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
{
|
{
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,8 @@ export function Edit( {
|
||||||
const blockProps = useWooBlockProps( attributes );
|
const blockProps = useWooBlockProps( attributes );
|
||||||
const { hierarchical }: TaxonomyMetadata = useSelect(
|
const { hierarchical }: TaxonomyMetadata = useSelect(
|
||||||
( select ) =>
|
( select ) =>
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
select( 'core' ).getTaxonomy( attributes.slug ) || {
|
select( 'core' ).getTaxonomy( attributes.slug ) || {
|
||||||
hierarchical: false,
|
hierarchical: false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,8 @@ export function NameBlockEdit( {
|
||||||
}: ProductEditorBlockEditProps< NameBlockAttributes > ) {
|
}: ProductEditorBlockEditProps< NameBlockAttributes > ) {
|
||||||
const blockProps = useWooBlockProps( attributes );
|
const blockProps = useWooBlockProps( attributes );
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { editEntityRecord, saveEntityRecord } = useDispatch( 'core' );
|
const { editEntityRecord, saveEntityRecord } = useDispatch( 'core' );
|
||||||
|
|
||||||
const { hasEdit } = useProductEdits();
|
const { hasEdit } = useProductEdits();
|
||||||
|
@ -55,7 +56,8 @@ export function NameBlockEdit( {
|
||||||
|
|
||||||
const productId = useEntityId( 'postType', 'product' );
|
const productId = useEntityId( 'postType', 'product' );
|
||||||
const product: Product = useSelect( ( select ) =>
|
const product: Product = useSelect( ( select ) =>
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
select( 'core' ).getEditedEntityRecord(
|
select( 'core' ).getEditedEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
'product',
|
'product',
|
||||||
|
@ -217,7 +219,8 @@ export function NameBlockEdit( {
|
||||||
onCancel={ () => setShowProductLinkEditModal( false ) }
|
onCancel={ () => setShowProductLinkEditModal( false ) }
|
||||||
onSaved={ () => setShowProductLinkEditModal( false ) }
|
onSaved={ () => setShowProductLinkEditModal( false ) }
|
||||||
saveHandler={ async ( updatedSlug ) => {
|
saveHandler={ async ( updatedSlug ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { slug, permalink }: Product =
|
const { slug, permalink }: Product =
|
||||||
await saveEntityRecord( 'postType', 'product', {
|
await saveEntityRecord( 'postType', 'product', {
|
||||||
id: product.id,
|
id: product.id,
|
||||||
|
|
|
@ -37,7 +37,8 @@ export function Edit( {
|
||||||
isParentResolving,
|
isParentResolving,
|
||||||
}: { parentName: string; isParentResolving: boolean } = useSelect(
|
}: { parentName: string; isParentResolving: boolean } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { getEditedEntityRecord, hasFinishedResolution } =
|
const { getEditedEntityRecord, hasFinishedResolution } =
|
||||||
select( 'core' );
|
select( 'core' );
|
||||||
const { name }: Product = getEditedEntityRecord(
|
const { name }: Product = getEditedEntityRecord(
|
||||||
|
|
|
@ -75,7 +75,8 @@ export function ProductDetailsSectionDescriptionBlockEdit( {
|
||||||
const productId = useEntityId( 'postType', 'product' );
|
const productId = useEntityId( 'postType', 'product' );
|
||||||
|
|
||||||
const { validate } = useValidations< Product >();
|
const { validate } = useValidations< Product >();
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { editEntityRecord, saveEditedEntityRecord, saveEntityRecord } =
|
const { editEntityRecord, saveEditedEntityRecord, saveEntityRecord } =
|
||||||
useDispatch( 'core' );
|
useDispatch( 'core' );
|
||||||
const { createSuccessNotice, createErrorNotice } =
|
const { createSuccessNotice, createErrorNotice } =
|
||||||
|
@ -94,7 +95,8 @@ export function ProductDetailsSectionDescriptionBlockEdit( {
|
||||||
|
|
||||||
const { isSaving } = useSelect(
|
const { isSaving } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { isSavingEntityRecord } = select( 'core' );
|
const { isSavingEntityRecord } = select( 'core' );
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -253,7 +255,8 @@ export function ProductDetailsSectionDescriptionBlockEdit( {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
// @ts-expect-error Expected 3 arguments, but got 4.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
{
|
{
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,9 @@ export function Header( {
|
||||||
{ enabled: productId !== -1 }
|
{ enabled: productId !== -1 }
|
||||||
);
|
);
|
||||||
|
|
||||||
const lastPersistedProduct = useSelect(
|
const lastPersistedProduct = useSelect< Product | null >(
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
( select ) => {
|
( select ) => {
|
||||||
const { getEntityRecord } = select( 'core' );
|
const { getEntityRecord } = select( 'core' );
|
||||||
return productId !== -1
|
return productId !== -1
|
||||||
|
@ -88,6 +90,8 @@ export function Header( {
|
||||||
} );
|
} );
|
||||||
}, [ sidebarWidth ] );
|
}, [ sidebarWidth ] );
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const isVariation = lastPersistedProduct?.parent_id > 0;
|
const isVariation = lastPersistedProduct?.parent_id > 0;
|
||||||
|
|
||||||
const selectedImage = isVariation ? product?.image : product?.images;
|
const selectedImage = isVariation ? product?.image : product?.images;
|
||||||
|
@ -222,6 +226,8 @@ export function Header( {
|
||||||
) : (
|
) : (
|
||||||
getHeaderTitle(
|
getHeaderTitle(
|
||||||
editedProductName,
|
editedProductName,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore - Arg is not typed correctly.
|
||||||
lastPersistedProduct?.name
|
lastPersistedProduct?.name
|
||||||
)
|
)
|
||||||
) }
|
) }
|
||||||
|
@ -235,12 +241,16 @@ export function Header( {
|
||||||
{ ! isVariation && (
|
{ ! isVariation && (
|
||||||
<SaveDraftButton
|
<SaveDraftButton
|
||||||
productType={ productType }
|
productType={ productType }
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore - Prop is not typed correctly.
|
||||||
productStatus={ lastPersistedProduct?.status }
|
productStatus={ lastPersistedProduct?.status }
|
||||||
/>
|
/>
|
||||||
) }
|
) }
|
||||||
|
|
||||||
<PreviewButton
|
<PreviewButton
|
||||||
productType={ productType }
|
productType={ productType }
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore - Prop is not typed correctly.
|
||||||
productStatus={ lastPersistedProduct?.status }
|
productStatus={ lastPersistedProduct?.status }
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,8 @@ export function usePreview( {
|
||||||
|
|
||||||
const { hasEdits, isDisabled } = useSelect(
|
const { hasEdits, isDisabled } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { hasEditsForEntityRecord, isSavingEntityRecord } =
|
const { hasEditsForEntityRecord, isSavingEntityRecord } =
|
||||||
select( 'core' );
|
select( 'core' );
|
||||||
const isSaving = isSavingEntityRecord< boolean >(
|
const isSaving = isSavingEntityRecord< boolean >(
|
||||||
|
@ -66,7 +67,8 @@ export function usePreview( {
|
||||||
|
|
||||||
const ariaDisabled = disabled || isDisabled || isValidating;
|
const ariaDisabled = disabled || isDisabled || isValidating;
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { editEntityRecord, saveEditedEntityRecord } = useDispatch( 'core' );
|
const { editEntityRecord, saveEditedEntityRecord } = useDispatch( 'core' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,7 +38,8 @@ export function useSaveDraft( {
|
||||||
|
|
||||||
const { hasEdits, isDisabled } = useSelect(
|
const { hasEdits, isDisabled } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { hasEditsForEntityRecord, isSavingEntityRecord } =
|
const { hasEditsForEntityRecord, isSavingEntityRecord } =
|
||||||
select( 'core' );
|
select( 'core' );
|
||||||
const isSaving = isSavingEntityRecord< boolean >(
|
const isSaving = isSavingEntityRecord< boolean >(
|
||||||
|
@ -67,7 +68,8 @@ export function useSaveDraft( {
|
||||||
( productStatus !== 'publish' && ! hasEdits ) ||
|
( productStatus !== 'publish' && ! hasEdits ) ||
|
||||||
isValidating;
|
isValidating;
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { editEntityRecord, saveEditedEntityRecord } = useDispatch( 'core' );
|
const { editEntityRecord, saveEditedEntityRecord } = useDispatch( 'core' );
|
||||||
|
|
||||||
async function saveDraft() {
|
async function saveDraft() {
|
||||||
|
|
|
@ -37,7 +37,8 @@ export function Tabs( { onChange = () => {} }: TabsProps ) {
|
||||||
'id'
|
'id'
|
||||||
);
|
);
|
||||||
const product: Product = useSelect( ( select ) =>
|
const product: Product = useSelect( ( select ) =>
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
select( 'core' ).getEditedEntityRecord(
|
select( 'core' ).getEditedEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
'product',
|
'product',
|
||||||
|
|
|
@ -277,7 +277,8 @@ export function useVariations( { productId }: UseVariationsProps ) {
|
||||||
{ product_id: productId, id: variationId },
|
{ product_id: productId, id: variationId },
|
||||||
variation
|
variation
|
||||||
).then( async ( response: ProductVariation ) => {
|
).then( async ( response: ProductVariation ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
||||||
'postType',
|
'postType',
|
||||||
'product_variation',
|
'product_variation',
|
||||||
|
@ -305,14 +306,16 @@ export function useVariations( { productId }: UseVariationsProps ) {
|
||||||
} ).then( async ( response: ProductVariation ) => {
|
} ).then( async ( response: ProductVariation ) => {
|
||||||
onSelect( response )( false );
|
onSelect( response )( false );
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
||||||
'postType',
|
'postType',
|
||||||
'product',
|
'product',
|
||||||
productId,
|
productId,
|
||||||
] );
|
] );
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
await dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
||||||
'postType',
|
'postType',
|
||||||
'product_variation',
|
'product_variation',
|
||||||
|
@ -331,7 +334,8 @@ export function useVariations( { productId }: UseVariationsProps ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onBatchUpdate( values: PartialProductVariation[] ) {
|
async function onBatchUpdate( values: PartialProductVariation[] ) {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { invalidateResolution: coreInvalidateResolution } =
|
const { invalidateResolution: coreInvalidateResolution } =
|
||||||
dispatch( 'core' );
|
dispatch( 'core' );
|
||||||
|
|
||||||
|
@ -399,7 +403,8 @@ export function useVariations( { productId }: UseVariationsProps ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onBatchDelete( values: PartialProductVariation[] ) {
|
async function onBatchDelete( values: PartialProductVariation[] ) {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { invalidateResolution: coreInvalidateResolution } =
|
const { invalidateResolution: coreInvalidateResolution } =
|
||||||
dispatch( 'core' );
|
dispatch( 'core' );
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ export function useConfirmUnsavedProductChanges(
|
||||||
const { hasEdits } = useProductEdits( productType );
|
const { hasEdits } = useProductEdits( productType );
|
||||||
const { isSaving } = useSelect(
|
const { isSaving } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { isSavingEntityRecord } = select( 'core' );
|
const { isSavingEntityRecord } = select( 'core' );
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -26,7 +26,8 @@ export function useProductEdits( productType = <string>'product' ) {
|
||||||
|
|
||||||
const { edits } = useSelect(
|
const { edits } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { getEntityRecordNonTransientEdits } = select( 'core' );
|
const { getEntityRecordNonTransientEdits } = select( 'core' );
|
||||||
|
|
||||||
const _edits = getEntityRecordNonTransientEdits(
|
const _edits = getEntityRecordNonTransientEdits(
|
||||||
|
|
|
@ -61,7 +61,8 @@ export function useProductManager< T = Product >( postType: string ) {
|
||||||
const { isValidating, validate } = useValidations< T >();
|
const { isValidating, validate } = useValidations< T >();
|
||||||
const { isDirty } = useSelect(
|
const { isDirty } = useSelect(
|
||||||
( select ) => ( {
|
( select ) => ( {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
isDirty: select( 'core' ).hasEditsForEntityRecord(
|
isDirty: select( 'core' ).hasEditsForEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
postType,
|
postType,
|
||||||
|
@ -78,8 +79,11 @@ export function useProductManager< T = Product >( postType: string ) {
|
||||||
await validate( extraProps );
|
await validate( extraProps );
|
||||||
const { saveEntityRecord } = dispatch( 'core' );
|
const { saveEntityRecord } = dispatch( 'core' );
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { blocks, content, selection, ...editedProduct } =
|
const { blocks, content, selection, ...editedProduct } =
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
wpSelect( 'core' ).getEntityRecordEdits(
|
wpSelect( 'core' ).getEntityRecordEdits(
|
||||||
'postType',
|
'postType',
|
||||||
postType,
|
postType,
|
||||||
|
@ -94,7 +98,8 @@ export function useProductManager< T = Product >( postType: string ) {
|
||||||
...extraProps,
|
...extraProps,
|
||||||
id,
|
id,
|
||||||
},
|
},
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
{
|
{
|
||||||
throwOnError: true,
|
throwOnError: true,
|
||||||
}
|
}
|
||||||
|
@ -148,7 +153,8 @@ export function useProductManager< T = Product >( postType: string ) {
|
||||||
|
|
||||||
await validate();
|
await validate();
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { deleteEntityRecord, saveEditedEntityRecord } =
|
const { deleteEntityRecord, saveEditedEntityRecord } =
|
||||||
dispatch( 'core' );
|
dispatch( 'core' );
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,14 @@ function useProductMetadata( options?: Options ) {
|
||||||
const thisId = useEntityId( 'postType', postType );
|
const thisId = useEntityId( 'postType', postType );
|
||||||
const id = options?.id || thisId;
|
const id = options?.id || thisId;
|
||||||
|
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { editEntityRecord } = useDispatch( 'core' );
|
const { editEntityRecord } = useDispatch( 'core' );
|
||||||
|
|
||||||
const { isLoading, meta_data } = useSelect(
|
const { isLoading, meta_data } = useSelect(
|
||||||
( select ) => {
|
( select ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { getEditedEntityRecord, hasFinishedResolution } =
|
const { getEditedEntityRecord, hasFinishedResolution } =
|
||||||
select( 'core' );
|
select( 'core' );
|
||||||
const { meta_data: metadata }: Product = getEditedEntityRecord(
|
const { meta_data: metadata }: Product = getEditedEntityRecord(
|
||||||
|
|
|
@ -112,7 +112,8 @@ export function useProductVariationsHelper() {
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
variations.map( ( variationId ) =>
|
variations.map( ( variationId ) =>
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
dispatch( 'core' ).invalidateResolution( 'getEntityRecord', [
|
||||||
'postType',
|
'postType',
|
||||||
'product_variation',
|
'product_variation',
|
||||||
|
@ -157,7 +158,8 @@ export function useProductVariationsHelper() {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.then( async ( response ) => {
|
.then( async ( response ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
await dispatch( 'core' ).invalidateResolution(
|
await dispatch( 'core' ).invalidateResolution(
|
||||||
'getEntityRecord',
|
'getEntityRecord',
|
||||||
[ 'postType', 'product', productId ]
|
[ 'postType', 'product', productId ]
|
||||||
|
|
|
@ -16,7 +16,8 @@ export function useVariationSwitcher( {
|
||||||
parentId,
|
parentId,
|
||||||
parentProductType,
|
parentProductType,
|
||||||
}: VariationSwitcherProps ) {
|
}: VariationSwitcherProps ) {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { invalidateResolution } = useDispatch( 'core' );
|
const { invalidateResolution } = useDispatch( 'core' );
|
||||||
const { invalidateResolutionForStoreSelector } = useDispatch(
|
const { invalidateResolutionForStoreSelector } = useDispatch(
|
||||||
EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME
|
EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME
|
||||||
|
@ -27,6 +28,8 @@ export function useVariationSwitcher( {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
const { getEntityRecord } = select( 'core' );
|
const { getEntityRecord } = select( 'core' );
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const parentProduct = getEntityRecord(
|
const parentProduct = getEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
parentProductType || 'product',
|
parentProductType || 'product',
|
||||||
|
@ -35,13 +38,19 @@ export function useVariationSwitcher( {
|
||||||
if (
|
if (
|
||||||
variationId !== undefined &&
|
variationId !== undefined &&
|
||||||
parentProduct &&
|
parentProduct &&
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
parentProduct.variations
|
parentProduct.variations
|
||||||
) {
|
) {
|
||||||
const activeVariationIndex =
|
const activeVariationIndex =
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
parentProduct.variations.indexOf( variationId );
|
parentProduct.variations.indexOf( variationId );
|
||||||
const previousVariationIndex =
|
const previousVariationIndex =
|
||||||
activeVariationIndex > 0 ? activeVariationIndex - 1 : null;
|
activeVariationIndex > 0 ? activeVariationIndex - 1 : null;
|
||||||
const nextVariationIndex =
|
const nextVariationIndex =
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
activeVariationIndex !== parentProduct.variations.length - 1
|
activeVariationIndex !== parentProduct.variations.length - 1
|
||||||
? activeVariationIndex + 1
|
? activeVariationIndex + 1
|
||||||
: null;
|
: null;
|
||||||
|
@ -50,14 +59,20 @@ export function useVariationSwitcher( {
|
||||||
activeVariationIndex,
|
activeVariationIndex,
|
||||||
nextVariationIndex,
|
nextVariationIndex,
|
||||||
previousVariationIndex,
|
previousVariationIndex,
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
numberOfVariations: parentProduct.variations.length,
|
numberOfVariations: parentProduct.variations.length,
|
||||||
previousVariationId:
|
previousVariationId:
|
||||||
previousVariationIndex !== null
|
previousVariationIndex !== null
|
||||||
? parentProduct.variations[ previousVariationIndex ]
|
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
|
parentProduct.variations[ previousVariationIndex ]
|
||||||
: null,
|
: null,
|
||||||
nextVariationId:
|
nextVariationId:
|
||||||
nextVariationIndex !== null
|
nextVariationIndex !== null
|
||||||
? parentProduct.variations[ nextVariationIndex ]
|
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
|
parentProduct.variations[ nextVariationIndex ]
|
||||||
: null,
|
: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,15 @@ export default async function getRelatedProducts(
|
||||||
options: getRelatedProductsOptions = {}
|
options: getRelatedProductsOptions = {}
|
||||||
): Promise< Product[] | undefined > {
|
): Promise< Product[] | undefined > {
|
||||||
const { getEntityRecord } = select( 'core' );
|
const { getEntityRecord } = select( 'core' );
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const product = getEntityRecord( 'postType', 'product', productId );
|
const product = getEntityRecord( 'postType', 'product', productId );
|
||||||
if ( ! product ) {
|
if ( ! product ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
let relatedProductIds = product?.related_ids;
|
let relatedProductIds = product?.related_ids;
|
||||||
if ( ! relatedProductIds?.length ) {
|
if ( ! relatedProductIds?.length ) {
|
||||||
if ( ! options?.fallbackToRandomProducts ) {
|
if ( ! options?.fallbackToRandomProducts ) {
|
||||||
|
@ -80,6 +84,7 @@ type getSuggestedProductsForOptions = {
|
||||||
/**
|
/**
|
||||||
* Get suggested products for a given post ID.
|
* Get suggested products for a given post ID.
|
||||||
*
|
*
|
||||||
|
*
|
||||||
* @param { getSuggestedProductsForOptions } options - Options.
|
* @param { getSuggestedProductsForOptions } options - Options.
|
||||||
* @return { Promise<Product[] | undefined> } Suggested products.
|
* @return { Promise<Product[] | undefined> } Suggested products.
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +94,8 @@ export async function getSuggestedProductsFor( {
|
||||||
forceRequest = false,
|
forceRequest = false,
|
||||||
exclude = [],
|
exclude = [],
|
||||||
}: getSuggestedProductsForOptions ): Promise< Product[] | undefined > {
|
}: getSuggestedProductsForOptions ): Promise< Product[] | undefined > {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const { getEditedEntityRecord } = select( 'core' );
|
const { getEditedEntityRecord } = select( 'core' );
|
||||||
|
|
||||||
const data: Product = getEditedEntityRecord( 'postType', postType, postId );
|
const data: Product = getEditedEntityRecord( 'postType', postType, postId );
|
||||||
|
|
|
@ -21,7 +21,8 @@ export function useEvaluationContext( context: Record< string, unknown > ) {
|
||||||
const productId = useEntityId( 'postType', postType );
|
const productId = useEntityId( 'postType', postType );
|
||||||
|
|
||||||
const getEvaluationContext = ( select: typeof WPSelect ) => {
|
const getEvaluationContext = ( select: typeof WPSelect ) => {
|
||||||
// @ts-expect-error There are no types for this.
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
const editedProduct = select( 'core' ).getEditedEntityRecord(
|
const editedProduct = select( 'core' ).getEditedEntityRecord(
|
||||||
'postType',
|
'postType',
|
||||||
postType,
|
postType,
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
* External dependencies
|
* External dependencies
|
||||||
*/
|
*/
|
||||||
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
|
const CopyWebpackPlugin = require( 'copy-webpack-plugin' );
|
||||||
const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
|
|
||||||
const path = require( 'path' );
|
const path = require( 'path' );
|
||||||
const RemoveEmptyScriptsPlugin = require( 'webpack-remove-empty-scripts' );
|
const RemoveEmptyScriptsPlugin = require( 'webpack-remove-empty-scripts' );
|
||||||
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
|
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
|
||||||
|
@ -12,6 +11,7 @@ const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
|
||||||
*/
|
*/
|
||||||
const {
|
const {
|
||||||
webpackConfig,
|
webpackConfig,
|
||||||
|
plugin,
|
||||||
StyleAssetPlugin,
|
StyleAssetPlugin,
|
||||||
} = require( '@woocommerce/internal-style-build' );
|
} = require( '@woocommerce/internal-style-build' );
|
||||||
const {
|
const {
|
||||||
|
@ -37,7 +37,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new RemoveEmptyScriptsPlugin(),
|
new RemoveEmptyScriptsPlugin(),
|
||||||
new MiniCssExtractPlugin( {
|
new plugin( {
|
||||||
filename: ( data ) => {
|
filename: ( data ) => {
|
||||||
return data.chunk.name.startsWith( '/build/blocks' )
|
return data.chunk.name.startsWith( '/build/blocks' )
|
||||||
? `[name].css`
|
? `[name].css`
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -94,7 +94,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.php": [
|
"*.php": [
|
||||||
|
|
|
@ -229,6 +229,8 @@ export const NoAIBanner = ( {
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentTheme = useSelect( ( select ) => {
|
const currentTheme = useSelect( ( select ) => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
return select( 'core' ).getCurrentTheme() as Theme;
|
return select( 'core' ).getCurrentTheme() as Theme;
|
||||||
}, [] );
|
}, [] );
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ export const useSiteVisibilityTour = () => {
|
||||||
|
|
||||||
const { getCurrentUser } = select( 'core' );
|
const { getCurrentUser } = select( 'core' );
|
||||||
const wasTourShown =
|
const wasTourShown =
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
( getCurrentUser() as { meta?: { [ key: string ]: string } } )
|
( getCurrentUser() as { meta?: { [ key: string ]: string } } )
|
||||||
?.meta?.[ LYS_TOUR_HIDDEN ] === 'yes';
|
?.meta?.[ LYS_TOUR_HIDDEN ] === 'yes';
|
||||||
|
|
||||||
|
@ -30,6 +32,8 @@ export const useSiteVisibilityTour = () => {
|
||||||
} );
|
} );
|
||||||
|
|
||||||
const onClose = () => {
|
const onClose = () => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
dispatch( 'core' ).saveUser( {
|
dispatch( 'core' ).saveUser( {
|
||||||
id: window?.wcSettings?.currentUserId,
|
id: window?.wcSettings?.currentUserId,
|
||||||
meta: {
|
meta: {
|
||||||
|
|
|
@ -62,6 +62,8 @@ export default function Products( props: ProductsProps ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentTheme = useSelect( ( select ) => {
|
const currentTheme = useSelect( ( select ) => {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
return select( 'core' ).getCurrentTheme() as Theme;
|
return select( 'core' ).getCurrentTheme() as Theme;
|
||||||
}, [] );
|
}, [] );
|
||||||
const isDefaultTheme = currentTheme?.stylesheet === 'twentytwentyfour';
|
const isDefaultTheme = currentTheme?.stylesheet === 'twentytwentyfour';
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"ci": {
|
"ci": {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -89,7 +89,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.php": [
|
"*.php": [
|
||||||
|
|
|
@ -273,7 +273,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ariakit/react": "^0.4.4",
|
"@ariakit/react": "^0.4.4",
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
|
||||||
|
Update pnpm to 9.1.0
|
|
@ -368,7 +368,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 0.1%",
|
"> 0.1%",
|
||||||
|
|
53564
pnpm-lock.yaml
53564
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -39,7 +39,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"ci": {
|
"ci": {
|
||||||
|
|
|
@ -1,17 +1,34 @@
|
||||||
const packageJson = require( '../../package.json' );
|
const path = require( 'path' );
|
||||||
let pnpm_package = 'pnpm';
|
|
||||||
|
|
||||||
if ( packageJson.engines.pnpm ) {
|
const getPnpmPackage = ( sourceDir ) => {
|
||||||
|
const packageJson = require( path.join( sourceDir, 'package.json' ) );
|
||||||
|
let pnpm_package = 'pnpm';
|
||||||
|
|
||||||
|
if ( packageJson.engines.pnpm ) {
|
||||||
pnpm_package = `pnpm@${ packageJson.engines.pnpm }`;
|
pnpm_package = `pnpm@${ packageJson.engines.pnpm }`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return pnpm_package;
|
||||||
|
};
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
gitRepositoryURL: 'https://github.com/woocommerce/woocommerce.git',
|
gitRepositoryURL: 'https://github.com/woocommerce/woocommerce.git',
|
||||||
setupTestRunner: `npm install -g ${ pnpm_package } && pnpm install --filter="@woocommerce/plugin-woocommerce" &> /dev/null && cd plugins/woocommerce && pnpm exec playwright install chromium`,
|
|
||||||
setupCommand: `npm install -g ${ pnpm_package } && pnpm install &> /dev/null && pnpm build &> /dev/null`,
|
|
||||||
pluginPath: '/plugins/woocommerce',
|
pluginPath: '/plugins/woocommerce',
|
||||||
testsPath: '/plugins/woocommerce/tests/metrics/specs',
|
testsPath: '/plugins/woocommerce/tests/metrics/specs',
|
||||||
testCommand: `npm install -g ${ pnpm_package } && cd plugins/woocommerce && pnpm test:metrics`,
|
getSetupTestRunner: ( sourceDir ) => {
|
||||||
|
const pnpm_package = getPnpmPackage( sourceDir );
|
||||||
|
|
||||||
|
return `npm install -g ${ pnpm_package } && pnpm install --filter="@woocommerce/plugin-woocommerce" &> /dev/null && cd plugins/woocommerce && pnpm exec playwright install chromium`;
|
||||||
|
},
|
||||||
|
getSetupCommand: ( sourceDir ) => {
|
||||||
|
const pnpm_package = getPnpmPackage( sourceDir );
|
||||||
|
|
||||||
|
return `npm install -g ${ pnpm_package } && pnpm install &> /dev/null && pnpm build &> /dev/null`;
|
||||||
|
},
|
||||||
|
getTestCommand: ( sourceDir ) => {
|
||||||
|
const pnpm_package = getPnpmPackage( sourceDir );
|
||||||
|
return `npm install -g ${ pnpm_package } && cd plugins/woocommerce && pnpm test:metrics`;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = config;
|
module.exports = config;
|
||||||
|
|
|
@ -19,6 +19,6 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ function median( array ) {
|
||||||
*/
|
*/
|
||||||
async function runTestSuite( testSuite, testRunnerDir, runKey ) {
|
async function runTestSuite( testSuite, testRunnerDir, runKey ) {
|
||||||
await runShellScript(
|
await runShellScript(
|
||||||
`${ config.testCommand } ${ testSuite }`,
|
`${ config.getTestCommand( testRunnerDir ) } ${ testSuite }`,
|
||||||
testRunnerDir,
|
testRunnerDir,
|
||||||
{
|
{
|
||||||
...process.env,
|
...process.env,
|
||||||
|
@ -211,7 +211,9 @@ async function runPerformanceTests( branches, options ) {
|
||||||
|
|
||||||
logAtIndent( 2, 'Installing dependencies and building' );
|
logAtIndent( 2, 'Installing dependencies and building' );
|
||||||
await runShellScript(
|
await runShellScript(
|
||||||
`bash -c "source $HOME/.nvm/nvm.sh && nvm install && ${ config.setupTestRunner }"`,
|
`bash -c "source $HOME/.nvm/nvm.sh && nvm install && ${ config.getSetupTestRunner(
|
||||||
|
testRunnerDir
|
||||||
|
) }"`,
|
||||||
testRunnerDir
|
testRunnerDir
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -252,7 +254,9 @@ async function runPerformanceTests( branches, options ) {
|
||||||
|
|
||||||
logAtIndent( 3, 'Installing dependencies and building' );
|
logAtIndent( 3, 'Installing dependencies and building' );
|
||||||
await runShellScript(
|
await runShellScript(
|
||||||
`bash -c "source $HOME/.nvm/nvm.sh && nvm install && ${ config.setupCommand }"`,
|
`bash -c "source $HOME/.nvm/nvm.sh && nvm install && ${ config.getSetupCommand(
|
||||||
|
buildDir
|
||||||
|
) }"`,
|
||||||
buildDir
|
buildDir
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"config": {
|
"config": {
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"ci": {
|
"ci": {
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"config": {
|
"config": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tsconfig/node16": "^1.0.4",
|
"@tsconfig/node16": "^1.0.4",
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.11.1",
|
"node": "^20.11.1",
|
||||||
"pnpm": "^8.12.1"
|
"pnpm": "^9.1.0"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/woocommerce/woocommerce/issues"
|
"url": "https://github.com/woocommerce/woocommerce/issues"
|
||||||
|
|
Loading…
Reference in New Issue