Enforce Strict `@types` Dependencies (#37351)
This commit is contained in:
parent
3d614cd862
commit
67cde87fd1
13
.syncpackrc
13
.syncpackrc
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"filter": "^(?:config|react|react-dom|eslint|typescript|@typescript-eslint|@types/react|@wordpress|@types/wordpress__components|postcss).*$",
|
"filter": "^(?:config|react|react-dom|eslint|typescript|@typescript-eslint|@types/react|@wordpress|@types/wordpress__components|postcss|@types/node).*$",
|
||||||
"indent": "\t",
|
"indent": "\t",
|
||||||
"overrides": true,
|
"overrides": true,
|
||||||
"peer": true,
|
"peer": true,
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
"packages": [
|
"packages": [
|
||||||
"**"
|
"**"
|
||||||
],
|
],
|
||||||
"pinVersion": "^4.8.3"
|
"pinVersion": "^4.9.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
@ -154,6 +154,15 @@
|
||||||
"**"
|
"**"
|
||||||
],
|
],
|
||||||
"pinVersion": "^8.4.7"
|
"pinVersion": "^8.4.7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
"@types/node"
|
||||||
|
],
|
||||||
|
"packages": [
|
||||||
|
"**"
|
||||||
|
],
|
||||||
|
"pinVersion": "^16.18.18"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
44
package.json
44
package.json
|
@ -3,6 +3,10 @@
|
||||||
"title": "WooCommerce Monorepo",
|
"title": "WooCommerce Monorepo",
|
||||||
"description": "Monorepo for the WooCommerce ecosystem",
|
"description": "Monorepo for the WooCommerce ecosystem",
|
||||||
"homepage": "https://woocommerce.com/",
|
"homepage": "https://woocommerce.com/",
|
||||||
|
"engines": {
|
||||||
|
"node": "^16.13.1",
|
||||||
|
"pnpm": "^7.13.3"
|
||||||
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -25,41 +29,41 @@
|
||||||
"sync-dependencies": "pnpm exec syncpack -- fix-mismatches"
|
"sync-dependencies": "pnpm exec syncpack -- fix-mismatches"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "^7.16.11",
|
"@babel/preset-env": "^7.20.2",
|
||||||
"@babel/runtime": "^7.17.2",
|
"@babel/runtime": "^7.21.0",
|
||||||
"@types/node": "14.14.33",
|
"@types/node": "^16.18.18",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "workspace:*",
|
||||||
"@wordpress/data": "wp-6.0",
|
"@wordpress/data": "wp-6.0",
|
||||||
"@wordpress/eslint-plugin": "^11.1.0",
|
"@wordpress/eslint-plugin": "^11.1.0",
|
||||||
"@wordpress/prettier-config": "^1.1.1",
|
"@wordpress/prettier-config": "^1.4.0",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.3.0",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"copy-webpack-plugin": "^10.2.4",
|
"copy-webpack-plugin": "^10.2.4",
|
||||||
"core-js": "^3.21.1",
|
"core-js": "^3.29.1",
|
||||||
"css-loader": "^6.7.0",
|
"css-loader": "^6.7.3",
|
||||||
"glob": "^7.2.0",
|
"glob": "^7.2.3",
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"jest": "^27.3.1",
|
"jest": "^27.5.1",
|
||||||
"lint-staged": "^12.3.7",
|
"lint-staged": "^12.5.0",
|
||||||
"mkdirp": "^1.0.4",
|
"mkdirp": "^1.0.4",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.4",
|
||||||
"node-stream-zip": "^1.15.0",
|
"node-stream-zip": "^1.15.0",
|
||||||
"postcss-loader": "^4.3.0",
|
"postcss-loader": "^4.3.0",
|
||||||
"prettier": "npm:wp-prettier@^2.2.1-beta-1",
|
"prettier": "npm:wp-prettier@^2.6.2",
|
||||||
"regenerator-runtime": "^0.13.9",
|
"regenerator-runtime": "^0.13.11",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.59.3",
|
||||||
"sass-loader": "^10.2.1",
|
"sass-loader": "^10.4.1",
|
||||||
"syncpack": "^9.8.4",
|
"syncpack": "^9.8.4",
|
||||||
"turbo": "^1.8.3",
|
"turbo": "^1.8.5",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"url-loader": "^1.1.2",
|
"url-loader": "^1.1.2",
|
||||||
"webpack": "^5.70.0"
|
"webpack": "^5.76.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "7.12.9",
|
"@babel/core": "7.12.9",
|
||||||
"@wordpress/babel-plugin-import-jsx-pragma": "^3.1.0",
|
"@wordpress/babel-plugin-import-jsx-pragma": "^3.2.0",
|
||||||
"@wordpress/babel-preset-default": "^6.4.1",
|
"@wordpress/babel-preset-default": "^6.17.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"wp-textdomain": "1.0.1"
|
"wp-textdomain": "1.0.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"sass-loader": "^10.2.1",
|
"sass-loader": "^10.2.1",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/create-hmac": "1.1.0",
|
"@types/create-hmac": "1.1.0",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/node": "13.13.5",
|
"@types/node": "^16.18.18",
|
||||||
"@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/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "workspace:*",
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
"eslint": "^8.32.0",
|
"eslint": "^8.32.0",
|
||||||
"jest": "^27",
|
"jest": "^27",
|
||||||
"ts-jest": "^27",
|
"ts-jest": "^27",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
"types": [ "node", "jest", "axios", "create-hmac" ],
|
"types": [ "node", "jest", "axios", "create-hmac" ],
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"target": "es5"
|
"target": "es5",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [ "src/" ]
|
"include": [ "src/" ]
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,7 @@
|
||||||
"@types/wordpress__viewport": "^2.5.4",
|
"@types/wordpress__viewport": "^2.5.4",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "workspace:*",
|
||||||
"@woocommerce/internal-style-build": "workspace:*",
|
"@woocommerce/internal-style-build": "workspace:*",
|
||||||
|
"@woocommerce/internal-js-tests": "workspace:*",
|
||||||
"@wordpress/browserslist-config": "wp-6.0",
|
"@wordpress/browserslist-config": "wp-6.0",
|
||||||
"@wordpress/scripts": "^12.6.1",
|
"@wordpress/scripts": "^12.6.1",
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.0.0",
|
||||||
|
@ -141,7 +142,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"uuid": "^8.3.0",
|
"uuid": "^8.3.0",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
|
|
|
@ -66,7 +66,8 @@ export type TreeProps = BaseTreeProps &
|
||||||
> & {
|
> & {
|
||||||
level?: number;
|
level?: number;
|
||||||
items: LinkedTree[];
|
items: LinkedTree[];
|
||||||
/** It gives a way to render a different Element as the
|
/**
|
||||||
|
* It gives a way to render a different Element as the
|
||||||
* tree item label.
|
* tree item label.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|
|
@ -18,7 +18,7 @@ export type FormErrors< Values > = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
export type FormContext< Values extends Record< string, any > > = {
|
export type FormContextType< Values extends Record< string, any > > = {
|
||||||
values: Values;
|
values: Values;
|
||||||
errors: FormErrors< Values >;
|
errors: FormErrors< Values >;
|
||||||
isDirty: boolean;
|
isDirty: boolean;
|
||||||
|
@ -51,14 +51,16 @@ export type FormContext< Values extends Record< string, any > > = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
export const FormContext = createContext< FormContext< any > >(
|
export const FormContext: React.Context< FormContextType< any > > =
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
{} as FormContext< any >
|
createContext< FormContextType< any > >(
|
||||||
);
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
{} as FormContextType< any >
|
||||||
|
);
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
export function useFormContext< Values extends Record< string, any > >() {
|
export function useFormContext< Values extends Record< string, any > >() {
|
||||||
const formContext = useContext< FormContext< Values > >( FormContext );
|
const formContext = useContext< FormContextType< Values > >( FormContext );
|
||||||
|
|
||||||
return formContext;
|
return formContext;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { TextControl } from '@wordpress/components';
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import { Form, useFormContext } from '../';
|
import { Form, useFormContext } from '../';
|
||||||
import type { FormContext } from '../';
|
import type { FormContextType } from '../';
|
||||||
import { DateTimePickerControl } from '../../date-time-picker-control';
|
import { DateTimePickerControl } from '../../date-time-picker-control';
|
||||||
|
|
||||||
const TestInputWithContext = () => {
|
const TestInputWithContext = () => {
|
||||||
|
@ -44,7 +44,7 @@ describe( 'Form', () => {
|
||||||
>
|
>
|
||||||
{ ( {
|
{ ( {
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return <button onClick={ handleSubmit }>Submit</button>;
|
return <button onClick={ handleSubmit }>Submit</button>;
|
||||||
} }
|
} }
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -71,7 +71,7 @@ describe( 'Form', () => {
|
||||||
onChange={ mockOnChange }
|
onChange={ mockOnChange }
|
||||||
validate={ () => ( {} ) }
|
validate={ () => ( {} ) }
|
||||||
>
|
>
|
||||||
{ ( { setValue }: FormContext< Record< string, string > > ) => {
|
{ ( { setValue }: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={ () => {
|
onClick={ () => {
|
||||||
|
@ -103,7 +103,7 @@ describe( 'Form', () => {
|
||||||
<Form onSubmit={ mockOnSubmit } validate={ () => ( {} ) }>
|
<Form onSubmit={ mockOnSubmit } validate={ () => ( {} ) }>
|
||||||
{ ( {
|
{ ( {
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return <button onClick={ handleSubmit }>Submit</button>;
|
return <button onClick={ handleSubmit }>Submit</button>;
|
||||||
} }
|
} }
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -124,7 +124,7 @@ describe( 'Form', () => {
|
||||||
|
|
||||||
const { queryByText } = render(
|
const { queryByText } = render(
|
||||||
<Form onChange={ mockOnChange } validate={ () => ( {} ) }>
|
<Form onChange={ mockOnChange } validate={ () => ( {} ) }>
|
||||||
{ ( { setValue }: FormContext< Record< string, string > > ) => {
|
{ ( { setValue }: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={ () => {
|
onClick={ () => {
|
||||||
|
@ -156,7 +156,7 @@ describe( 'Form', () => {
|
||||||
{ ( {
|
{ ( {
|
||||||
setValue,
|
setValue,
|
||||||
getInputProps,
|
getInputProps,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<TextControl
|
<TextControl
|
||||||
label={ 'First Name' }
|
label={ 'First Name' }
|
||||||
|
@ -206,7 +206,7 @@ describe( 'Form', () => {
|
||||||
{ ( {
|
{ ( {
|
||||||
setValue,
|
setValue,
|
||||||
getInputProps,
|
getInputProps,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<TextControl
|
<TextControl
|
||||||
label={ 'First Name' }
|
label={ 'First Name' }
|
||||||
|
@ -243,7 +243,7 @@ describe( 'Form', () => {
|
||||||
{ ( {
|
{ ( {
|
||||||
setValue,
|
setValue,
|
||||||
getInputProps,
|
getInputProps,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<TextControl
|
<TextControl
|
||||||
label={ 'First Name' }
|
label={ 'First Name' }
|
||||||
|
@ -293,7 +293,7 @@ describe( 'Form', () => {
|
||||||
{ ( {
|
{ ( {
|
||||||
setValue,
|
setValue,
|
||||||
getInputProps,
|
getInputProps,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<TextControl
|
<TextControl
|
||||||
label={ 'First Name' }
|
label={ 'First Name' }
|
||||||
|
@ -329,7 +329,7 @@ describe( 'Form', () => {
|
||||||
<Form onChanges={ mockOnChanges } validate={ () => ( {} ) }>
|
<Form onChanges={ mockOnChanges } validate={ () => ( {} ) }>
|
||||||
{ ( {
|
{ ( {
|
||||||
setValues,
|
setValues,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={ () => {
|
onClick={ () => {
|
||||||
|
@ -379,7 +379,7 @@ describe( 'Form', () => {
|
||||||
<Form onChanges={ mockOnChanges } validate={ validate }>
|
<Form onChanges={ mockOnChanges } validate={ validate }>
|
||||||
{ ( {
|
{ ( {
|
||||||
setValues,
|
setValues,
|
||||||
}: FormContext< Record< string, string > > ) => {
|
}: FormContextType< Record< string, string > > ) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={ () => {
|
onClick={ () => {
|
||||||
|
@ -428,7 +428,7 @@ describe( 'Form', () => {
|
||||||
|
|
||||||
const { container, queryByText } = render(
|
const { container, queryByText } = render(
|
||||||
<Form< TestData > onChange={ mockOnChange } validate={ validate }>
|
<Form< TestData > onChange={ mockOnChange } validate={ validate }>
|
||||||
{ ( { getInputProps, values }: FormContext< TestData > ) => {
|
{ ( { getInputProps, values }: FormContextType< TestData > ) => {
|
||||||
return (
|
return (
|
||||||
<DateTimePickerControl
|
<DateTimePickerControl
|
||||||
label={ 'Date' }
|
label={ 'Date' }
|
||||||
|
|
|
@ -16,7 +16,7 @@ export { default as EmptyContent } from './empty-content';
|
||||||
export { default as Flag } from './flag';
|
export { default as Flag } from './flag';
|
||||||
export { Form, useFormContext } from './form';
|
export { Form, useFormContext } from './form';
|
||||||
export { FormSection } from './form-section';
|
export { FormSection } from './form-section';
|
||||||
export type { FormContext, FormRef, FormErrors } from './form';
|
export type { FormContext, FormContextType, FormRef, FormErrors } from './form';
|
||||||
export { default as FilterPicker } from './filter-picker';
|
export { default as FilterPicker } from './filter-picker';
|
||||||
export { H, Section } from './section';
|
export { H, Section } from './section';
|
||||||
export { ImageGallery, ImageGalleryItem } from './image-gallery';
|
export { ImageGallery, ImageGalleryItem } from './image-gallery';
|
||||||
|
|
|
@ -8,6 +8,6 @@ import { createContext } from '@wordpress/element';
|
||||||
*
|
*
|
||||||
* See https://medium.com/@Heydon/managing-heading-levels-in-design-systems-18be9a746fa3
|
* See https://medium.com/@Heydon/managing-heading-levels-in-design-systems-18be9a746fa3
|
||||||
*/
|
*/
|
||||||
const Level = createContext( 2 );
|
const Level: React.Context< number > = createContext( 2 );
|
||||||
|
|
||||||
export { Level };
|
export { Level };
|
||||||
|
|
|
@ -43,7 +43,7 @@ export type SortableProps = {
|
||||||
|
|
||||||
const THROTTLE_TIME = 16;
|
const THROTTLE_TIME = 16;
|
||||||
|
|
||||||
export const SortableContext = createContext( {} );
|
export const SortableContext: React.Context< object > = createContext( {} );
|
||||||
|
|
||||||
export const Sortable = ( {
|
export const Sortable = ( {
|
||||||
children,
|
children,
|
||||||
|
|
|
@ -64,7 +64,7 @@ function createOrderedChildren< T = Fill.Props, S = Record< string, unknown > >(
|
||||||
order: number,
|
order: number,
|
||||||
props: T,
|
props: T,
|
||||||
injectProps?: S
|
injectProps?: S
|
||||||
) {
|
): React.ReactElement {
|
||||||
const { children: childrenToRender, props: propsToRender } =
|
const { children: childrenToRender, props: propsToRender } =
|
||||||
getChildrenAndProps( children, order, props, injectProps );
|
getChildrenAndProps( children, order, props, injectProps );
|
||||||
return cloneElement( childrenToRender, propsToRender );
|
return cloneElement( childrenToRender, propsToRender );
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"composite": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
"types": "build-types",
|
"types": "build-types",
|
||||||
"react-native": "src/index",
|
"react-native": "src/index",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@types/node": "^16.18.18",
|
||||||
"browser-filesaver": "^1.1.1",
|
"browser-filesaver": "^1.1.1",
|
||||||
"moment": "^2.29.1"
|
"moment": "^2.29.1"
|
||||||
},
|
},
|
||||||
|
@ -50,13 +51,14 @@
|
||||||
"@babel/core": "^7.17.5",
|
"@babel/core": "^7.17.5",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"composite": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,13 +54,14 @@
|
||||||
"@babel/core": "^7.17.5",
|
"@babel/core": "^7.17.5",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
"@woocommerce/internal-style-build": "workspace:*",
|
"@woocommerce/internal-style-build": "workspace:*",
|
||||||
"@woocommerce/navigation": "workspace:*",
|
"@woocommerce/navigation": "workspace:*",
|
||||||
"@woocommerce/tracks": "workspace:*",
|
"@woocommerce/tracks": "workspace:*",
|
||||||
|
"@woocommerce/internal-js-tests": "workspace:*",
|
||||||
"@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",
|
||||||
|
@ -63,7 +64,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,11 +59,13 @@
|
||||||
"@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/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:*",
|
||||||
"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",
|
||||||
|
@ -71,7 +73,7 @@
|
||||||
"redux": "^4.1.0",
|
"redux": "^4.1.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@wordpress/core-data": "wp-6.0",
|
"@wordpress/core-data": "wp-6.0",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.17.5",
|
"@babel/core": "^7.17.5",
|
||||||
|
"@types/node": "^16.18.18",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/lodash": "^4.14.182",
|
"@types/lodash": "^4.14.182",
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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",
|
||||||
|
@ -46,7 +48,7 @@
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"lodash": "^4.17.0"
|
"lodash": "^4.17.0"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* External dependencies
|
* External dependencies
|
||||||
*/
|
*/
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import 'moment-timezone';
|
import momentTz from 'moment-timezone';
|
||||||
import { find, memoize } from 'lodash';
|
import { find, memoize } from 'lodash';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { parse } from 'qs';
|
import { parse } from 'qs';
|
||||||
|
@ -181,7 +181,7 @@ export function getStoreTimeZoneMoment() {
|
||||||
return moment().utcOffset( window.wcSettings.timeZone );
|
return moment().utcOffset( window.wcSettings.timeZone );
|
||||||
}
|
}
|
||||||
|
|
||||||
return moment().tz( window.wcSettings.timeZone );
|
return ( moment() as momentTz.Moment ).tz( window.wcSettings.timeZone );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
"@types/wordpress__components": "^19.10.3",
|
"@types/wordpress__components": "^19.10.3",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "workspace:*",
|
||||||
"@woocommerce/internal-style-build": "workspace:*",
|
"@woocommerce/internal-style-build": "workspace:*",
|
||||||
|
"@woocommerce/internal-js-tests": "workspace:*",
|
||||||
"@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",
|
||||||
|
@ -73,7 +74,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,17 +41,18 @@
|
||||||
"@babel/core": "^7.17.5",
|
"@babel/core": "^7.17.5",
|
||||||
"@types/cookie": "^0.4.1",
|
"@types/cookie": "^0.4.1",
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/node": "^17.0.21",
|
"@types/node": "^16.18.18",
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@types/react": "^17.0.2",
|
"@types/react": "^17.0.2",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
|
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,8 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"babel-jest": "^27.5.1",
|
||||||
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
"extends": "../tsconfig.json",
|
"extends": "../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"outDir": "build-module"
|
"outDir": "build-module",
|
||||||
|
"composite": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0"
|
"webpack": "^5.70.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,13 +64,14 @@
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/qs": "^6.9.7",
|
"@types/qs": "^6.9.7",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
"redux": "^4.2.0",
|
"redux": "^4.2.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,13 +50,14 @@
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/lodash": "^4.14.184",
|
"@types/lodash": "^4.14.184",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "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": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"preset": "../../internal-js-tests/jest.config.js"
|
"preset": "../node_modules/@woocommerce/internal-js-tests/jest-preset.js"
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
"@types/wordpress__plugins": "^3.0.0",
|
"@types/wordpress__plugins": "^3.0.0",
|
||||||
"@woocommerce/eslint-plugin": "workspace:*",
|
"@woocommerce/eslint-plugin": "workspace:*",
|
||||||
"@woocommerce/internal-style-build": "workspace:*",
|
"@woocommerce/internal-style-build": "workspace:*",
|
||||||
|
"@woocommerce/internal-js-tests": "workspace:*",
|
||||||
"@wordpress/block-editor": "^9.8.0",
|
"@wordpress/block-editor": "^9.8.0",
|
||||||
"@wordpress/browserslist-config": "wp-6.0",
|
"@wordpress/browserslist-config": "wp-6.0",
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.0.0",
|
||||||
|
@ -95,7 +96,7 @@
|
||||||
"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": "^27.1.3",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.9.5",
|
||||||
"webpack": "^5.70.0",
|
"webpack": "^5.70.0",
|
||||||
"webpack-cli": "^3.3.12"
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*/
|
*/
|
||||||
import { ReactElement, Component } from 'react';
|
import { ReactElement, Component } from 'react';
|
||||||
import { render, fireEvent } from '@testing-library/react';
|
import { render, fireEvent } from '@testing-library/react';
|
||||||
import { Form, FormContext } from '@woocommerce/components';
|
import { Form, FormContextType } from '@woocommerce/components';
|
||||||
import { Product, ProductCategory } from '@woocommerce/data';
|
import { Product, ProductCategory } from '@woocommerce/data';
|
||||||
import { createElement } from '@wordpress/element';
|
import { createElement } from '@wordpress/element';
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ describe( 'CategoryField', () => {
|
||||||
it( 'should render a dropdown select control', () => {
|
it( 'should render a dropdown select control', () => {
|
||||||
const { queryByText } = render(
|
const { queryByText } = render(
|
||||||
<Form initialValues={ { categories: [] } }>
|
<Form initialValues={ { categories: [] } }>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -138,7 +138,7 @@ describe( 'CategoryField', () => {
|
||||||
],
|
],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -175,7 +175,7 @@ describe( 'CategoryField', () => {
|
||||||
categories: [],
|
categories: [],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -210,7 +210,7 @@ describe( 'CategoryField', () => {
|
||||||
categories: [ mockCategoryList[ 2 ] ],
|
categories: [ mockCategoryList[ 2 ] ],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -238,7 +238,7 @@ describe( 'CategoryField', () => {
|
||||||
categories: [ mockCategoryList[ 2 ] ],
|
categories: [ mockCategoryList[ 2 ] ],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -266,7 +266,7 @@ describe( 'CategoryField', () => {
|
||||||
categories: [ mockCategoryList[ 2 ] ],
|
categories: [ mockCategoryList[ 2 ] ],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
@ -295,7 +295,7 @@ describe( 'CategoryField', () => {
|
||||||
categories: [ mockCategoryList[ 2 ] ],
|
categories: [ mockCategoryList[ 2 ] ],
|
||||||
} }
|
} }
|
||||||
>
|
>
|
||||||
{ ( { getInputProps }: FormContext< Product > ) => (
|
{ ( { getInputProps }: FormContextType< Product > ) => (
|
||||||
<CategoryField
|
<CategoryField
|
||||||
label="Categories"
|
label="Categories"
|
||||||
placeholder="Search or create category…"
|
placeholder="Search or create category…"
|
||||||
|
|
|
@ -64,7 +64,7 @@ function createOrderedChildren< T = Fill.Props, S = Record< string, unknown > >(
|
||||||
order: number,
|
order: number,
|
||||||
props: T,
|
props: T,
|
||||||
injectProps?: S
|
injectProps?: S
|
||||||
) {
|
): React.ReactElement {
|
||||||
const { children: childrenToRender, props: propsToRender } =
|
const { children: childrenToRender, props: propsToRender } =
|
||||||
getChildrenAndProps( children, order, props, injectProps );
|
getChildrenAndProps( children, order, props, injectProps );
|
||||||
return cloneElement( childrenToRender, propsToRender );
|
return cloneElement( childrenToRender, propsToRender );
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build",
|
"outDir": "build",
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types",
|
"declarationDir": "./build-types",
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.d.ts",
|
"**/*.d.ts",
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: dev
|
||||||
|
Comment: Configuration change only
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.0.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"ts-jest": "^27.1.3",
|
"ts-jest": "^27.1.3",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.(t|j)s?(x)": [
|
"*.(t|j)s?(x)": [
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
"extends": "../tsconfig-cjs",
|
"extends": "../tsconfig-cjs",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "build"
|
"outDir": "build",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"outDir": "build-module",
|
"outDir": "build-module",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"declarationDir": "./build-types"
|
"declarationDir": "./build-types",
|
||||||
|
"typeRoots": [
|
||||||
|
"./typings",
|
||||||
|
"./node_modules/@types"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig",
|
"extends": "./tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es6",
|
"target": "es2019",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"declarationMap": false,
|
"declarationMap": false,
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
"jsxFactory": "createElement",
|
"jsxFactory": "createElement",
|
||||||
"jsxFragmentFactory": "Fragment"
|
"jsxFragmentFactory": "Fragment",
|
||||||
|
"incremental": true,
|
||||||
|
"typeRoots": []
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
@ -19,6 +21,7 @@
|
||||||
"**/build-types",
|
"**/build-types",
|
||||||
"**/test/*",
|
"**/test/*",
|
||||||
"**/jest.config.js",
|
"**/jest.config.js",
|
||||||
|
"**/jest-preset.js",
|
||||||
"**/webpack.*.js",
|
"**/webpack.*.js",
|
||||||
"**/babel.config.js"
|
"**/babel.config.js"
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
rootDir: './',
|
rootDir: './',
|
||||||
preset: '../../../packages/js/internal-js-tests/jest.config.js',
|
preset: '../node_modules/@woocommerce/internal-js-tests/jest-preset.js',
|
||||||
globals: {
|
globals: {
|
||||||
'ts-jest': {
|
'ts-jest': {
|
||||||
diagnostics: {
|
diagnostics: {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue