Skip to content

Commit

Permalink
Merge pull request #1573 from okta/kg/OKTA-481893
Browse files Browse the repository at this point in the history
fix: upgraded Jest to v29
  • Loading branch information
KevinGhadyani-Okta authored Sep 22, 2022
2 parents 3bb3a1f + 356afca commit 8f8f6b2
Show file tree
Hide file tree
Showing 35 changed files with 3,284 additions and 2,912 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.15.0
v16.17.0
785 changes: 0 additions & 785 deletions .yarn/releases/yarn-3.2.0.cjs

This file was deleted.

783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.3.cjs

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
yarnPath: .yarn/releases/yarn-3.2.0.cjs
npmRegistryServer: "https://registry.yarnpkg.com"
enableStrictSsl: false
nodeLinker: "node-modules"

nodeLinker: node-modules

npmRegistryServer: "https://registry.yarnpkg.com"

npmScopes:
okta:
npmRegistryServer: ${OKTA_NPM_REGISTRY_SERVER-https://registry.yarnpkg.com}
npmRegistryServer: "${OKTA_NPM_REGISTRY_SERVER-https://registry.yarnpkg.com}"

yarnPath: .yarn/releases/yarn-3.2.3.cjs
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packages/*"
],
"resolutions": {
"@babel/plugin-transform-typescript": "^7.15.0"
"@babel/plugin-transform-typescript": "^7.19.1"
},
"engines": {
"yarn": "^3.2.0",
Expand Down Expand Up @@ -45,5 +45,5 @@
"stylelint": "^13.13.1"
},
"version": "0.5.0",
"packageManager": "yarn@3.2.0"
"packageManager": "yarn@3.2.3"
}
15 changes: 15 additions & 0 deletions packages/babel-plugin-fully-specified/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*!
* Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and limitations under the License.
*/

module.exports = {
testEnvironment: "jsdom",
};
10 changes: 5 additions & 5 deletions packages/babel-plugin-fully-specified/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"prepack": "yarn exec prepack"
},
"dependencies": {
"@babel/types": "^7.14.5"
"@babel/types": "^7.19.0"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/core": "^7.19.1",
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"babel-jest": "^26.6.3",
"jest": "^26.6.3",
"typescript": "^4.4.4"
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"typescript": "^4.8.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`plugin should fully qualify the module exports specifiers 1`] = `
"export { level } from \\"./index.js\\";
export { levelIndex } from \\"./index.js\\";
export { oneBackLevel } from \\"../index.js\\";
export { oneBackLevelIndex } from \\"../index.js\\";
export { twoBackLevel } from \\"../../index.js\\";
export { twoBackLevelIndex } from \\"../../index.js\\";
export { somethingBack } from \\"../lib/something.js\\";
export { somethingBackTest } from \\"../lib/something.test.js\\";
export { something } from \\"./lib/something.js\\";
export { somethingTest } from \\"./lib/something.test.js\\";
export { something as another } from \\"./lib/something.js\\";
export { somethingTest as anotherTest } from \\"./lib/something.test.js\\";
export * as anotherModule from \\"./lib/something.js\\";
export * as anotherModuleTest from \\"./lib/something.test.js\\";
export * from \\"./lib/something.js\\";
export * from \\"./lib/something.test.js\\";"
"export { level } from "./index.js";
export { levelIndex } from "./index.js";
export { oneBackLevel } from "../index.js";
export { oneBackLevelIndex } from "../index.js";
export { twoBackLevel } from "../../index.js";
export { twoBackLevelIndex } from "../../index.js";
export { somethingBack } from "../lib/something.js";
export { somethingBackTest } from "../lib/something.test.js";
export { something } from "./lib/something.js";
export { somethingTest } from "./lib/something.test.js";
export { something as another } from "./lib/something.js";
export { somethingTest as anotherTest } from "./lib/something.test.js";
export * as anotherModule from "./lib/something.js";
export * as anotherModuleTest from "./lib/something.test.js";
export * from "./lib/something.js";
export * from "./lib/something.test.js";"
`;

exports[`plugin should fully qualify the module imports specifiers 1`] = `
"import { level } from \\"./index.js\\";
import { levelIndex } from \\"./index.js\\";
import { oneBackLevel } from \\"../index.js\\";
import { oneBackLevelIndex } from \\"../index.js\\";
import { twoBackLevel } from \\"../../index.js\\";
import { twoBackLevelIndex } from \\"../../index.js\\";
import { somethingBack } from \\"../lib/something.js\\";
import { somethingBackTest } from \\"../lib/something.test.js\\";
import { export1, export2 as alias2 } from \\"./lib/something.js\\";
import { export1Test, export2 as alias2Test } from \\"./lib/something.test.js\\";
import { something } from \\"./lib/something.js\\";
import { somethingTest } from \\"./lib/something.test.js\\";
import { something as other } from \\"./lib/something.js\\";
import { something as otherTest } from \\"./lib/something.test.js\\";
import anotherImport from \\"./lib/something.js\\";
import anotherImportTest from \\"./lib/something.test.js\\";
import another, { otherImport } from \\"./lib/something.js\\";
import anotherTest, { otherImportTest } from \\"./lib/something.test.js\\";
import * as Something from \\"./lib/something.js\\";
import * as SomethingTest from \\"./lib/something.test.js\\";"
"import { level } from "./index.js";
import { levelIndex } from "./index.js";
import { oneBackLevel } from "../index.js";
import { oneBackLevelIndex } from "../index.js";
import { twoBackLevel } from "../../index.js";
import { twoBackLevelIndex } from "../../index.js";
import { somethingBack } from "../lib/something.js";
import { somethingBackTest } from "../lib/something.test.js";
import { export1, export2 as alias2 } from "./lib/something.js";
import { export1Test, export2 as alias2Test } from "./lib/something.test.js";
import { something } from "./lib/something.js";
import { somethingTest } from "./lib/something.test.js";
import { something as other } from "./lib/something.js";
import { something as otherTest } from "./lib/something.test.js";
import anotherImport from "./lib/something.js";
import anotherImportTest from "./lib/something.test.js";
import another, { otherImport } from "./lib/something.js";
import anotherTest, { otherImportTest } from "./lib/something.test.js";
import * as Something from "./lib/something.js";
import * as SomethingTest from "./lib/something.test.js";"
`;

exports[`plugin should skip bare module specifiers 1`] = `
Expand Down
2 changes: 1 addition & 1 deletion packages/browserslist-config-odyssey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"devDependencies": {
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-plugin-odyssey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"devDependencies": {
"eslint": "^7.27.0",
"jest": "^26.6.3"
"jest": "^29.0.3"
}
}
11 changes: 5 additions & 6 deletions packages/odyssey-babel-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@
"prepack": "yarn exec prepack"
},
"dependencies": {
"@babel/template": "^7.12.13",
"@babel/types": "^7.14.5",
"@babel/template": "^7.18.10",
"@babel/types": "^7.19.0",
"postcss-load-config": "^3.1.0"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@babel/core": "^7.19.1",
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-postcss-preset": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"babel-jest": "^26.6.3",
"jest": "^26.6.3",
"jest": "^29.0.3",
"postcss": "^8.3.6",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
},
"peerDependencies": {
"@okta/odyssey-postcss-preset": ">= 0.8.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`transformStyles import visitor transforms styles as expected 1`] = `
Object {
{
"__digest": "0776a6",
"__template": [Function],
"autoprefixed": "ods-58h7mt",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`transformStyles require visitor transforms styles as expected 1`] = `
Object {
{
"__digest": "0776a6",
"__template": [Function],
"autoprefixed": "ods-58h7mt",
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-babel-plugin/src/compileFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ export default function compileFactory(): Compile {
delete result.message.warning;
}

worker.unref();

return result.message;
};

worker.unref();

return compile;
}
10 changes: 5 additions & 5 deletions packages/odyssey-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"prepack": "yarn exec prepack"
},
"dependencies": {
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "^7.15.0",
"@babel/core": "^7.19.1",
"@babel/preset-env": "^7.19.1",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@okta/odyssey-babel-plugin": "^0.15.0"
},
"devDependencies": {
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"@types/babel__core": "^7.1.15",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
}
}
1 change: 0 additions & 1 deletion packages/odyssey-design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"sideEffects": false,
"exports": {
".": {
"default": "./dist/index.js"
Expand Down
8 changes: 4 additions & 4 deletions packages/odyssey-ie-11-sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@babel/core": "7.15.0",
"@babel/preset-env": "7.15.0",
"@babel/preset-react": "7.14.5",
"@babel/preset-typescript": "7.15.0",
"@babel/core": "7.19.1",
"@babel/preset-env": "7.19.1",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@okta/browserslist-config-odyssey": "^0.15.0",
"@okta/odyssey-babel-preset": "^0.15.0",
"babel-loader": "8.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-postcss-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"@types/cssnano": "^4.0.1",
"jest": "^26.6.3",
"jest": "^29.0.3",
"typescript": "^4.4.4"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-postcss-scss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"@types/sass": "^1.16.1",
"jest": "^26.6.3",
"jest": "^29.0.3",
"postcss": "^8.3.6",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
},
"peerDependencies": {
"postcss": "^8.3.6"
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-postcss-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"devDependencies": {
"@okta/odyssey-lifecycle": "^0.15.0",
"@okta/odyssey-typescript": "^0.15.0",
"jest": "^26.6.3",
"typescript": "^4.4.4"
"jest": "^29.0.3",
"typescript": "^4.8.3"
},
"peerDependencies": {
"postcss": "^8.3.6"
Expand Down
1 change: 1 addition & 0 deletions packages/odyssey-react-mui/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

module.exports = {
setupFilesAfterEnv: ["./jest.setup.js"],
testEnvironment: "jsdom",
};
9 changes: 5 additions & 4 deletions packages/odyssey-react-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@okta/odyssey-design-tokens": "^0.15.0"
},
"devDependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/cli": "^7.18.10",
"@babel/core": "^7.19.1",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@mui/icons-material": "^5.10.3",
Expand All @@ -46,14 +46,15 @@
"babel-jest": "^26.6.3",
"babel-plugin-import": "^1.13.5",
"eslint": "^7.27.0",
"jest": "^26.6.3",
"jest": "^29.0.3",
"jest-axe": "^5.0.1",
"jest-environment-jsdom": "^29.0.3",
"npm-run-all": "^4.1.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"regenerator-runtime": "^0.13.7",
"stylelint": "^13.13.1",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
},
"peerDependencies": {
"@emotion/react": "^11",
Expand Down
1 change: 1 addition & 0 deletions packages/odyssey-react-theme/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

module.exports = {
setupFilesAfterEnv: ["./jest.setup.js"],
testEnvironment: "jsdom",
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!@okta/odyssey-design-tokens/)",
],
Expand Down
10 changes: 5 additions & 5 deletions packages/odyssey-react-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"sideEffects": false,
"exports": {
".": {
"default": "./dist/index.js"
Expand All @@ -25,8 +24,8 @@
"hoist-non-react-statics": "^3.3.2"
},
"devDependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/cli": "^7.18.10",
"@babel/core": "^7.19.1",
"@okta/browserslist-config-odyssey": "^0.15.0",
"@okta/odyssey-babel-preset": "^0.15.0",
"@okta/odyssey-lifecycle": "^0.15.0",
Expand All @@ -38,11 +37,12 @@
"@types/react-dom": "^17.0.5",
"babel-jest": "^26.6.3",
"eslint": "^7.27.0",
"jest": "^26.6.3",
"jest": "^29.0.3",
"jest-environment-jsdom": "^29.0.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"regenerator-runtime": "^0.13.7",
"typescript": "^4.4.4"
"typescript": "^4.8.3"
},
"peerDependencies": {
"react": ">=16 <18",
Expand Down
1 change: 1 addition & 0 deletions packages/odyssey-react/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

module.exports = {
setupFilesAfterEnv: ["./jest.setup.js"],
testEnvironment: "jsdom",
};
Loading

0 comments on commit 8f8f6b2

Please sign in to comment.