Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates jest/ts-jest to latest #9155

Merged
merged 8 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/turborepo-lib/src/turbo_json/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,9 @@ mod test {
use crate::{task_graph::TaskDefinition, turbo_json::CONFIG_FILE};

#[test_case(r"{}", TurboJson::default() ; "empty")]
#[test_case(r#"{ "globalDependencies": ["tsconfig.json", "jest.config.js"] }"#,
#[test_case(r#"{ "globalDependencies": ["tsconfig.json", "jest.config.ts"] }"#,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was unsure about this at first, but it seems to be happy. please double-check.

TurboJson {
global_deps: vec!["jest.config.js".to_string(), "tsconfig.json".to_string()],
global_deps: vec!["jest.config.ts".to_string(), "tsconfig.json".to_string()],
..TurboJson::default()
}
; "global dependencies (sorted)")]
Expand Down
2 changes: 1 addition & 1 deletion docs/repo-docs/reference/run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Specify glob of global filesystem dependencies to be hashed. Useful for `.env` a
```bash title="Terminal"
turbo run build --global-deps=".env"
turbo run build --global-deps=".env.*" --global-deps=".eslintrc" --global-deps="jest.config.js"
turbo run build --global-deps=".env.*" --global-deps=".eslintrc" --global-deps="jest.config.ts"
```
<Callout type="info">
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchen-sink/apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@types/body-parser": "^1.19.5",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/morgan": "^1.9.9",
"@types/node": "^20.11.24",
"@types/supertest": "^6.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
import type { Config } from "jest";

const config = {
roots: ["<rootDir>"],
testEnvironment: "jsdom",
transform: {
Expand All @@ -11,4 +13,6 @@ module.exports = {
"<rootDir>/dist",
],
preset: "ts-jest",
};
} as const satisfies Config;

export default config;
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
import type { Config } from "jest";

const config = {
roots: ["<rootDir>"],
transform: {
"^.+\\.tsx?$": "ts-jest",
Expand All @@ -10,4 +12,6 @@ module.exports = {
"<rootDir>/dist",
],
preset: "ts-jest",
};
} as const satisfies Config;

export default config;
9 changes: 5 additions & 4 deletions examples/kitchen-sink/packages/jest-presets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"private": true,
"license": "MIT",
"files": [
"browser/jest-preset.js",
"node/jest-preset.js"
"browser/jest-preset.ts",
"node/jest-preset.ts"
],
"dependencies": {
"ts-jest": "^29.1.2"
"jest": "^29.7.0",
"ts-jest": "^29.2.5"
},
"devDependencies": {
"jest-environment-jsdom": "^29.7.0"
}
}
}
2 changes: 1 addition & 1 deletion examples/kitchen-sink/packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@repo/eslint-config": "workspace:*",
"@repo/jest-presets": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/node": "^20.11.24",
"jest": "^29.7.0",
"tsup": "^8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/kitchen-sink/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@repo/eslint-config": "workspace:*",
"@repo/jest-presets": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/node": "^20.11.24",
"@types/react": "^18.2.62",
"@types/react-dom": "^18.2.19",
Expand Down
11 changes: 7 additions & 4 deletions examples/kitchen-sink/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/with-docker/apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/body-parser": "^1.19.5",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/morgan": "^1.9.9",
"@types/node": "^20.11.24",
"@types/supertest": "^6.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
import type { Config } from "jest";

const config = {
roots: ["<rootDir>"],
transform: {
"^.+\\.tsx?$": "ts-jest",
Expand All @@ -10,4 +12,6 @@ module.exports = {
"<rootDir>/dist",
],
preset: "ts-jest",
};
} as const satisfies Config;

export default config;
7 changes: 4 additions & 3 deletions examples/with-docker/packages/jest-presets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"private": true,
"license": "MIT",
"files": [
"node/jest-preset.js"
"node/jest-preset.ts"
],
"dependencies": {
"ts-jest": "^29.1.1"
"jest": "^29.7.0",
"ts-jest": "^29.2.5"
}
}
}
2 changes: 1 addition & 1 deletion examples/with-docker/packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@repo/eslint-config": "*",
"@repo/jest-presets": "*",
"@repo/typescript-config": "*",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.13",
"@types/node": "^20.11.24",
"eslint": "^8.57.0",
"jest": "^29.7.0",
Expand Down
80 changes: 61 additions & 19 deletions examples/with-docker/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -988,10 +988,10 @@
dependencies:
"@types/istanbul-lib-report" "*"

"@types/jest@^29.5.12":
version "29.5.12"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544"
integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==
"@types/jest@^29.5.13":
version "29.5.13"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.13.tgz#8bc571659f401e6a719a7bf0dbcb8b78c71a8adc"
integrity sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==
dependencies:
expect "^29.0.0"
pretty-format "^29.0.0"
Expand Down Expand Up @@ -1577,6 +1577,11 @@ ast-types-flow@^0.0.8:
resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.8.tgz#0a85e1c92695769ac13a428bb653e7538bea27d6"
integrity sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==

async@^3.2.3:
version "3.2.6"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce"
integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==

asynciterator.prototype@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz#8c5df0514936cdd133604dfcc9d3fb93f09b2b62"
Expand Down Expand Up @@ -1733,7 +1738,7 @@ browserslist@^4.22.2:
node-releases "^2.0.14"
update-browserslist-db "^1.0.13"

bs-logger@0.x:
bs-logger@^0.2.6:
version "0.2.6"
resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8"
integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==
Expand Down Expand Up @@ -1807,7 +1812,7 @@ chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"

chalk@^4.0.0:
chalk@^4.0.0, chalk@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
Expand Down Expand Up @@ -2127,6 +2132,13 @@ [email protected]:
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==

ejs@^3.1.10:
version "3.1.10"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b"
integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==
dependencies:
jake "^10.8.5"

electron-to-chromium@^1.4.648:
version "1.4.652"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.652.tgz#1591c7542d43c990de786374c07a9d6ad2b63787"
Expand Down Expand Up @@ -2742,6 +2754,13 @@ file-entry-cache@^6.0.1:
dependencies:
flat-cache "^3.0.4"

filelist@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5"
integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==
dependencies:
minimatch "^5.0.1"

fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
Expand Down Expand Up @@ -3450,6 +3469,16 @@ jackspeak@^2.3.5:
optionalDependencies:
"@pkgjs/parseargs" "^0.11.0"

jake@^10.8.5:
version "10.9.2"
resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.2.tgz#6ae487e6a69afec3a5e167628996b59f35ae2b7f"
integrity sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==
dependencies:
async "^3.2.3"
chalk "^4.0.2"
filelist "^1.0.4"
minimatch "^3.1.2"

jest-changed-files@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a"
Expand Down Expand Up @@ -3946,7 +3975,7 @@ locate-path@^6.0.0:
dependencies:
p-locate "^5.0.0"

lodash.memoize@4.x:
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==
Expand Down Expand Up @@ -3994,7 +4023,7 @@ make-dir@^4.0.0:
dependencies:
semver "^7.5.3"

make-error@1.x:
make-error@^1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
Expand Down Expand Up @@ -4085,6 +4114,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

minimatch@^5.0.1:
version "5.1.6"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
dependencies:
brace-expansion "^2.0.1"

minimist@^1.2.0, minimist@^1.2.6:
version "1.2.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
Expand Down Expand Up @@ -4783,6 +4819,11 @@ semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4:
dependencies:
lru-cache "^6.0.0"

semver@^7.6.3:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==

[email protected]:
version "0.18.0"
resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be"
Expand Down Expand Up @@ -5201,19 +5242,20 @@ ts-api-utils@^1.0.1:
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331"
integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==

ts-jest@^29.1.1:
version "29.1.2"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.2.tgz#7613d8c81c43c8cb312c6904027257e814c40e09"
integrity sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==
ts-jest@^29.2.5:
version "29.2.5"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.5.tgz#591a3c108e1f5ebd013d3152142cb5472b399d63"
integrity sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==
dependencies:
bs-logger "0.x"
fast-json-stable-stringify "2.x"
bs-logger "^0.2.6"
ejs "^3.1.10"
fast-json-stable-stringify "^2.1.0"
jest-util "^29.0.0"
json5 "^2.2.3"
lodash.memoize "4.x"
make-error "1.x"
semver "^7.5.3"
yargs-parser "^21.0.1"
lodash.memoize "^4.1.2"
make-error "^1.3.6"
semver "^7.6.3"
yargs-parser "^21.1.1"

tsconfig-paths@^3.15.0:
version "3.15.0"
Expand Down Expand Up @@ -5545,7 +5587,7 @@ yallist@^4.0.0:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yargs-parser@^21.0.1, yargs-parser@^21.1.1:
yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
Expand Down
4 changes: 0 additions & 4 deletions examples/with-nestjs/apps/api/jest.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions examples/with-nestjs/apps/api/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { config } from '@repo/jest-config/nest';

export default config;
8 changes: 4 additions & 4 deletions examples/with-nestjs/apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"@repo/jest-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/express": "^4.17.17",
"@types/jest": "^29.5.2",
"@types/jest": "^29.5.13",
"@types/node": "^20.3.1",
"@types/supertest": "^6.0.0",
"jest": "^29.5.0",
"jest": "^29.7.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-jest": "^29.2.5",
"ts-loader": "^9.4.3",
"ts-node": "^10.9.1",
"ts-node": "10.9.2",
"tsconfig-paths": "^4.2.0",
"typescript": "5.4.5"
}
Expand Down
3 changes: 0 additions & 3 deletions examples/with-nestjs/apps/web/jest.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions examples/with-nestjs/apps/web/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@repo/jest-config/next';

export default config;
Loading
Loading