Regenerate PNPM Lock File & Fix Errors (#41830)

This commit is contained in:
Christopher Allford 2023-12-05 00:36:30 -08:00 committed by GitHub
parent d57b9e1d05
commit 88969742f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 12853 additions and 16838 deletions

View File

@ -26,7 +26,7 @@ jobs:
- uses: './.github/actions/setup-woocommerce-monorepo' - uses: './.github/actions/setup-woocommerce-monorepo'
name: 'Setup Monorepo' name: 'Setup Monorepo'
with: with:
install: false install: true
- uses: actions/github-script@v6 - uses: actions/github-script@v6
id: 'project-matrix' id: 'project-matrix'
name: 'Build Matrix' name: 'Build Matrix'
@ -46,6 +46,7 @@ jobs:
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
needs: 'project-matrix' needs: 'project-matrix'
if: ${{ needs.project-matrix.outputs.matrix != '[]' }} if: ${{ needs.project-matrix.outputs.matrix != '[]' }}
timeout-minutes: 30
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -42,9 +42,6 @@
"dependencies": [ "dependencies": [
"@types/react" "@types/react"
], ],
"dependencyTypes": [
"devDependencies"
],
"pinVersion": "^17.0.2", "pinVersion": "^17.0.2",
"packages": [ "packages": [
"**" "**"
@ -61,7 +58,9 @@
}, },
{ {
"dependencies": [ "dependencies": [
"@types/react",
"react", "react",
"@types/react-dom",
"react-dom" "react-dom"
], ],
"packages": [ "packages": [
@ -82,9 +81,6 @@
"dependencies": [ "dependencies": [
"eslint" "eslint"
], ],
"dependencyTypes": [
"devDependencies"
],
"packages": [ "packages": [
"**" "**"
], ],
@ -183,9 +179,6 @@
"dependencies": [ "dependencies": [
"postcss-loader" "postcss-loader"
], ],
"dependencyTypes": [
"devDependencies"
],
"packages": [ "packages": [
"**" "**"
], ],
@ -209,6 +202,28 @@
], ],
"pinVersion": "^16.18.18" "pinVersion": "^16.18.18"
}, },
{
"dependencies": [
"jest",
"jest-cli",
"jest-environment-jsdom",
"jest-environment-node",
"babel-jest"
],
"packages": [
"**"
],
"pinVersion": "~27.5.1"
},
{
"dependencies": [
"ts-jest"
],
"packages": [
"**"
],
"pinVersion": "~29.1.1"
},
{ {
"label": "Only manage versions for these dependencies", "label": "Only manage versions for these dependencies",
"dependencies": [ "dependencies": [

View File

@ -47,7 +47,7 @@
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"glob": "^7.2.3", "glob": "^7.2.3",
"husky": "^7.0.4", "husky": "^7.0.4",
"jest": "^27.5.1", "jest": "~27.5.1",
"lint-staged": "^12.5.0", "lint-staged": "^12.5.0",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"moment": "^2.29.4", "moment": "^2.29.4",
@ -74,7 +74,8 @@
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"react": "^17.0.2" "react": "^17.0.2",
"react-resize-aware": "3.1.1"
} }
} }
} }

View File

@ -45,11 +45,11 @@
"@woocommerce/api": "^0.2.0", "@woocommerce/api": "^0.2.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"jest-mock-extended": "^1.0.18", "jest-mock-extended": "^1.0.18",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"publishConfig": { "publishConfig": {

View File

