chore(deps): update jest monorepo to v29 (major) (#1149)

* chore(deps): update jest monorepo to v29

* Add jest-environment-jsdom

* Replace globals with transform

* Fix nanoid in ui and rtk-query-monitor

* Update serialize snapshots

* Fix nanoid in test-tab

* Fix nanoid and uuid in app

* Fix nanoid and uuid in extension

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nathan Bierema <nbierema@gmail.com>
This commit is contained in:
renovate[bot] 2022-10-28 17:15:02 -04:00 committed by GitHub
parent 9e01600dde
commit 0266df5776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 952 additions and 836 deletions

View File

@ -5,4 +5,5 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

15
extension/jestResolver.js Normal file
View File

@ -0,0 +1,15 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
if (pkg.name === 'uuid' && pkg.version.startsWith('8.')) {
delete pkg.exports;
delete pkg.module;
}
return pkg;
},
});
};

View File

@ -80,7 +80,8 @@
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^7.2.13", "fork-ts-checker-webpack-plugin": "^7.2.13",
"immutable": "^4.1.0", "immutable": "^4.1.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"pug-html-loader": "^1.1.5", "pug-html-loader": "^1.1.5",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
@ -90,7 +91,7 @@
"selenium-webdriver": "^4.5.0", "selenium-webdriver": "^4.5.0",
"sinon-chrome": "^3.0.1", "sinon-chrome": "^3.0.1",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4", "typescript": "~4.8.4",
"webpack": "^5.74.0", "webpack": "^5.74.0",
"webpack-cli": "^4.10.0" "webpack-cli": "^4.10.0"

View File

@ -11,7 +11,7 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"prettier": "2.7.1", "prettier": "2.7.1",
"typescript": "~4.8.4", "typescript": "~4.8.4",
"nx": "^15.0.0", "nx": "^15.0.0",

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -56,7 +56,7 @@
"@rollup/plugin-commonjs": "^23.0.0", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.1.0", "@rollup/plugin-terser": "^0.1.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.186",
"@types/node": "^18.11.7", "@types/node": "^18.11.7",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/eslint-plugin": "^5.40.1",
@ -65,11 +65,11 @@
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"immutable": "^4.1.0", "immutable": "^4.1.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^3.2.3", "rollup": "^3.2.3",
"rollup-plugin-typescript2": "^0.34.1", "rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.8.4" "typescript": "~4.8.4"
} }

View File

@ -1,9 +1,7 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'jsdom', testEnvironment: 'jsdom',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -55,16 +55,17 @@
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@types/color": "^3.0.3", "@types/color": "^3.0.3",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash.curry": "^4.1.7", "@types/lodash.curry": "^4.1.7",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1", "@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.25.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
} }
} }

View File

@ -1,9 +1,7 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'jsdom', testEnvironment: 'jsdom',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -53,7 +53,7 @@
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash.debounce": "^4.0.7", "@types/lodash.debounce": "^4.0.7",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
"@types/react-test-renderer": "^18.0.0", "@types/react-test-renderer": "^18.0.0",
@ -64,11 +64,12 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-test-renderer": "^18.2.0", "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -63,7 +63,7 @@
"@rollup/plugin-commonjs": "^23.0.0", "@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0", "@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.1.0", "@rollup/plugin-terser": "^0.1.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/node": "^18.11.7", "@types/node": "^18.11.7",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
"@types/react-test-renderer": "^18.0.0", "@types/react-test-renderer": "^18.0.0",
@ -74,13 +74,13 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-test-renderer": "^18.2.0", "react-test-renderer": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "^3.2.3", "rollup": "^3.2.3",
"rollup-plugin-typescript2": "^0.34.1", "rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },

View File

@ -5,9 +5,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,15 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
if (pkg.name === 'uuid' && pkg.version.startsWith('8.')) {
delete pkg.exports;
delete pkg.module;
}
return pkg;
},
});
};

View File

@ -77,7 +77,7 @@
"@rjsf/core": "^4.2.3", "@rjsf/core": "^4.2.3",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/jsan": "^3.1.2", "@types/jsan": "^3.1.2",
"@types/json-schema": "^7.0.11", "@types/json-schema": "^7.0.11",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.186",
@ -101,14 +101,15 @@
"fork-ts-checker-webpack-plugin": "^7.2.13", "fork-ts-checker-webpack-plugin": "^7.2.13",
"html-loader": "^4.2.0", "html-loader": "^4.2.0",
"html-webpack-plugin": "^5.5.0", "html-webpack-plugin": "^5.5.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"styled-components": "^5.3.6", "styled-components": "^5.3.6",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "~4.8.4", "typescript": "~4.8.4",
"webpack": "^5.74.0", "webpack": "^5.74.0",

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -70,7 +70,7 @@
"@types/cors": "^2.8.12", "@types/cors": "^2.8.12",
"@types/cross-spawn": "^6.0.2", "@types/cross-spawn": "^6.0.2",
"@types/express": "^4.17.14", "@types/express": "^4.17.14",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.186",
"@types/minimist": "^1.2.2", "@types/minimist": "^1.2.2",
"@types/morgan": "^1.9.3", "@types/morgan": "^1.9.3",
@ -86,12 +86,12 @@
"eslint": "^8.25.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"jest": "^27.5.1", "jest": "^29.2.2",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"socketcluster-client": "^16.1.1", "socketcluster-client": "^16.1.1",
"supertest": "^6.3.0", "supertest": "^6.3.0",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
} }
} }

View File

@ -4,9 +4,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,11 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
return pkg;
},
});
};

View File

@ -66,7 +66,7 @@
"@redux-devtools/inspector-monitor": "^3.0.0", "@redux-devtools/inspector-monitor": "^3.0.0",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@types/es6template": "^1.0.0", "@types/es6template": "^1.0.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/jsan": "^3.1.2", "@types/jsan": "^3.1.2",
"@types/object-path": "^0.11.1", "@types/object-path": "^0.11.1",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
@ -78,12 +78,13 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -52,7 +52,7 @@
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@types/babel__code-frame": "^7.0.3", "@types/babel__code-frame": "^7.0.3",
"@types/html-entities": "^1.3.4", "@types/html-entities": "^1.3.4",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/node": "^18.11.7", "@types/node": "^18.11.7",
"@types/path-browserify": "^1.0.0", "@types/path-browserify": "^1.0.0",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
@ -65,13 +65,14 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-test-renderer": "^18.2.0", "react-test-renderer": "^18.2.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -51,7 +51,7 @@
"@babel/plugin-transform-runtime": "^7.19.1", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.186",
"@types/node": "^18.11.7", "@types/node": "^18.11.7",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/eslint-plugin": "^5.40.1",
@ -59,11 +59,11 @@
"eslint": "^8.25.0", "eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"jest": "^27.5.1", "jest": "^29.2.2",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rxjs": "^7.5.7", "rxjs": "^7.5.7",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -4,9 +4,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,11 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
return pkg;
},
});
};

View File

@ -71,7 +71,7 @@
"@reduxjs/toolkit": "^1.8.6", "@reduxjs/toolkit": "^1.8.6",
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/hex-rgba": "^1.0.1", "@types/hex-rgba": "^1.0.1",
"@types/lodash.debounce": "^4.0.7", "@types/lodash.debounce": "^4.0.7",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
@ -82,13 +82,14 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-redux": "^8.0.4", "react-redux": "^8.0.4",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -47,7 +47,7 @@
"@babel/plugin-transform-runtime": "^7.19.1", "@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/jsan": "^3.1.2", "@types/jsan": "^3.1.2",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1", "@typescript-eslint/parser": "^5.40.1",
@ -55,9 +55,9 @@
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"immutable": "^4.1.0", "immutable": "^4.1.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -1,34 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Helpers extract 1`] = ` exports[`Helpers extract 1`] = `
Object { {
"__serializedType__": "testType", "__serializedType__": "testType",
"data": Object { "data": {
"testData": "test", "testData": "test",
}, },
} }
`; `;
exports[`Helpers mark 1`] = ` exports[`Helpers mark 1`] = `
Object { {
"__serializedType__": "testType", "__serializedType__": "testType",
"data": Object { "data": {
"testData": "test", "testData": "test",
}, },
} }
`; `;
exports[`Helpers mark 2`] = ` exports[`Helpers mark 2`] = `
Object { {
"__serializedType__": "testType", "__serializedType__": "testType",
"data": "[object Object]", "data": "[object Object]",
} }
`; `;
exports[`Helpers refer 1`] = ` exports[`Helpers refer 1`] = `
Object { {
"__serializedType__": "testType", "__serializedType__": "testType",
"data": Object { "data": {
"testData": "test", "testData": "test",
}, },
} }

View File

@ -1,23 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Immutable Nested stringify 1`] = `"{\\"data\\":[{\\"data\\":{\\"map\\":{\\"data\\":{\\"seq\\":{\\"data\\":[1,2,3,4,5,6,7,8],\\"__serializedType__\\":\\"ImmutableSeq\\"},\\"stack\\":{\\"data\\":[\\"a\\",\\"b\\",\\"c\\"],\\"__serializedType__\\":\\"ImmutableStack\\"}},\\"__serializedType__\\":\\"ImmutableOrderedMap\\"},\\"repeat\\":{\\"data\\":{\\"_value\\":\\"hi\\",\\"size\\":100},\\"__serializedType__\\":\\"ImmutableRepeat\\"}},\\"__serializedType__\\":\\"ImmutableRecord\\",\\"__serializedRef__\\":0},{\\"data\\":[10,9,8,7,6,5,4,3,2,1],\\"__serializedType__\\":\\"ImmutableOrderedSet\\"},{\\"data\\":{\\"_start\\":0,\\"_end\\":7,\\"_step\\":1,\\"size\\":7},\\"__serializedType__\\":\\"ImmutableRange\\"}],\\"__serializedType__\\":\\"ImmutableSet\\"}"`; exports[`Immutable Nested stringify 1`] = `"{"data":[{"data":{"map":{"data":{"seq":{"data":[1,2,3,4,5,6,7,8],"__serializedType__":"ImmutableSeq"},"stack":{"data":["a","b","c"],"__serializedType__":"ImmutableStack"}},"__serializedType__":"ImmutableOrderedMap"},"repeat":{"data":{"_value":"hi","size":100},"__serializedType__":"ImmutableRepeat"}},"__serializedType__":"ImmutableRecord","__serializedRef__":0},{"data":[10,9,8,7,6,5,4,3,2,1],"__serializedType__":"ImmutableOrderedSet"},{"data":{"_start":0,"_end":7,"_step":1,"size":7},"__serializedType__":"ImmutableRange"}],"__serializedType__":"ImmutableSet"}"`;
exports[`Immutable Record stringify 1`] = `"{\\"data\\":{\\"a\\":1,\\"b\\":3},\\"__serializedType__\\":\\"ImmutableRecord\\",\\"__serializedRef__\\":0}"`; exports[`Immutable Record stringify 1`] = `"{"data":{"a":1,"b":3},"__serializedType__":"ImmutableRecord","__serializedRef__":0}"`;
exports[`Immutable Stringify list 1`] = `"{\\"data\\":[1,2,3,4,5,6,7,8,9,10],\\"__serializedType__\\":\\"ImmutableList\\"}"`; exports[`Immutable Stringify list 1`] = `"{"data":[1,2,3,4,5,6,7,8,9,10],"__serializedType__":"ImmutableList"}"`;
exports[`Immutable Stringify map 1`] = `"{\\"data\\":{\\"a\\":1,\\"b\\":2,\\"c\\":3,\\"d\\":4},\\"__serializedType__\\":\\"ImmutableMap\\"}"`; exports[`Immutable Stringify map 1`] = `"{"data":{"a":1,"b":2,"c":3,"d":4},"__serializedType__":"ImmutableMap"}"`;
exports[`Immutable Stringify orderedMap 1`] = `"{\\"data\\":{\\"b\\":2,\\"a\\":1,\\"c\\":3,\\"d\\":4},\\"__serializedType__\\":\\"ImmutableOrderedMap\\"}"`; exports[`Immutable Stringify orderedMap 1`] = `"{"data":{"b":2,"a":1,"c":3,"d":4},"__serializedType__":"ImmutableOrderedMap"}"`;
exports[`Immutable Stringify orderedSet 1`] = `"{\\"data\\":[10,9,8,7,6,5,4,3,2,1],\\"__serializedType__\\":\\"ImmutableOrderedSet\\"}"`; exports[`Immutable Stringify orderedSet 1`] = `"{"data":[10,9,8,7,6,5,4,3,2,1],"__serializedType__":"ImmutableOrderedSet"}"`;
exports[`Immutable Stringify range 1`] = `"{\\"data\\":{\\"_start\\":0,\\"_end\\":7,\\"_step\\":1,\\"size\\":7},\\"__serializedType__\\":\\"ImmutableRange\\"}"`; exports[`Immutable Stringify range 1`] = `"{"data":{"_start":0,"_end":7,"_step":1,"size":7},"__serializedType__":"ImmutableRange"}"`;
exports[`Immutable Stringify repeat 1`] = `"{\\"data\\":{\\"_value\\":\\"hi\\",\\"size\\":100},\\"__serializedType__\\":\\"ImmutableRepeat\\"}"`; exports[`Immutable Stringify repeat 1`] = `"{"data":{"_value":"hi","size":100},"__serializedType__":"ImmutableRepeat"}"`;
exports[`Immutable Stringify seq 1`] = `"{\\"data\\":[1,2,3,4,5,6,7,8],\\"__serializedType__\\":\\"ImmutableSeq\\"}"`; exports[`Immutable Stringify seq 1`] = `"{"data":[1,2,3,4,5,6,7,8],"__serializedType__":"ImmutableSeq"}"`;
exports[`Immutable Stringify set 1`] = `"{\\"data\\":[1,2,3,4,5,6,7,8,9,10],\\"__serializedType__\\":\\"ImmutableSet\\"}"`; exports[`Immutable Stringify set 1`] = `"{"data":[1,2,3,4,5,6,7,8,9,10],"__serializedType__":"ImmutableSet"}"`;
exports[`Immutable Stringify stack 1`] = `"{\\"data\\":[\\"a\\",\\"b\\",\\"c\\"],\\"__serializedType__\\":\\"ImmutableStack\\"}"`; exports[`Immutable Stringify stack 1`] = `"{"data":["a","b","c"],"__serializedType__":"ImmutableStack"}"`;

View File

@ -4,9 +4,8 @@ module.exports = {
moduleNameMapper: { moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts', '\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
}, },
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
resolver: '<rootDir>/jestResolver.js',
}; };

View File

@ -0,0 +1,11 @@
module.exports = (path, options) => {
return options.defaultResolver(path, {
...options,
packageFilter: (pkg) => {
if (pkg.name === 'nanoid') {
pkg.exports['.'].browser = pkg.exports['.'].require;
}
return pkg;
},
});
};

View File

@ -75,7 +75,7 @@
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3", "@testing-library/user-event": "^14.4.3",
"@types/color": "^3.0.3", "@types/color": "^3.0.3",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
"@types/styled-components": "^5.1.26", "@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/eslint-plugin": "^5.40.1",
@ -87,7 +87,8 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"jest-environment-jsdom": "^29.2.2",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
@ -100,7 +101,7 @@
"stylelint-config-standard": "^29.0.0", "stylelint-config-standard": "^29.0.0",
"stylelint-config-styled-components": "^0.1.1", "stylelint-config-styled-components": "^0.1.1",
"stylelint-processor-styled-components": "^1.10.0", "stylelint-processor-styled-components": "^1.10.0",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4", "typescript": "~4.8.4",
"webpack": "^5.74.0" "webpack": "^5.74.0"
}, },

View File

@ -1,8 +1,6 @@
module.exports = { module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
globals: { transform: {
'ts-jest': { '^.+\\.tsx?$': ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
tsconfig: 'tsconfig.test.json',
},
}, },
}; };

View File

@ -55,7 +55,7 @@
"@babel/preset-env": "^7.19.4", "@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6", "@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@types/jest": "^27.5.2", "@types/jest": "^29.2.0",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.186",
"@types/node": "^18.11.7", "@types/node": "^18.11.7",
"@types/react": "^18.0.21", "@types/react": "^18.0.21",
@ -66,13 +66,13 @@
"eslint-plugin-jest": "^27.1.2", "eslint-plugin-jest": "^27.1.2",
"eslint-plugin-react": "^7.31.10", "eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"jest": "^27.5.1", "jest": "^29.2.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-redux": "^8.0.4", "react-redux": "^8.0.4",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "^27.1.5", "ts-jest": "^29.0.3",
"typescript": "~4.8.4" "typescript": "~4.8.4"
}, },
"peerDependencies": { "peerDependencies": {

File diff suppressed because it is too large Load Diff