@ -49,14 +49,14 @@
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -34,21 +34,21 @@
"debug": "^4.3.3", "debug": "^4.3.3",
"dompurify": "^2.3.6", "dompurify": "^2.3.6",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-router-dom": "^6.3.0" "react-router-dom": "~6.3.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.21.3",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "13.5.0",
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/dompurify": "^2.3.3", "@types/dompurify": "^2.3.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__core-data": "^2.4.5", "@types/wordpress__core-data": "2.4.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
@ -57,8 +57,8 @@
"copy-webpack-plugin": "^9.1.0", "copy-webpack-plugin": "^9.1.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
@ -66,7 +66,7 @@
"react-hooks^8.0.1": "link:@testing-library/react-hooks^8.0.1", "react-hooks^8.0.1": "link:@testing-library/react-hooks^8.0.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -28,7 +28,7 @@
"dependencies": { "dependencies": {
"allure-commandline": "^2.17.2", "allure-commandline": "^2.17.2",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-allure": "^0.1.3", "jest-allure": "^0.1.3",
"jest-runner-groups": "^2.1.0", "jest-runner-groups": "^2.1.0",
"postman-collection": "^4.1.0", "postman-collection": "^4.1.0",

View File

@ -57,8 +57,8 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"axios-mock-adapter": "^1.20.0", "axios-mock-adapter": "^1.20.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27", "jest": "~27.5.1",
"ts-jest": "^27", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"publishConfig": { "publishConfig": {

View File

@ -37,13 +37,13 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.21.3",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "8.0.1",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__block-editor": "^7.0.0", "@types/wordpress__block-editor": "7.0.0",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "11.0.7",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
@ -51,15 +51,15 @@
"copy-webpack-plugin": "^9.1.0", "copy-webpack-plugin": "^9.1.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -33,11 +33,11 @@
"@automattic/calypso-color-schemes": "^2.1.1", "@automattic/calypso-color-schemes": "^2.1.1",
"@automattic/interpolate-components": "^1.2.0", "@automattic/interpolate-components": "^1.2.0",
"@automattic/tour-kit": "^1.1.1", "@automattic/tour-kit": "^1.1.1",
"@types/wordpress__block-editor": "^7.0.0", "@types/wordpress__block-editor": "7.0.0",
"@types/wordpress__block-library": "^2.6.1", "@types/wordpress__block-library": "2.6.1",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "11.0.7",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__rich-text": "^3.4.6", "@types/wordpress__rich-text": "3.4.6",
"@woocommerce/csv-export": "workspace:*", "@woocommerce/csv-export": "workspace:*",
"@woocommerce/currency": "workspace:*", "@woocommerce/currency": "workspace:*",
"@woocommerce/data": "workspace:*", "@woocommerce/data": "workspace:*",
@ -112,35 +112,36 @@
"@storybook/core-events": "^6.5.17-alpha.0", "@storybook/core-events": "^6.5.17-alpha.0",
"@storybook/react": "^6.5.17-alpha.0", "@storybook/react": "^6.5.17-alpha.0",
"@storybook/theming": "^6.5.17-alpha.0", "@storybook/theming": "^6.5.17-alpha.0",
"@testing-library/dom": "^8.11.3", "@testing-library/dom": "8.11.3",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "13.5.0",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/lodash": "^4.14.184", "@types/lodash": "^4.14.184",
"@types/prop-types": "^15.7.4", "@types/prop-types": "^15.7.4",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__media-utils": "^3.0.0", "@types/wordpress__media-utils": "3.0.0",
"@types/wordpress__viewport": "^2.5.4", "@types/wordpress__viewport": "2.5.4",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
"@wordpress/babel-preset-default": "^6.5.1",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"uuid": "^8.3.0", "uuid": "^8.3.0",
"webpack": "^5.70.0", "webpack": "^5.70.0",
@ -169,13 +170,5 @@
"pnpm lint:fix", "pnpm lint:fix",
"pnpm test-staged" "pnpm test-staged"
] ]
},
"pnpm": {
"overrides": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
}
} }
} }

View File

@ -143,8 +143,7 @@ export const DateTimePickerControl = forwardRef(
const formatDateTimeForDisplay = useCallback( const formatDateTimeForDisplay = useCallback(
( dateTime: Moment ) => { ( dateTime: Moment ) => {
return dateTime.isValid() return dateTime.isValid()
? // @ts-expect-error TODO - fix this type error with moment ? formatDate( displayFormat, dateTime.local() )
formatDate( displayFormat, dateTime.local() )
: dateTime.creationData().input?.toString() || ''; : dateTime.creationData().input?.toString() || '';
}, },
[ displayFormat ] [ displayFormat ]

View File

@ -103,7 +103,6 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default24HourDateTimeFormat, dateTime ) formatDate( default24HourDateTimeFormat, dateTime )
); );
} ); } );
@ -123,7 +122,6 @@ describe( 'DateTimePickerControl', () => {
expect( input?.value ).toBe( expect( input?.value ).toBe(
formatDate( formatDate(
default24HourDateTimeFormat, default24HourDateTimeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment.utc( ambiguousISODateTimeString ).local() moment.utc( ambiguousISODateTimeString ).local()
) )
); );
@ -144,7 +142,6 @@ describe( 'DateTimePickerControl', () => {
expect( input?.value ).toBe( expect( input?.value ).toBe(
formatDate( formatDate(
default24HourDateTimeFormat, default24HourDateTimeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment.utc( unambiguousISODateTimeString ).local() moment.utc( unambiguousISODateTimeString ).local()
) )
); );
@ -162,7 +159,6 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default12HourDateTimeFormat, dateTime ) formatDate( default12HourDateTimeFormat, dateTime )
); );
} ); } );
@ -179,7 +175,6 @@ describe( 'DateTimePickerControl', () => {
); );
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
// @ts-expect-error TODO - fix this type error with moment
expect( input?.value ).toBe( formatDate( dateTimeFormat, dateTime ) ); expect( input?.value ).toBe( formatDate( dateTimeFormat, dateTime ) );
} ); } );
@ -203,7 +198,6 @@ describe( 'DateTimePickerControl', () => {
const input = container.querySelector( 'input' ); const input = container.querySelector( 'input' );
expect( input?.value ).toBe( expect( input?.value ).toBe(
// @ts-expect-error TODO - fix this type error with moment
formatDate( default24HourDateTimeFormat, updatedDateTime ) formatDate( default24HourDateTimeFormat, updatedDateTime )
); );
} ); } );

View File

@ -184,7 +184,7 @@ function SelectControl< ItemType = DefaultItemType >( {
highlightedIndex, highlightedIndex,
getItemProps, getItemProps,
selectItem, selectItem,
// @ts-expect-error - TODO fix this type. // @ts-expect-error We're allowed to use the property.
selectedItem: comboboxSingleSelectedItem, selectedItem: comboboxSingleSelectedItem,
openMenu, openMenu,
closeMenu, closeMenu,
@ -208,7 +208,7 @@ function SelectControl< ItemType = DefaultItemType >( {
onInputChange( value, changes ); onInputChange( value, changes );
} }
}, },
// @ts-expect-error - TODO fix this type. // @ts-expect-error We're allowed to use the property.
stateReducer: ( state, actionAndChanges ) => { stateReducer: ( state, actionAndChanges ) => {
const { changes, type } = actionAndChanges; const { changes, type } = actionAndChanges;
let newChanges; let newChanges;

View File

@ -21,7 +21,7 @@ export default () => {
> >
<mask <mask
id={ maskId } id={ maskId }
mask-type="alpha" style={ { maskType: 'alpha' } }
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="2" x="2"
y="3" y="3"

View File

@ -54,11 +54,11 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -57,11 +57,11 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -41,12 +41,12 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/prop-types": "^15.7.4", "@types/prop-types": "^15.7.4",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@woocommerce/data": "workspace:*", "@woocommerce/data": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
@ -57,13 +57,13 @@
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -50,27 +50,27 @@
"@automattic/data-stores": "^2.0.1", "@automattic/data-stores": "^2.0.1",
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/react-hooks": "^7.0.2", "@testing-library/react-hooks": "7.0.2",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/md5": "^2.3.2", "@types/md5": "^2.3.2",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/node": "^16.18.18", "@types/node": "^16.18.18",
"@types/wordpress__compose": "^4.0.1", "@types/wordpress__compose": "4.0.1",
"@types/wordpress__core-data": "^2.4.5", "@types/wordpress__core-data": "2.4.5",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__data-controls": "^2.2.0", "@types/wordpress__data-controls": "~2.2.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"redux": "^4.1.0", "redux": "^4.1.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -43,11 +43,11 @@
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"d3-time-format": "^2.3.0", "d3-time-format": "^2.3.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -31,10 +31,10 @@
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -34,7 +34,7 @@
"app-root-path": "^3.0.0", "app-root-path": "^3.0.0",
"commander": "4.1.1", "commander": "4.1.1",
"config": "3.3.7", "config": "3.3.7",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-circus": "27.5.1", "jest-circus": "27.5.1",
"jest-each": "27.5.1", "jest-each": "27.5.1",
"jest-puppeteer": "^5.0.4", "jest-puppeteer": "^5.0.4",

View File

@ -49,10 +49,10 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -52,9 +52,9 @@
"@storybook/addon-actions": "^6.5.17-alpha.0", "@storybook/addon-actions": "^6.5.17-alpha.0",
"@storybook/addon-console": "^1.2.3", "@storybook/addon-console": "^1.2.3",
"@storybook/react": "^6.5.17-alpha.0", "@storybook/react": "^6.5.17-alpha.0",
"@testing-library/dom": "^8.11.3", "@testing-library/dom": "8.11.3",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "13.5.0",
"@types/dompurify": "^2.3.3", "@types/dompurify": "^2.3.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/react-transition-group": "^4.4.4", "@types/react-transition-group": "^4.4.4",
@ -67,13 +67,13 @@
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -47,11 +47,11 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"scripts": { "scripts": {

View File

@ -54,10 +54,10 @@
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -42,8 +42,8 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.21.3",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "8.0.1",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/node": "^16.18.18", "@types/node": "^16.18.18",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
@ -53,10 +53,10 @@
"copy-webpack-plugin": "^9.1.0", "copy-webpack-plugin": "^9.1.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -34,6 +34,8 @@ module.exports = {
__dirname, __dirname,
'build/mocks/style-mock.js' 'build/mocks/style-mock.js'
), ),
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
"uuid": require.resolve('uuid'),
}, },
restoreMocks: true, restoreMocks: true,
setupFiles: [ setupFiles: [

View File

@ -30,8 +30,8 @@
"lint:fix": "eslint src --fix" "lint:fix": "eslint src --fix"
}, },
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
"@wordpress/i18n": "wp-6.0", "@wordpress/i18n": "wp-6.0",
"@wordpress/jest-console": "^5.0.1", "@wordpress/jest-console": "^5.0.1",
@ -41,12 +41,12 @@
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"resize-observer-polyfill": "1.5.1", "resize-observer-polyfill": "1.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"babel-jest": "^27.5.1", "babel-jest": "~27.5.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -41,10 +41,10 @@
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0" "webpack": "^5.70.0"
}, },

View File

@ -36,7 +36,7 @@
"@wordpress/url": "wp-6.0", "@wordpress/url": "wp-6.0",
"history": "^5.3.0", "history": "^5.3.0",
"qs": "^6.10.3", "qs": "^6.10.3",
"react-router-dom": "^6.3.0" "react-router-dom": "~6.3.0"
}, },
"peerDependencies": { "peerDependencies": {
"lodash": "^4.17.0" "lodash": "^4.17.0"
@ -67,11 +67,11 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -168,7 +168,6 @@ export const addHistoryListener = ( listener ) => {
if ( ! window.wcNavigation.historyPatched ) { if ( ! window.wcNavigation.historyPatched ) {
( ( history ) => { ( ( history ) => {
/* global CustomEvent */
const pushState = history.pushState; const pushState = history.pushState;
const replaceState = history.replaceState; const replaceState = history.replaceState;
history.pushState = function ( state ) { history.pushState = function ( state ) {

View File

@ -53,16 +53,16 @@
"@automattic/data-stores": "^2.0.1", "@automattic/data-stores": "^2.0.1",
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__notices": "^3.5.0", "@types/wordpress__notices": "3.5.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -53,11 +53,11 @@
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -44,12 +44,12 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@storybook/addon-knobs": "^7.0.2", "@storybook/addon-knobs": "^7.0.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/string-similarity": "4.0.0", "@types/string-similarity": "4.0.0",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
@ -57,13 +57,13 @@
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -30,7 +30,7 @@
"dependencies": { "dependencies": {
"@types/lodash": "^4.14.179", "@types/lodash": "^4.14.179",
"@types/prop-types": "^15.7.4", "@types/prop-types": "^15.7.4",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "11.0.7",
"@woocommerce/admin-layout": "workspace:*", "@woocommerce/admin-layout": "workspace:*",
"@woocommerce/block-templates": "workspace:*", "@woocommerce/block-templates": "workspace:*",
"@woocommerce/components": "workspace:*", "@woocommerce/components": "workspace:*",
@ -68,32 +68,32 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"moment": "^2.29.4", "moment": "^2.29.4",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-router-dom": "^6.3.0" "react-router-dom": "~6.3.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.21.3", "@babel/core": "^7.21.3",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/react-hooks": "^8.0.1", "@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "13.5.0",
"@types/dompurify": "^2.3.3", "@types/dompurify": "^2.3.3",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__block-editor": "^7.0.0", "@types/wordpress__block-editor": "7.0.0",
"@types/wordpress__block-library": "^2.6.1", "@types/wordpress__block-library": "2.6.1",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "11.0.7",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__core-data": "^2.4.5", "@types/wordpress__core-data": "2.4.5",
"@types/wordpress__data": "^6.0.2", "@types/wordpress__data": "6.0.2",
"@types/wordpress__date": "^3.3.2", "@types/wordpress__date": "3.3.2",
"@types/wordpress__editor": "^13.0.0", "@types/wordpress__editor": "13.0.0",
"@types/wordpress__edit-post": "^7.5.4", "@types/wordpress__edit-post": "7.5.4",
"@types/wordpress__keycodes": "^2.3.1", "@types/wordpress__keycodes": "2.3.1",
"@types/wordpress__media-utils": "^3.0.0", "@types/wordpress__media-utils": "3.0.0",
"@types/wordpress__plugins": "^3.0.0", "@types/wordpress__plugins": "3.0.0",
"@types/wordpress__rich-text": "^3.4.6", "@types/wordpress__rich-text": "3.4.6",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
@ -103,15 +103,15 @@
"copy-webpack-plugin": "^9.1.0", "copy-webpack-plugin": "^9.1.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"postcss": "^8.4.7", "postcss": "^8.4.7",
"postcss-loader": "^4.3.0", "postcss-loader": "^4.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12"

View File

@ -107,6 +107,8 @@ export function Edit( {
<ToggleControl <ToggleControl
label={ label } label={ label }
checked={ isChecked() } checked={ isChecked() }
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore disabled prop exists
disabled={ disabled } disabled={ disabled }
onChange={ handleChange } onChange={ handleChange }
help={ help } help={ help }

View File

@ -143,6 +143,8 @@ export function Edit( {
label={ __( 'Schedule sale', 'woocommerce' ) } label={ __( 'Schedule sale', 'woocommerce' ) }
checked={ showScheduleSale } checked={ showScheduleSale }
onChange={ handleToggleChange } onChange={ handleToggleChange }
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore disabled prop exists
disabled={ ! isSalePriceGreaterThanZero } disabled={ ! isSalePriceGreaterThanZero }
/> />

View File

@ -47,11 +47,11 @@
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-cli": "^27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {

View File

@ -247,6 +247,8 @@ function ScaledBlockPreview( {
> >
<CustomIframeComponent <CustomIframeComponent
aria-hidden aria-hidden
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore disabled prop exists
scrolling={ isScrollable ? 'yes' : 'no' } scrolling={ isScrollable ? 'yes' : 'no' }
tabIndex={ -1 } tabIndex={ -1 }
readonly={ ! isNavigable } readonly={ ! isNavigable }

View File

@ -8,7 +8,7 @@ export default () => (
> >
<mask <mask
id="mask0" id="mask0"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="1" x="1"
y="1" y="1"

View File

@ -10,6 +10,13 @@ import { recordPageView } from '@woocommerce/tracks';
import { updateLinkHref } from '../controller'; import { updateLinkHref } from '../controller';
import { EmbedLayout } from '../index'; import { EmbedLayout } from '../index';
jest.mock( '@woocommerce/admin-layout', () => {
return {
LayoutContextProvider: () => null,
getLayoutContextValue: () => null,
};
} );
describe( 'updateLinkHref', () => { describe( 'updateLinkHref', () => {
const timeExcludedScreens = [ 'stock', 'settings', 'customers' ]; const timeExcludedScreens = [ 'stock', 'settings', 'customers' ];

View File

@ -140,7 +140,6 @@ export const PricingSaleField: React.FC< PricingListFieldProps > = ( {
<span> <span>
{ formatDate( { formatDate(
timeFormat, timeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment().startOf( 'day' ) moment().startOf( 'day' )
) } ) }
</span> </span>
@ -149,7 +148,6 @@ export const PricingSaleField: React.FC< PricingListFieldProps > = ( {
<span> <span>
{ formatDate( { formatDate(
timeFormat, timeFormat,
// @ts-expect-error TODO - fix this type error with moment
moment().endOf( 'day' ) moment().endOf( 'day' )
) } ) }
</span> </span>

View File

@ -8,7 +8,6 @@ export const RegionPicker = ( { options, initialValues } ) => {
const [ selected, setSelected ] = useState( initialValues ); const [ selected, setSelected ] = useState( initialValues );
const onChange = ( value ) => { const onChange = ( value ) => {
document.body.dispatchEvent( document.body.dispatchEvent(
/* global CustomEvent */
new CustomEvent( 'wc_region_picker_update', { detail: value } ) new CustomEvent( 'wc_region_picker_update', { detail: value } )
); );
setSelected( value ); setSelected( value );

View File

@ -55,7 +55,7 @@
"@automattic/interpolate-components": "^1.2.0", "@automattic/interpolate-components": "^1.2.0",
"@automattic/components": "^2.0.1", "@automattic/components": "^2.0.1",
"@react-spring/web": "^9.4.3", "@react-spring/web": "^9.4.3",
"@types/wordpress__blocks": "^11.0.7", "@types/wordpress__blocks": "11.0.7",
"@woocommerce/api": "^0.2.0", "@woocommerce/api": "^0.2.0",
"@wordpress/a11y": "wp-6.0", "@wordpress/a11y": "wp-6.0",
"@wordpress/api-fetch": "wp-6.0", "@wordpress/api-fetch": "wp-6.0",
@ -100,7 +100,7 @@
"qs": "^6.10.3", "qs": "^6.10.3",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-router-dom": "^6.3.0", "react-router-dom": "~6.3.0",
"react-transition-group": "^4.4.2", "react-transition-group": "^4.4.2",
"react-visibility-sensor": "^5.1.1", "react-visibility-sensor": "^5.1.1",
"redux": "^4.1.2", "redux": "^4.1.2",
@ -121,11 +121,11 @@
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
"@octokit/core": "^3.5.1", "@octokit/core": "^3.5.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@testing-library/dom": "^8.11.3", "@testing-library/dom": "8.11.3",
"@testing-library/jest-dom": "^5.16.2", "@testing-library/jest-dom": "5.16.2",
"@testing-library/react": "^12.1.3", "@testing-library/react": "12.1.3",
"@testing-library/react-hooks": "^7.0.2", "@testing-library/react-hooks": "7.0.2",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "13.5.0",
"@types/cookie": "^0.4.1", "@types/cookie": "^0.4.1",
"@types/dompurify": "^2.3.3", "@types/dompurify": "^2.3.3",
"@types/expect-puppeteer": "^4.4.7", "@types/expect-puppeteer": "^4.4.7",
@ -139,12 +139,12 @@
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/tinymce": "^4.6.5", "@types/tinymce": "^4.6.5",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__compose": "^4.0.1", "@types/wordpress__compose": "4.0.1",
"@types/wordpress__data": "^6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__data-controls": "^2.2.0", "@types/wordpress__data-controls": "~2.2.0",
"@types/wordpress__media-utils": "^3.0.0", "@types/wordpress__media-utils": "3.0.0",
"@types/wordpress__notices": "^3.3.0", "@types/wordpress__notices": "3.3.0",
"@types/wordpress__plugins": "^3.0.0", "@types/wordpress__plugins": "3.0.0",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",
"@woocommerce/admin-e2e-tests": "workspace:*", "@woocommerce/admin-e2e-tests": "workspace:*",
@ -182,7 +182,7 @@
"@xstate/test": "0.5.1", "@xstate/test": "0.5.1",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"await-exec": "^0.1.2", "await-exec": "^0.1.2",
"babel-jest": "^27.5.1", "babel-jest": "~27.5.1",
"babel-loader": "^8.2.3", "babel-loader": "^8.2.3",
"babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-es2015-template-literals": "^6.22.0", "babel-plugin-transform-es2015-template-literals": "^6.22.0",
@ -201,9 +201,9 @@
"eslint-plugin-xstate": "^1.1.0", "eslint-plugin-xstate": "^1.1.0",
"expose-loader": "^3.1.0", "expose-loader": "^3.1.0",
"fork-ts-checker-webpack-plugin": "^8.0.0", "fork-ts-checker-webpack-plugin": "^8.0.0",
"jest": "^27.5.1", "jest": "~27.5.1",
"jest-environment-jsdom": "~27.5.0", "jest-environment-jsdom": "~27.5.1",
"jest-environment-node": "^27.5.1", "jest-environment-node": "~27.5.1",
"md5": "^2.3.0", "md5": "^2.3.0",
"merge-config": "^2.0.0", "merge-config": "^2.0.0",
"mini-css-extract-plugin": "^2.6.0", "mini-css-extract-plugin": "^2.6.0",
@ -228,7 +228,7 @@
"sass-loader": "^10.2.1", "sass-loader": "^10.2.1",
"style-loader": "^0.23.1", "style-loader": "^0.23.1",
"stylelint": "^14.5.3", "stylelint": "^14.5.3",
"ts-jest": "^27.1.3", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"url-loader": "^1.1.2", "url-loader": "^1.1.2",
"webpack": "^5.70.0", "webpack": "^5.70.0",

View File

@ -1 +1 @@
jQuery(function(i){const e={init(){i("#wp-admin-bar-show-version-info").on("click",this.showModal)},showModal(e){e.preventDefault(),0<i(".wc-backbone-modal-beta-tester-version-info").length||i(this).WCBackboneModal({template:"wc-beta-tester-version-info",variable:{version:wc_beta_tester_version_info_params.version,description:wc_beta_tester_version_info_params.description}})}};e.init()}); jQuery(function(i){({init(){i("#wp-admin-bar-show-version-info").on("click",this.showModal)},showModal(e){e.preventDefault(),0<i(".wc-backbone-modal-beta-tester-version-info").length||i(this).WCBackboneModal({template:"wc-beta-tester-version-info",variable:{version:wc_beta_tester_version_info_params.version,description:wc_beta_tester_version_info_params.description}})}}).init()});

View File

@ -1 +1 @@
jQuery(function(n){const i={init(){instance=this,instance.new_version=void 0,n("#wcbt-modal-version-switch-confirm").on("click",this.showConfirmVersionSwitchModal),n("input[type=radio][name=wcbt_switch_to_version]").change(function(){n(this).is(":checked")&&(instance.new_version=n(this).val())}).trigger("change")},showConfirmVersionSwitchModal(i){i.preventDefault(),instance.new_version?(n(this).WCBackboneModal({template:"wcbt-version-switch-confirm",variable:{new_version:instance.new_version}}),n("#wcbt-submit-version-switch").on("click",instance.submitSwitchVersionForm)):alert(wc_beta_tester_version_picker_params.i18n_pick_version)},submitSwitchVersionForm(i){i.preventDefault(),n("form[name=wcbt-select-version]").get(0).submit()}};i.init()}); jQuery(function(e){({init(){(instance=this).new_version=void 0,e("#wcbt-modal-version-switch-confirm").on("click",this.showConfirmVersionSwitchModal),e("input[type=radio][name=wcbt_switch_to_version]").change(function(){e(this).is(":checked")&&(instance.new_version=e(this).val())}).trigger("change")},showConfirmVersionSwitchModal(i){i.preventDefault(),instance.new_version?(e(this).WCBackboneModal({template:"wcbt-version-switch-confirm",variable:{new_version:instance.new_version}}),e("#wcbt-submit-version-switch").on("click",instance.submitSwitchVersionForm)):alert(wc_beta_tester_version_picker_params.i18n_pick_version)},submitSwitchVersionForm(i){i.preventDefault(),e("form[name=wcbt-select-version]").get(0).submit()}}).init()});

View File

@ -13,7 +13,7 @@
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@types/wordpress__plugins": "^3.0.0", "@types/wordpress__plugins": "3.0.0",
"@woocommerce/dependency-extraction-webpack-plugin": "workspace:*", "@woocommerce/dependency-extraction-webpack-plugin": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@wordpress/env": "^8.2.0", "@wordpress/env": "^8.2.0",

View File

@ -8,7 +8,7 @@
<rect width="32" height="32" rx="16" fill="#8E9196" /> <rect width="32" height="32" rx="16" fill="#8E9196" />
<mask <mask
id="bacs0" id="bacs0"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="8" x="8"
y="8" y="8"
@ -27,7 +27,7 @@
</g> </g>
<mask <mask
id="bacs1" id="bacs1"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="39" x="39"
y="10" y="10"
@ -52,7 +52,7 @@
<rect x="64" width="32" height="32" rx="16" fill="#8E9196" /> <rect x="64" width="32" height="32" rx="16" fill="#8E9196" />
<mask <mask
id="bacs2" id="bacs2"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="72" x="72"
y="8" y="8"

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -8,7 +8,7 @@
<rect width="32" height="32" rx="16" fill="#8E9196" /> <rect width="32" height="32" rx="16" fill="#8E9196" />
<mask <mask
id="cod-mask-0" id="cod-mask-0"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="7" x="7"
y="10" y="10"
@ -27,7 +27,7 @@
</g> </g>
<mask <mask
id="cod-mask-1" id="cod-mask-1"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="39" x="39"
y="10" y="10"
@ -52,7 +52,7 @@
<rect x="64" width="32" height="32" rx="16" fill="#8E9196" /> <rect x="64" width="32" height="32" rx="16" fill="#8E9196" />
<mask <mask
id="cod-mask-2" id="cod-mask-2"
mask-type="alpha" style="mask-type:alpha"
maskUnits="userSpaceOnUse" maskUnits="userSpaceOnUse"
x="76" x="76"
y="9" y="9"

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -24,28 +24,36 @@
"additionalTasks": [ "additionalTasks": [
{ {
"name": "PHP 8.0", "name": "PHP 8.0",
"commandFilter": [ "test:php" ], "commandFilter": [
"test:php"
],
"testEnvConfig": { "testEnvConfig": {
"phpVersion": "8.0" "phpVersion": "8.0"
} }
}, },
{ {
"name": "WP: nightly", "name": "WP: nightly",
"commandFilter": [ "test:php" ], "commandFilter": [
"test:php"
],
"testEnvConfig": { "testEnvConfig": {
"wpVersion": "nightly" "wpVersion": "nightly"
} }
}, },
{ {
"name": "WP: latest-1", "name": "WP: latest-1",
"commandFilter": [ "test:php" ], "commandFilter": [
"test:php"
],
"testEnvConfig": { "testEnvConfig": {
"wpVersion": "latest-1" "wpVersion": "latest-1"
} }
}, },
{ {
"name": "WP: latest-2", "name": "WP: latest-2",
"commandFilter": [ "test:php" ], "commandFilter": [
"test:php"
],
"testEnvConfig": { "testEnvConfig": {
"wpVersion": "latest-2" "wpVersion": "latest-2"
} }
@ -132,7 +140,7 @@
"eslint-config-wpcalypso": "5.0.0", "eslint-config-wpcalypso": "5.0.0",
"eslint-plugin-jest": "23.20.0", "eslint-plugin-jest": "23.20.0",
"istanbul": "1.0.0-alpha.2", "istanbul": "1.0.0-alpha.2",
"jest": "^27.5.1", "jest": "~27.5.1",
"mocha": "7.2.0", "mocha": "7.2.0",
"prettier": "npm:wp-prettier@^2.8.5", "prettier": "npm:wp-prettier@^2.8.5",
"stylelint": "^13.8.0", "stylelint": "^13.8.0",

File diff suppressed because it is too large Load Diff

View File

@ -23,8 +23,8 @@
"@types/node": "^16.18.18", "@types/node": "^16.18.18",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^29.6.2", "jest": "~27.5.1",
"ts-jest": "^29.1.1", "ts-jest": "~29.1.1",
"ts-node": "^10.2.1", "ts-node": "^10.2.1",
"tslib": "^2.3.1", "tslib": "^2.3.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"

View File

@ -38,8 +38,8 @@
"@types/node": "^16.18.18", "@types/node": "^16.18.18",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "^29.5.0", "jest": "~27.5.1",
"ts-jest": "^29.1.0", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6"
}, },
"scripts": { "scripts": {

View File

@ -167,7 +167,6 @@ export const createPullRequest = async ( options: {
} }
); );
//@ts-expect-error There is a type mismatch between the graphql schema and the response. pullRequest.data.head.repo.has_discussions is a boolean, but the graphql schema doesn't have that field.
return pullRequest.data; return pullRequest.data;
}; };
@ -195,7 +194,6 @@ export const getPullRequest = async ( options: {
} }
); );
//@ts-expect-error Not sure why this error comes up. All versions are up to date and the schema is correct.
return pr.data; return pr.data;
}; };

View File

@ -29,7 +29,7 @@
"@woocommerce/monorepo-utils": "workspace:*", "@woocommerce/monorepo-utils": "workspace:*",
"code-analyzer": "workspace:*", "code-analyzer": "workspace:*",
"commander": "9.4.0", "commander": "9.4.0",
"dotenv": "^10.0.0", "dotenv": "^15.0.1",
"ejs": "^3.1.8", "ejs": "^3.1.8",
"enquirer": "^2.3.6", "enquirer": "^2.3.6",
"express": "^4.18.1", "express": "^4.18.1",

View File

@ -1,7 +1,12 @@
{ {
"extends": "@tsconfig/node16/tsconfig.json", "extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"module": "Node16" "module": "Node16",
"moduleResolution": "Node16",
"typeRoots": [
"./typings",
"./node_modules/@types"
]
}, },
"ts-node": { "ts-node": {
"transpileOnly": true, "transpileOnly": true,