From 20f7358d5e0857ea2ffde3c30dc304a92aae7db2 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 13:57:14 +0100 Subject: [PATCH 01/11] chore: migrate to nx 22.3 --- migrations.json | 15 ++ package.json | 26 +-- yarn.lock | 569 ++++++++++++++++++++++++------------------------ 3 files changed, 317 insertions(+), 293 deletions(-) diff --git a/migrations.json b/migrations.json index 8b0a7f1e..1968dd3e 100644 --- a/migrations.json +++ b/migrations.json @@ -1,5 +1,20 @@ { "migrations": [ + { + "version": "22.2.0-beta.2", + "description": "Convert jest.config.ts files from ESM to CJS syntax (export default -> module.exports, import -> require) for projects using CommonJS resolution to ensure correct loading under Node.js type-stripping.", + "implementation": "./src/migrations/update-22-2-0/convert-jest-config-to-cjs", + "package": "@nx/jest", + "name": "convert-jest-config-to-cjs" + }, + { + "version": "22.3.2-beta.0", + "requires": { "jest": ">=30.0.0" }, + "description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher", + "implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases", + "package": "@nx/jest", + "name": "replace-removed-matcher-aliases-v22-3" + }, { "version": "22.0.0-beta.1", "description": "Updates release version config based on the breaking changes in Nx v22", diff --git a/package.json b/package.json index 0b3b1c6d..6c20e9bf 100644 --- a/package.json +++ b/package.json @@ -38,18 +38,18 @@ "@fluentui/scheme-utilities": "^8.3.58", "@fluentui/storybook-llms-extractor": "^0.0.3", "@griffel/shadow-dom": "~0.2.0", - "@nx/devkit": "22.1.3", - "@nx/eslint": "22.1.3", - "@nx/eslint-plugin": "22.1.3", - "@nx/jest": "22.1.3", - "@nx/js": "22.1.3", - "@nx/playwright": "22.1.3", - "@nx/plugin": "22.1.3", - "@nx/react": "22.1.3", - "@nx/storybook": "22.1.3", - "@nx/web": "22.1.3", - "@nx/webpack": "22.1.3", - "@nx/workspace": "22.1.3", + "@nx/devkit": "22.3.3", + "@nx/eslint": "22.3.3", + "@nx/eslint-plugin": "22.3.3", + "@nx/jest": "22.3.3", + "@nx/js": "22.3.3", + "@nx/playwright": "22.3.3", + "@nx/plugin": "22.3.3", + "@nx/react": "22.3.3", + "@nx/storybook": "22.3.3", + "@nx/web": "22.3.3", + "@nx/webpack": "22.3.3", + "@nx/workspace": "22.3.3", "@playwright/experimental-ct-react": "1.56.1", "@playwright/experimental-ct-react17": "1.56.1", "@rnx-kit/eslint-plugin": "0.8.6", @@ -81,7 +81,7 @@ "jest-environment-jsdom": "30.0.5", "jest-util": "^30.0.2", "jsonc-eslint-parser": "2.4.0", - "nx": "22.1.3", + "nx": "22.3.3", "parsel-js": "^1.1.2", "patch-package": "^7.0.2", "playwright": "1.56.1", diff --git a/yarn.lock b/yarn.lock index 0bc9703d..74297bf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,16 +19,6 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0": - version: 2.2.1 - resolution: "@ampproject/remapping@npm:2.2.1" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.0" - "@jridgewell/trace-mapping": "npm:^0.3.9" - checksum: 10c0/92ce5915f8901d8c7cd4f4e6e2fe7b9fd335a29955b400caa52e0e5b12ca3796ada7c2f10e78c9c5b0f9c2539dff0ffea7b19850a56e1487aa083531e1e46d43 - languageName: node - linkType: hard - "@asamuzakjp/css-color@npm:^3.2.0": version: 3.2.0 resolution: "@asamuzakjp/css-color@npm:3.2.0" @@ -42,57 +32,57 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.27.1": - version: 7.27.1 - resolution: "@babel/code-frame@npm:7.27.1" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.16.7, @babel/code-frame@npm:^7.27.1, @babel/code-frame@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/code-frame@npm:7.28.6" dependencies: - "@babel/helper-validator-identifier": "npm:^7.27.1" + "@babel/helper-validator-identifier": "npm:^7.28.5" js-tokens: "npm:^4.0.0" picocolors: "npm:^1.1.1" - checksum: 10c0/5dd9a18baa5fce4741ba729acc3a3272c49c25cb8736c4b18e113099520e7ef7b545a4096a26d600e4416157e63e87d66db46aa3fbf0a5f2286da2705c12da00 + checksum: 10c0/ed5d57f99455e3b1c23e75ebb8430c6b9800b4ecd0121b4348b97cecb65406a47778d6db61f0d538a4958bb01b4b277e90348a68d39bd3beff1d7c940ed6dd66 languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.27.1, @babel/compat-data@npm:^7.27.2": - version: 7.28.0 - resolution: "@babel/compat-data@npm:7.28.0" - checksum: 10c0/c4e527302bcd61052423f757355a71c3bc62362bac13f7f130de16e439716f66091ff5bdecda418e8fa0271d4c725f860f0ee23ab7bf6e769f7a8bb16dfcb531 +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.27.1, @babel/compat-data@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/compat-data@npm:7.28.6" + checksum: 10c0/2d047431041281eaf33e9943d1a269d3374dbc9b498cafe6a18f5ee9aee7bb96f7f6cac0304eab4d13c41fc4db00fe4ca16c7aa44469ca6a211b8b6343b78fc4 languageName: node linkType: hard "@babel/core@npm:^7.18.9, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.26.0, @babel/core@npm:^7.27.4": - version: 7.28.0 - resolution: "@babel/core@npm:7.28.0" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.27.1" - "@babel/generator": "npm:^7.28.0" - "@babel/helper-compilation-targets": "npm:^7.27.2" - "@babel/helper-module-transforms": "npm:^7.27.3" - "@babel/helpers": "npm:^7.27.6" - "@babel/parser": "npm:^7.28.0" - "@babel/template": "npm:^7.27.2" - "@babel/traverse": "npm:^7.28.0" - "@babel/types": "npm:^7.28.0" + version: 7.28.6 + resolution: "@babel/core@npm:7.28.6" + dependencies: + "@babel/code-frame": "npm:^7.28.6" + "@babel/generator": "npm:^7.28.6" + "@babel/helper-compilation-targets": "npm:^7.28.6" + "@babel/helper-module-transforms": "npm:^7.28.6" + "@babel/helpers": "npm:^7.28.6" + "@babel/parser": "npm:^7.28.6" + "@babel/template": "npm:^7.28.6" + "@babel/traverse": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" + "@jridgewell/remapping": "npm:^2.3.5" convert-source-map: "npm:^2.0.0" debug: "npm:^4.1.0" gensync: "npm:^1.0.0-beta.2" json5: "npm:^2.2.3" semver: "npm:^6.3.1" - checksum: 10c0/423302e7c721e73b1c096217880272e02020dfb697a55ccca60ad01bba90037015f84d0c20c6ce297cf33a19bb704bc5c2b3d3095f5284dfa592bd1de0b9e8c3 + checksum: 10c0/716b88b1ab057aa53ffa40f2b2fb7e4ab7a35cd6a065fa60e55ca13d2a666672592329f7ea9269aec17e90cc7ce29f42eda566d07859bfd998329a9f283faadb languageName: node linkType: hard -"@babel/generator@npm:^7.27.5, @babel/generator@npm:^7.28.0": - version: 7.28.0 - resolution: "@babel/generator@npm:7.28.0" +"@babel/generator@npm:^7.27.5, @babel/generator@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/generator@npm:7.28.6" dependencies: - "@babel/parser": "npm:^7.28.0" - "@babel/types": "npm:^7.28.0" + "@babel/parser": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" "@jridgewell/gen-mapping": "npm:^0.3.12" "@jridgewell/trace-mapping": "npm:^0.3.28" jsesc: "npm:^3.0.2" - checksum: 10c0/1b3d122268ea3df50fde707ad864d9a55c72621357d5cebb972db3dd76859c45810c56e16ad23123f18f80cc2692f5a015d2858361300f0f224a05dc43d36a92 + checksum: 10c0/162fa358484a9a18e8da1235d998f10ea77c63bab408c8d3e327d5833f120631a77ff022c5ed1d838ee00523f8bb75df1f08196d3657d0bca9f2cfeb8503cc12 languageName: node linkType: hard @@ -105,16 +95,16 @@ __metadata: languageName: node linkType: hard -"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.27.1, @babel/helper-compilation-targets@npm:^7.27.2": - version: 7.27.2 - resolution: "@babel/helper-compilation-targets@npm:7.27.2" +"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.27.1, @babel/helper-compilation-targets@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/helper-compilation-targets@npm:7.28.6" dependencies: - "@babel/compat-data": "npm:^7.27.2" + "@babel/compat-data": "npm:^7.28.6" "@babel/helper-validator-option": "npm:^7.27.1" browserslist: "npm:^4.24.0" lru-cache: "npm:^5.1.1" semver: "npm:^6.3.1" - checksum: 10c0/f338fa00dcfea931804a7c55d1a1c81b6f0a09787e528ec580d5c21b3ecb3913f6cb0f361368973ce953b824d910d3ac3e8a8ee15192710d3563826447193ad1 + checksum: 10c0/3fcdf3b1b857a1578e99d20508859dbd3f22f3c87b8a0f3dc540627b4be539bae7f6e61e49d931542fe5b557545347272bbdacd7f58a5c77025a18b745593a50 languageName: node linkType: hard @@ -195,26 +185,26 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-imports@npm:^7.18.6, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.27.1": - version: 7.27.1 - resolution: "@babel/helper-module-imports@npm:7.27.1" +"@babel/helper-module-imports@npm:^7.18.6, @babel/helper-module-imports@npm:^7.22.15, @babel/helper-module-imports@npm:^7.27.1, @babel/helper-module-imports@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/helper-module-imports@npm:7.28.6" dependencies: - "@babel/traverse": "npm:^7.27.1" - "@babel/types": "npm:^7.27.1" - checksum: 10c0/e00aace096e4e29290ff8648455c2bc4ed982f0d61dbf2db1b5e750b9b98f318bf5788d75a4f974c151bd318fd549e81dbcab595f46b14b81c12eda3023f51e8 + "@babel/traverse": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" + checksum: 10c0/b49d8d8f204d9dbfd5ac70c54e533e5269afb3cea966a9d976722b13e9922cc773a653405f53c89acb247d5aebdae4681d631a3ae3df77ec046b58da76eda2ac languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.27.1, @babel/helper-module-transforms@npm:^7.27.3": - version: 7.27.3 - resolution: "@babel/helper-module-transforms@npm:7.27.3" +"@babel/helper-module-transforms@npm:^7.27.1, @babel/helper-module-transforms@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/helper-module-transforms@npm:7.28.6" dependencies: - "@babel/helper-module-imports": "npm:^7.27.1" - "@babel/helper-validator-identifier": "npm:^7.27.1" - "@babel/traverse": "npm:^7.27.3" + "@babel/helper-module-imports": "npm:^7.28.6" + "@babel/helper-validator-identifier": "npm:^7.28.5" + "@babel/traverse": "npm:^7.28.6" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10c0/fccb4f512a13b4c069af51e1b56b20f54024bcf1591e31e978a30f3502567f34f90a80da6a19a6148c249216292a8074a0121f9e52602510ef0f32dbce95ca01 + checksum: 10c0/6f03e14fc30b287ce0b839474b5f271e72837d0cafe6b172d759184d998fbee3903a035e81e07c2c596449e504f453463d58baa65b6f40a37ded5bec74620b2b languageName: node linkType: hard @@ -277,10 +267,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.27.1": - version: 7.27.1 - resolution: "@babel/helper-validator-identifier@npm:7.27.1" - checksum: 10c0/c558f11c4871d526498e49d07a84752d1800bf72ac0d3dad100309a2eaba24efbf56ea59af5137ff15e3a00280ebe588560534b0e894a4750f8b1411d8f78b84 +"@babel/helper-validator-identifier@npm:^7.27.1, @babel/helper-validator-identifier@npm:^7.28.5": + version: 7.28.5 + resolution: "@babel/helper-validator-identifier@npm:7.28.5" + checksum: 10c0/42aaebed91f739a41f3d80b72752d1f95fd7c72394e8e4bd7cdd88817e0774d80a432451bcba17c2c642c257c483bf1d409dd4548883429ea9493a3bc4ab0847 languageName: node linkType: hard @@ -302,24 +292,24 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.27.6": - version: 7.28.2 - resolution: "@babel/helpers@npm:7.28.2" +"@babel/helpers@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/helpers@npm:7.28.6" dependencies: - "@babel/template": "npm:^7.27.2" - "@babel/types": "npm:^7.28.2" - checksum: 10c0/f3e7b21517e2699c4ca193663ecfb1bf1b2ae2762d8ba4a9f1786feaca0d6984537fc60bf2206e92c43640a6dada6b438f523cc1ad78610d0151aeb061b37f63 + "@babel/template": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" + checksum: 10c0/c4a779c66396bb0cf619402d92f1610601ff3832db2d3b86b9c9dd10983bf79502270e97ac6d5280cea1b1a37de2f06ecbac561bd2271545270407fbe64027cb languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.27.2, @babel/parser@npm:^7.28.0": - version: 7.28.0 - resolution: "@babel/parser@npm:7.28.0" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/parser@npm:7.28.6" dependencies: - "@babel/types": "npm:^7.28.0" + "@babel/types": "npm:^7.28.6" bin: parser: ./bin/babel-parser.js - checksum: 10c0/c2ef81d598990fa949d1d388429df327420357cb5200271d0d0a2784f1e6d54afc8301eb8bdf96d8f6c77781e402da93c7dc07980fcc136ac5b9d5f1fce701b5 + checksum: 10c0/d6bfe8aa8e067ef58909e9905496157312372ca65d8d2a4f2b40afbea48d59250163755bba8ae626a615da53d192b084bcfc8c9dad8b01e315b96967600de581 languageName: node linkType: hard @@ -1456,39 +1446,39 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.27.1, @babel/template@npm:^7.27.2": - version: 7.27.2 - resolution: "@babel/template@npm:7.27.2" +"@babel/template@npm:^7.27.1, @babel/template@npm:^7.27.2, @babel/template@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/template@npm:7.28.6" dependencies: - "@babel/code-frame": "npm:^7.27.1" - "@babel/parser": "npm:^7.27.2" - "@babel/types": "npm:^7.27.1" - checksum: 10c0/ed9e9022651e463cc5f2cc21942f0e74544f1754d231add6348ff1b472985a3b3502041c0be62dc99ed2d12cfae0c51394bf827452b98a2f8769c03b87aadc81 + "@babel/code-frame": "npm:^7.28.6" + "@babel/parser": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" + checksum: 10c0/66d87225ed0bc77f888181ae2d97845021838c619944877f7c4398c6748bcf611f216dfd6be74d39016af502bca876e6ce6873db3c49e4ac354c56d34d57e9f5 languageName: node linkType: hard -"@babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.27.3, @babel/traverse@npm:^7.28.0": - version: 7.28.0 - resolution: "@babel/traverse@npm:7.28.0" +"@babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.27.1, @babel/traverse@npm:^7.28.6": + version: 7.28.6 + resolution: "@babel/traverse@npm:7.28.6" dependencies: - "@babel/code-frame": "npm:^7.27.1" - "@babel/generator": "npm:^7.28.0" + "@babel/code-frame": "npm:^7.28.6" + "@babel/generator": "npm:^7.28.6" "@babel/helper-globals": "npm:^7.28.0" - "@babel/parser": "npm:^7.28.0" - "@babel/template": "npm:^7.27.2" - "@babel/types": "npm:^7.28.0" + "@babel/parser": "npm:^7.28.6" + "@babel/template": "npm:^7.28.6" + "@babel/types": "npm:^7.28.6" debug: "npm:^4.3.1" - checksum: 10c0/32794402457827ac558173bcebdcc0e3a18fa339b7c41ca35621f9f645f044534d91bb923ff385f5f960f2e495f56ce18d6c7b0d064d2f0ccb55b285fa6bc7b9 + checksum: 10c0/ed5deb9c3f03e2d1ad2d44b9c92c84cce24593245c3f7871ce27ee1b36d98034e6cd895fa98a94eb44ebabe1d22f51b10b09432939d1c51a0fcaab98f17a97bc languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.0, @babel/types@npm:^7.28.2, @babel/types@npm:^7.4.4": - version: 7.28.2 - resolution: "@babel/types@npm:7.28.2" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.18.9, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.27.1, @babel/types@npm:^7.27.3, @babel/types@npm:^7.28.2, @babel/types@npm:^7.28.6, @babel/types@npm:^7.4.4": + version: 7.28.6 + resolution: "@babel/types@npm:7.28.6" dependencies: "@babel/helper-string-parser": "npm:^7.27.1" - "@babel/helper-validator-identifier": "npm:^7.27.1" - checksum: 10c0/24b11c9368e7e2c291fe3c1bcd1ed66f6593a3975f479cbb9dd7b8c8d8eab8a962b0d2fca616c043396ce82500ac7d23d594fbbbd013828182c01596370a0b10 + "@babel/helper-validator-identifier": "npm:^7.28.5" + checksum: 10c0/54a6a9813e48ef6f35aa73c03b3c1572cad7fa32b61b35dd07e4230bc77b559194519c8a4d8106a041a27cc7a94052579e238a30a32d5509aa4da4d6fd83d990 languageName: node linkType: hard @@ -4495,7 +4485,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.12, @jridgewell/gen-mapping@npm:^0.3.5": +"@jridgewell/gen-mapping@npm:^0.3.12, @jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.12 resolution: "@jridgewell/gen-mapping@npm:0.3.12" dependencies: @@ -4505,6 +4495,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/remapping@npm:^2.3.5": + version: 2.3.5 + resolution: "@jridgewell/remapping@npm:2.3.5" + dependencies: + "@jridgewell/gen-mapping": "npm:^0.3.5" + "@jridgewell/trace-mapping": "npm:^0.3.24" + checksum: 10c0/3de494219ffeb2c5c38711d0d7bb128097edf91893090a2dbc8ee0b55d092bb7347b1fd0f478486c5eab010e855c73927b1666f2107516d472d24a73017d1194 + languageName: node + linkType: hard + "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": version: 3.1.1 resolution: "@jridgewell/resolve-uri@npm:3.1.1" @@ -4539,7 +4539,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.28, @jridgewell/trace-mapping@npm:^0.3.9": +"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.23, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25, @jridgewell/trace-mapping@npm:^0.3.28": version: 0.3.29 resolution: "@jridgewell/trace-mapping@npm:0.3.29" dependencies: @@ -5137,13 +5137,13 @@ __metadata: languageName: node linkType: hard -"@nx/cypress@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/cypress@npm:22.1.3" +"@nx/cypress@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/cypress@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" detect-port: "npm:^1.5.1" semver: "npm:^7.6.3" @@ -5154,13 +5154,13 @@ __metadata: peerDependenciesMeta: cypress: optional: true - checksum: 10c0/5adf7db3eee45018913a1edf62649db5dba878267099025a81b4f820f270fcdeba2c94621cb6b1bef75cb7211fdf6e22df487736b9be8dc4d7d538fde95b96aa + checksum: 10c0/0fa6bcec21ceec4de8f164330259da7c2bf6adf446ca5b788a428ca520d76abf734bbfcf5746280168140059e97588e0db890f1e91916b388070496c310c483c languageName: node linkType: hard -"@nx/devkit@npm:22.1.3, @nx/devkit@npm:^22": - version: 22.1.3 - resolution: "@nx/devkit@npm:22.1.3" +"@nx/devkit@npm:22.3.3, @nx/devkit@npm:^22": + version: 22.3.3 + resolution: "@nx/devkit@npm:22.3.3" dependencies: "@zkochan/js-yaml": "npm:0.0.7" ejs: "npm:^3.1.7" @@ -5171,16 +5171,16 @@ __metadata: yargs-parser: "npm:21.1.1" peerDependencies: nx: ">= 21 <= 23 || ^22.0.0-0" - checksum: 10c0/9b75154962edf6b1aeee4392c1db5218964ed95eb0b5cc66f499c802acd957789fef2551964dac21682768f78552502bdb43bfe5f364b89dbd9f8ecb637e2e42 + checksum: 10c0/4b603b5e1652ff1fd35bc3f8cfd8593a0077fcb1ec413c5e85d957a476b2fb5447deb60de8418ce5d87afe769e19be9dcacbebb98181e487c5d234643cb8ee44 languageName: node linkType: hard -"@nx/eslint-plugin@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/eslint-plugin@npm:22.1.3" +"@nx/eslint-plugin@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/eslint-plugin@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" "@typescript-eslint/type-utils": "npm:^8.0.0" "@typescript-eslint/utils": "npm:^8.0.0" @@ -5196,16 +5196,16 @@ __metadata: peerDependenciesMeta: eslint-config-prettier: optional: true - checksum: 10c0/41f3c875f7bdf0fa5c38d6233853ce8d040b45474d408ef12bb3adb37a2814038d928e0b418d8e5884a322257ce88ef05af8c96d49de3491c2029659a4e9b436 + checksum: 10c0/7d3de31158561d651f604c1e8efd51722638fcf0daf7df36caf82224709ac2a898f40dddbcb991998b40f9094889a58a013da2f95cf2b4c70fd72f68364da82b languageName: node linkType: hard -"@nx/eslint@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/eslint@npm:22.1.3" +"@nx/eslint@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/eslint@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" semver: "npm:^7.6.3" tslib: "npm:^2.3.0" typescript: "npm:~5.9.2" @@ -5215,18 +5215,18 @@ __metadata: peerDependenciesMeta: "@zkochan/js-yaml": optional: true - checksum: 10c0/875d3d2971d86fb3fd0c26e480edea0808b391696cc51424e9dd97891c916ecb1ac40f137c462858afea2358b89b47d87b49473007a52eb6af0219de4dfbfd9f + checksum: 10c0/b321461b8c23b7fe16dc3ead742275fb19c73e6b3a4e176fd46b8b0c1bcd9d6b38989e1e4a66b6b848cc1002da6baa97da50378afdac6c69ce122409896bf9a9 languageName: node linkType: hard -"@nx/jest@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/jest@npm:22.1.3" +"@nx/jest@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/jest@npm:22.3.3" dependencies: "@jest/reporters": "npm:^30.0.2" "@jest/test-result": "npm:^30.0.2" - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" identity-obj-proxy: "npm:3.0.0" jest-config: "npm:^30.0.2" @@ -5238,13 +5238,13 @@ __metadata: semver: "npm:^7.6.3" tslib: "npm:^2.3.0" yargs-parser: "npm:21.1.1" - checksum: 10c0/cfcac7c5372e21e7808fbeea3a200fd993b3bc53c51c76b86a15179850d6e17fa8db2114e8e44d381622d5de613893df41903b1fdfe76962e630a8c8b66bc601 + checksum: 10c0/2ad3ad611e2715b7bddb1498e78d2c3d023333a370dd8e420ef676ef19ed53fb9f39afd4b656c3ab77f441441e9d675fbafc527beb248b935caeed799ed05fed languageName: node linkType: hard -"@nx/js@npm:22.1.3, @nx/js@npm:^22": - version: 22.1.3 - resolution: "@nx/js@npm:22.1.3" +"@nx/js@npm:22.3.3, @nx/js@npm:^22": + version: 22.3.3 + resolution: "@nx/js@npm:22.3.3" dependencies: "@babel/core": "npm:^7.23.2" "@babel/plugin-proposal-decorators": "npm:^7.22.7" @@ -5253,8 +5253,8 @@ __metadata: "@babel/preset-env": "npm:^7.23.2" "@babel/preset-typescript": "npm:^7.22.5" "@babel/runtime": "npm:^7.22.6" - "@nx/devkit": "npm:22.1.3" - "@nx/workspace": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/workspace": "npm:22.3.3" "@zkochan/js-yaml": "npm:0.0.7" babel-plugin-const-enum: "npm:^1.0.1" babel-plugin-macros: "npm:^3.1.0" @@ -5277,107 +5277,107 @@ __metadata: peerDependenciesMeta: verdaccio: optional: true - checksum: 10c0/b62db9ce14f076b4d3168da418316575d2a39674575b1039c07e4018ea88e614927c2559d01b1fd86177ca7fc9f9ee8519201114cbc5d98c30ff633ab72da97d + checksum: 10c0/96ebac870b84af7c9e30014120c08d7a43fadad6e7d1db0a4e8407b6409d0e7d8dfa7a9a270091637a9d58dfb2b995a63ff1fa803f88509770c6f9836fe06fe1 languageName: node linkType: hard -"@nx/module-federation@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/module-federation@npm:22.1.3" +"@nx/module-federation@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/module-federation@npm:22.3.3" dependencies: "@module-federation/enhanced": "npm:^0.21.2" "@module-federation/node": "npm:^2.7.21" "@module-federation/sdk": "npm:^0.21.2" - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" - "@nx/web": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" + "@nx/web": "npm:22.3.3" "@rspack/core": "npm:^1.5.2" express: "npm:^4.21.2" http-proxy-middleware: "npm:^3.0.5" picocolors: "npm:^1.1.0" tslib: "npm:^2.3.0" webpack: "npm:^5.101.3" - checksum: 10c0/82e5b883fd4d4097c1d9e79e08623e4db9ad39b41bbe83bbec7fa9e6d8b54743e6f3f190d24dfe1a3680fcb4e5094532c7393165d065a42a1f05d116c9d6c479 + checksum: 10c0/7ddfc0d0a95d9658d814fc4f4943683bb3a27c525eb1fc457c09c0f0d095e8cf9e26263229e55911c98768f5b1d64a877529d57ac2030d13d9b234a13b3118b9 languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-darwin-arm64@npm:22.1.3" +"@nx/nx-darwin-arm64@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-darwin-arm64@npm:22.3.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-darwin-x64@npm:22.1.3" +"@nx/nx-darwin-x64@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-darwin-x64@npm:22.3.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-freebsd-x64@npm:22.1.3" +"@nx/nx-freebsd-x64@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-freebsd-x64@npm:22.3.3" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:22.1.3" +"@nx/nx-linux-arm-gnueabihf@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:22.3.3" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-linux-arm64-gnu@npm:22.1.3" +"@nx/nx-linux-arm64-gnu@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-linux-arm64-gnu@npm:22.3.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-linux-arm64-musl@npm:22.1.3" +"@nx/nx-linux-arm64-musl@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-linux-arm64-musl@npm:22.3.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-linux-x64-gnu@npm:22.1.3" +"@nx/nx-linux-x64-gnu@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-linux-x64-gnu@npm:22.3.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-linux-x64-musl@npm:22.1.3" +"@nx/nx-linux-x64-musl@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-linux-x64-musl@npm:22.3.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-win32-arm64-msvc@npm:22.1.3" +"@nx/nx-win32-arm64-msvc@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-win32-arm64-msvc@npm:22.3.3" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/nx-win32-x64-msvc@npm:22.1.3" +"@nx/nx-win32-x64-msvc@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/nx-win32-x64-msvc@npm:22.3.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@nx/playwright@npm:22.1.3, @nx/playwright@npm:^22": - version: 22.1.3 - resolution: "@nx/playwright@npm:22.1.3" +"@nx/playwright@npm:22.3.3, @nx/playwright@npm:^22": + version: 22.3.3 + resolution: "@nx/playwright@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/js": "npm:22.3.3" minimatch: "npm:9.0.3" tslib: "npm:^2.3.0" peerDependencies: @@ -5385,34 +5385,34 @@ __metadata: peerDependenciesMeta: "@playwright/test": optional: true - checksum: 10c0/a1cfd25f9969e2e155998ecad55219e6b789ba88f89f7c0f51dfe56169d8dfc6808151844c8f43918ea509b3bafb603c5b5ef0ed444eb4093757b303a6716484 + checksum: 10c0/3ef2f66381970c63f7d46240c019362c3eee6cd33aa86b939f3a5440aaf3367b97da77e893bbf33aa7d1a28bdad66e2bc059f76780a0816f6731ba5d1b4c0c3d languageName: node linkType: hard -"@nx/plugin@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/plugin@npm:22.1.3" +"@nx/plugin@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/plugin@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/jest": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/jest": "npm:22.3.3" + "@nx/js": "npm:22.3.3" tslib: "npm:^2.3.0" - checksum: 10c0/7be6f5bf768c031b8ebb59be30ea27d2ee7605c748ebb2a6814cf5e6d570de738a859b3868e946903ff5d9dba6bc7a8781ecc172c8e95387c1df099c95f36a57 + checksum: 10c0/a68549832970ae684cabdc964b063deb9a59a54441dc8110455e41883ca0366a0b4fe460db698e4464411f98c239f2d4019d150456e5d10ab8276f9f7efc5813 languageName: node linkType: hard -"@nx/react@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/react@npm:22.1.3" +"@nx/react@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/react@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/js": "npm:22.1.3" - "@nx/module-federation": "npm:22.1.3" - "@nx/rollup": "npm:22.1.3" - "@nx/vite": "npm:22.1.3" - "@nx/web": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/js": "npm:22.3.3" + "@nx/module-federation": "npm:22.3.3" + "@nx/rollup": "npm:22.3.3" + "@nx/vite": "npm:22.3.3" + "@nx/web": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" "@svgr/webpack": "npm:^8.0.1" express: "npm:^4.21.2" @@ -5425,16 +5425,16 @@ __metadata: dependenciesMeta: "@nx/vite": optional: true - checksum: 10c0/53bba35ac861280b2d9ba6903a6d60d069343f9c20375cc95a34de62be0059aa66e538cae92927958d4f8aaa323ecae4c05b1dbc8d1b22eee119287846b87e88 + checksum: 10c0/9a12b6d32baacda249e7190eae84f01d4c0fb4873c200b723f17594a76dd30cd634b85d6c535cce16b084daebb9ce2f21d720a18c75c8456180c30182dbf47fe languageName: node linkType: hard -"@nx/rollup@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/rollup@npm:22.1.3" +"@nx/rollup@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/rollup@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@rollup/plugin-babel": "npm:^6.0.4" "@rollup/plugin-commonjs": "npm:^25.0.7" "@rollup/plugin-image": "npm:^3.0.3" @@ -5449,34 +5449,34 @@ __metadata: rollup-plugin-postcss: "npm:^4.0.2" rollup-plugin-typescript2: "npm:^0.36.0" tslib: "npm:^2.3.0" - checksum: 10c0/878e251911f6eb7b042229643e55d362cc867cd7c8cda1c4c17d45a040e3997f16e369c605420e6899382a70906f7da84a3feaaf28dddccb45c8c9da3266725f + checksum: 10c0/f1da8621393c4f32830c0dd41fb85c9291de7b13e52139803a7ba20ee649715eb023b9d564aed9f4d807f52809c6d6c0ae6b40acf10d4b6a9ee5fa61c5af8fe6 languageName: node linkType: hard -"@nx/storybook@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/storybook@npm:22.1.3" +"@nx/storybook@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/storybook@npm:22.3.3" dependencies: - "@nx/cypress": "npm:22.1.3" - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/cypress": "npm:22.3.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" semver: "npm:^7.6.3" tslib: "npm:^2.3.0" peerDependencies: storybook: ">=7.0.0 <11.0.0" - checksum: 10c0/0dc502f1f28cf2ef9103f82ee4d8f43ab5ff8bb3b2d361748e562e1e622e9fec601cdce17ebb8289563d05dd1729268b547c385bf41d230582fdd5e9b82ed412 + checksum: 10c0/d6e4a9ac5d69ec0e84f6fa4fd9c81ad35b17ac9397bdc8e00463d27de00bfd83dcc5ae8360b4d5b58adb67a075c8343879801d4702958d802662ec1eac339926 languageName: node linkType: hard -"@nx/vite@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/vite@npm:22.1.3" +"@nx/vite@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/vite@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" - "@nx/vitest": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" + "@nx/vitest": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" ajv: "npm:^8.0.0" enquirer: "npm:~2.3.6" @@ -5487,16 +5487,16 @@ __metadata: peerDependencies: vite: ^5.0.0 || ^6.0.0 || ^7.0.0 vitest: ^1.3.1 || ^2.0.0 || ^3.0.0 || ^4.0.0 - checksum: 10c0/9ec28db7ecf4d60b55ee60b853a35c1233bc391302b5039bfc97ae96b55c7961130c26e0da7a90719f9f1d170c120970e21a3147bd9b190fb5bc581708a95a93 + checksum: 10c0/fb6a076b80165821cca8ef8cc6c6e494bdbfbaa11d16e4ac7c7ee2773b08ea50fb2af4d93300230d3bde157dd7f92c73df2f759cb073c0437c8cc03b0677e3cc languageName: node linkType: hard -"@nx/vitest@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/vitest@npm:22.1.3" +"@nx/vitest@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/vitest@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" semver: "npm:^7.6.3" tslib: "npm:^2.3.0" @@ -5508,31 +5508,31 @@ __metadata: optional: true vitest: optional: true - checksum: 10c0/b73a76dbfe47eb86729dd8d9bf43f725b81f0f6823414645a0bf15e67f4582cf189fee1dff6a69318e17eb18954e369f6fad6d232410196047b0ed827bdf71ad + checksum: 10c0/20fe2a57e62473058bc5f03b3916baa5d7fae445bc0780b65431469ab22127cc98bb189daf01585a6bd0c141aedfc3aacc19a8ea4115076db1d95afd269a3fe5 languageName: node linkType: hard -"@nx/web@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/web@npm:22.1.3" +"@nx/web@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/web@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" detect-port: "npm:^1.5.1" http-server: "npm:^14.1.0" picocolors: "npm:^1.1.0" tslib: "npm:^2.3.0" - checksum: 10c0/203a55c72fc1778ba7bcbdb559baacb4e71d47e8160ea90f723ac3511dba1c5113d4012b380a27138cdfd2f7058fca504bde000f2ef79d96ae6c390baeff5465 + checksum: 10c0/1a7dccdd310e002fe9fdd627d0532bceb628b3498e11fff75ef2613b72ea1d78046bfc76b06eac910de3f2640c0e2a0f6b71edcc036ed5d9007b31221061b091 languageName: node linkType: hard -"@nx/webpack@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/webpack@npm:22.1.3" +"@nx/webpack@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/webpack@npm:22.3.3" dependencies: "@babel/core": "npm:^7.23.2" - "@nx/devkit": "npm:22.1.3" - "@nx/js": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/js": "npm:22.3.3" "@phenomnomnominal/tsquery": "npm:~5.0.1" ajv: "npm:^8.12.0" autoprefixer: "npm:^10.4.9" @@ -5566,24 +5566,24 @@ __metadata: webpack-dev-server: "npm:^5.2.1" webpack-node-externals: "npm:^3.0.0" webpack-subresource-integrity: "npm:^5.1.0" - checksum: 10c0/bb7d845293d7536f2ae84c3960e100c743420db1263932d98eaefb8fc23cc818ffa7f7830817be0c40166e6d2f352e286c008445ac62ae01b9a82dd5a037d026 + checksum: 10c0/50830d2f26ea2ce90563b911261faf871a284f76a51c87bb34742fa9560994c57d1e7898933537fc4fb11980f0c328e732d3970537f09ee1b3b18c7ec81623b7 languageName: node linkType: hard -"@nx/workspace@npm:22.1.3": - version: 22.1.3 - resolution: "@nx/workspace@npm:22.1.3" +"@nx/workspace@npm:22.3.3": + version: 22.3.3 + resolution: "@nx/workspace@npm:22.3.3" dependencies: - "@nx/devkit": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" "@zkochan/js-yaml": "npm:0.0.7" chalk: "npm:^4.1.0" enquirer: "npm:~2.3.6" - nx: "npm:22.1.3" + nx: "npm:22.3.3" picomatch: "npm:4.0.2" semver: "npm:^7.6.3" tslib: "npm:^2.3.0" yargs-parser: "npm:21.1.1" - checksum: 10c0/0e67d7bd353f749dab4b7a3f55fc84586b38281a6591454b6a0594f7c33602c8c2121d138c434818b2c19241928200d103155f9b3d7b55eae30383b7314b222c + checksum: 10c0/7f6f43991f8c71fbf67c33f67a07f361deb38fb05a03aa64bda8e42a6bd80adf5468e884eff688eb7dafa883a6122436d8720b1447c204a41b5fff4a9f12840a languageName: node linkType: hard @@ -7183,11 +7183,11 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.18.0": - version: 7.20.5 - resolution: "@types/babel__traverse@npm:7.20.5" + version: 7.28.0 + resolution: "@types/babel__traverse@npm:7.28.0" dependencies: - "@babel/types": "npm:^7.20.7" - checksum: 10c0/033abcb2f4c084ad33e30c3efaad82161240f351e3c71b6154ed289946b33b363696c0fbd42502b68e4582a87413c418321f40eb1ea863e34fe525641345e05b + "@babel/types": "npm:^7.28.2" + checksum: 10c0/b52d7d4e8fc6a9018fe7361c4062c1c190f5778cf2466817cb9ed19d69fbbb54f9a85ffedeb748ed8062d2cf7d4cc088ee739848f47c57740de1c48cbf0d0994 languageName: node linkType: hard @@ -12077,18 +12077,18 @@ __metadata: "@fluentui/scheme-utilities": "npm:^8.3.58" "@fluentui/storybook-llms-extractor": "npm:^0.0.3" "@griffel/shadow-dom": "npm:~0.2.0" - "@nx/devkit": "npm:22.1.3" - "@nx/eslint": "npm:22.1.3" - "@nx/eslint-plugin": "npm:22.1.3" - "@nx/jest": "npm:22.1.3" - "@nx/js": "npm:22.1.3" - "@nx/playwright": "npm:22.1.3" - "@nx/plugin": "npm:22.1.3" - "@nx/react": "npm:22.1.3" - "@nx/storybook": "npm:22.1.3" - "@nx/web": "npm:22.1.3" - "@nx/webpack": "npm:22.1.3" - "@nx/workspace": "npm:22.1.3" + "@nx/devkit": "npm:22.3.3" + "@nx/eslint": "npm:22.3.3" + "@nx/eslint-plugin": "npm:22.3.3" + "@nx/jest": "npm:22.3.3" + "@nx/js": "npm:22.3.3" + "@nx/playwright": "npm:22.3.3" + "@nx/plugin": "npm:22.3.3" + "@nx/react": "npm:22.3.3" + "@nx/storybook": "npm:22.3.3" + "@nx/web": "npm:22.3.3" + "@nx/webpack": "npm:22.3.3" + "@nx/workspace": "npm:22.3.3" "@playwright/experimental-ct-react": "npm:1.56.1" "@playwright/experimental-ct-react17": "npm:1.56.1" "@rnx-kit/eslint-plugin": "npm:0.8.6" @@ -12120,7 +12120,7 @@ __metadata: jest-environment-jsdom: "npm:30.0.5" jest-util: "npm:^30.0.2" jsonc-eslint-parser: "npm:2.4.0" - nx: "npm:22.1.3" + nx: "npm:22.3.3" parsel-js: "npm:^1.1.2" patch-package: "npm:^7.0.2" playwright: "npm:1.56.1" @@ -15773,21 +15773,21 @@ __metadata: languageName: node linkType: hard -"nx@npm:22.1.3": - version: 22.1.3 - resolution: "nx@npm:22.1.3" +"nx@npm:22.3.3": + version: 22.3.3 + resolution: "nx@npm:22.3.3" dependencies: "@napi-rs/wasm-runtime": "npm:0.2.4" - "@nx/nx-darwin-arm64": "npm:22.1.3" - "@nx/nx-darwin-x64": "npm:22.1.3" - "@nx/nx-freebsd-x64": "npm:22.1.3" - "@nx/nx-linux-arm-gnueabihf": "npm:22.1.3" - "@nx/nx-linux-arm64-gnu": "npm:22.1.3" - "@nx/nx-linux-arm64-musl": "npm:22.1.3" - "@nx/nx-linux-x64-gnu": "npm:22.1.3" - "@nx/nx-linux-x64-musl": "npm:22.1.3" - "@nx/nx-win32-arm64-msvc": "npm:22.1.3" - "@nx/nx-win32-x64-msvc": "npm:22.1.3" + "@nx/nx-darwin-arm64": "npm:22.3.3" + "@nx/nx-darwin-x64": "npm:22.3.3" + "@nx/nx-freebsd-x64": "npm:22.3.3" + "@nx/nx-linux-arm-gnueabihf": "npm:22.3.3" + "@nx/nx-linux-arm64-gnu": "npm:22.3.3" + "@nx/nx-linux-arm64-musl": "npm:22.3.3" + "@nx/nx-linux-x64-gnu": "npm:22.3.3" + "@nx/nx-linux-x64-musl": "npm:22.3.3" + "@nx/nx-win32-arm64-msvc": "npm:22.3.3" + "@nx/nx-win32-x64-msvc": "npm:22.3.3" "@yarnpkg/lockfile": "npm:^1.1.0" "@yarnpkg/parsers": "npm:3.0.2" "@zkochan/js-yaml": "npm:0.0.7" @@ -15854,7 +15854,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 10c0/d6bbc6bb4df78cd84b0f02a51dca7e94c31a7f102b29b24b67dea6c32063704bd9ba2083b6b27b4ec60f91484b7ed4ae7370ef46ab77646d88e98f9da58500c2 + checksum: 10c0/561c44682580ec473f1422dd81c8e518084311608f15bff184c0e0ae051ea9a664cc8c0936830dba1189fd96770403d1d6da04a45e866cc48edceb8f06d2eb1e languageName: node linkType: hard @@ -15987,14 +15987,14 @@ __metadata: linkType: hard "open@npm:^10.0.3": - version: 10.1.0 - resolution: "open@npm:10.1.0" + version: 10.2.0 + resolution: "open@npm:10.2.0" dependencies: default-browser: "npm:^5.2.1" define-lazy-prop: "npm:^3.0.0" is-inside-container: "npm:^1.0.0" - is-wsl: "npm:^3.1.0" - checksum: 10c0/c86d0b94503d5f735f674158d5c5d339c25ec2927562f00ee74590727292ed23e1b8d9336cb41ffa7e1fa4d3641d29b199b4ea37c78cb557d72b511743e90ebb + wsl-utils: "npm:^0.1.0" + checksum: 10c0/5a36d0c1fd2f74ce553beb427ca8b8494b623fc22c6132d0c1688f246a375e24584ea0b44c67133d9ab774fa69be8e12fbe1ff12504b1142bd960fb09671948f languageName: node linkType: hard @@ -20123,8 +20123,8 @@ __metadata: linkType: hard "terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.11, terser-webpack-plugin@npm:^5.3.3": - version: 5.3.15 - resolution: "terser-webpack-plugin@npm:5.3.15" + version: 5.3.16 + resolution: "terser-webpack-plugin@npm:5.3.16" dependencies: "@jridgewell/trace-mapping": "npm:^0.3.25" jest-worker: "npm:^27.4.5" @@ -20140,7 +20140,7 @@ __metadata: optional: true uglify-js: optional: true - checksum: 10c0/e36493869e22b3d76aa9e8ae75802efc5f07461eec819823d5ce78c79f73de5c8c50b6da1e9674274e53fb4e60c09deacc83e9e9c74bce700b6fba74ecbaae7a + checksum: 10c0/39e37c5b3015c1a5354a3633f77235677bfa06eac2608ce26d258b1d1a74070a99910319a6f2f2c437eb61dc321f66434febe01d78e73fa96b4d4393b813f4cf languageName: node linkType: hard @@ -20896,11 +20896,11 @@ __metadata: linkType: hard "use-sync-external-store@npm:^1.2.0": - version: 1.2.2 - resolution: "use-sync-external-store@npm:1.2.2" + version: 1.6.0 + resolution: "use-sync-external-store@npm:1.6.0" peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/23b1597c10adf15b26ade9e8c318d8cc0abc9ec0ab5fc7ca7338da92e89c2536abd150a5891bf076836c352fdfa104fc7231fb48f806fd9960e0cbe03601abaf + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 10c0/35e1179f872a53227bdf8a827f7911da4c37c0f4091c29b76b1e32473d1670ebe7bcd880b808b7549ba9a5605c233350f800ffab963ee4a4ee346ee983b6019b languageName: node linkType: hard @@ -21492,6 +21492,15 @@ __metadata: languageName: node linkType: hard +"wsl-utils@npm:^0.1.0": + version: 0.1.0 + resolution: "wsl-utils@npm:0.1.0" + dependencies: + is-wsl: "npm:^3.1.0" + checksum: 10c0/44318f3585eb97be994fc21a20ddab2649feaf1fbe893f1f866d936eea3d5f8c743bec6dc02e49fbdd3c0e69e9b36f449d90a0b165a4f47dd089747af4cf2377 + languageName: node + linkType: hard + "xml-name-validator@npm:^5.0.0": version: 5.0.0 resolution: "xml-name-validator@npm:5.0.0" From 62b5c8992636ada9d20cf06d6781f001d8f4b32d Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 13:58:21 +0100 Subject: [PATCH 02/11] ci: bump node to v22 --- .github/workflows/ci-change.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/docs.yml | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-change.yml b/.github/workflows/ci-change.yml index d2cb4d87..10e2210f 100644 --- a/.github/workflows/ci-change.yml +++ b/.github/workflows/ci-change.yml @@ -13,6 +13,6 @@ jobs: - uses: actions/setup-node@v6 with: - node-version: '20' + node-version: '22' - run: npx beachball check --changehint "Run 'yarn change' to generate a change file" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5911102f..8dd3b52f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-node@v6 with: cache: 'yarn' - node-version: '20' + node-version: '22' - run: yarn install --immutable @@ -88,7 +88,7 @@ jobs: - uses: actions/setup-node@v6 with: cache: 'yarn' - node-version: '20' + node-version: '22' - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index cccd438c..86ac9032 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-node@v6 with: cache: 'yarn' - node-version: '20' + node-version: '22' - run: yarn install --immutable - run: npx playwright install --with-deps diff --git a/package.json b/package.json index 6c20e9bf..9ee6dc68 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "type": "git" }, "engines": { - "node": "^20.19.0 || ^22.12.0", + "node": "^22.0.0 || ^24.0.0", "yarn": ">=4.12.0" }, "packageManager": "yarn@4.12.0", From 2eefad6224ea38eff77cf063647460796a5a35af Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 16:51:32 +0100 Subject: [PATCH 03/11] chore: bump types node and add explicit enviromnet node --- package.json | 3 ++- yarn.lock | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 9ee6dc68..c4a51a22 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "@testing-library/react": "16.3.0", "@testing-library/user-event": "14.6.1", "@types/jest": "30.0.0", - "@types/node": "20.14.9", + "@types/node": "20.19.9", "@types/react": "18.3.1", "@types/react-dom": "18.3.0", "@types/react-virtualized-auto-sizer": "^1.0.8", @@ -79,6 +79,7 @@ "globals": "15.15.0", "jest": "30.0.5", "jest-environment-jsdom": "30.0.5", + "jest-environment-node": "30.0.5", "jest-util": "^30.0.2", "jsonc-eslint-parser": "2.4.0", "nx": "22.3.3", diff --git a/yarn.lock b/yarn.lock index 74297bf7..126004f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7417,12 +7417,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:20.14.9": - version: 20.14.9 - resolution: "@types/node@npm:20.14.9" +"@types/node@npm:*, @types/node@npm:20.19.9": + version: 20.19.9 + resolution: "@types/node@npm:20.19.9" dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/911ffa444dc032897f4a23ed580c67903bd38ea1c5ec99b1d00fa10b83537a3adddef8e1f29710cbdd8e556a61407ed008e06537d834e48caf449ce59f87d387 + undici-types: "npm:~6.21.0" + checksum: 10c0/c6738131f1698258a5ac1e0185e4fc56977f7f566cd0ee11167f93f2339478470257bd82c5e1908a936a204e0ad7996d741356a1a07c04997a236161ea23a874 languageName: node linkType: hard @@ -12106,7 +12106,7 @@ __metadata: "@testing-library/react": "npm:16.3.0" "@testing-library/user-event": "npm:14.6.1" "@types/jest": "npm:30.0.0" - "@types/node": "npm:20.14.9" + "@types/node": "npm:20.19.9" "@types/react": "npm:18.3.1" "@types/react-dom": "npm:18.3.0" "@types/react-virtualized-auto-sizer": "npm:^1.0.8" @@ -12118,6 +12118,7 @@ __metadata: globals: "npm:15.15.0" jest: "npm:30.0.5" jest-environment-jsdom: "npm:30.0.5" + jest-environment-node: "npm:30.0.5" jest-util: "npm:^30.0.2" jsonc-eslint-parser: "npm:2.4.0" nx: "npm:22.3.3" @@ -20688,10 +20689,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 +"undici-types@npm:~6.21.0": + version: 6.21.0 + resolution: "undici-types@npm:6.21.0" + checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04 languageName: node linkType: hard From 35be9270aef21981d87390d904f6b87f9e361f9a Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:07:25 +0100 Subject: [PATCH 04/11] chore: migrate jest configs to .mjs to keep type-safety DX and make it work with old @nx/jest executor with jest 30 and node 22+ which added native TypeScript support --- .../{jest.config.ts => jest.config.mjs} | 30 +++++-------------- .../{jest.config.ts => jest.config.mjs} | 30 +++++-------------- .../{jest.config.ts => jest.config.mjs} | 30 +++++-------------- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/azure-theme/project.json | 2 +- packages/azure-theme/tsconfig.lib.json | 1 - packages/azure-theme/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/houdini-utils/project.json | 2 +- packages/houdini-utils/tsconfig.lib.json | 1 - packages/houdini-utils/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/nx-plugin/project.json | 2 +- packages/nx-plugin/tsconfig.lib.json | 2 +- packages/nx-plugin/tsconfig.spec.json | 7 +---- .../jest.config.mjs} | 9 ++---- packages/pierce-dom/project.json | 2 +- packages/pierce-dom/tsconfig.lib.json | 1 - packages/pierce-dom/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/react-cap-theme/project.json | 2 +- packages/react-cap-theme/tsconfig.lib.json | 7 +---- packages/react-cap-theme/tsconfig.spec.json | 7 +---- packages/react-chat/jest.config.mjs | 26 ++++++++++++++++ packages/react-chat/project.json | 2 +- packages/react-chat/tsconfig.lib.json | 1 - packages/react-chat/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/react-contextual-pane/project.json | 2 +- .../react-contextual-pane/tsconfig.lib.json | 1 - .../react-contextual-pane/tsconfig.spec.json | 7 +---- .../CHANGELOG.md | 2 +- .../jest.config.mjs | 26 ++++++++++++++++ .../project.json | 2 +- .../tsconfig.lib.json | 1 - .../tsconfig.spec.json | 7 +---- .../react-data-grid-react-window/CHANGELOG.md | 2 +- .../jest.config.mjs | 26 ++++++++++++++++ .../react-data-grid-react-window/project.json | 2 +- .../tsconfig.lib.json | 1 - .../tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 14 ++++----- packages/react-draggable-dialog/project.json | 2 +- .../react-draggable-dialog/tsconfig.lib.json | 1 - .../react-draggable-dialog/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- .../react-gamepad-navigation/project.json | 2 +- .../tsconfig.lib.json | 1 - .../tsconfig.spec.json | 7 +---- .../react-headless-provider/jest.config.mjs | 26 ++++++++++++++++ .../react-headless-provider/jest.config.ts | 29 ------------------ packages/react-headless-provider/project.json | 2 +- .../react-headless-provider/tsconfig.lib.json | 1 - .../tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/react-interactive-tab/project.json | 2 +- .../react-interactive-tab/tsconfig.lib.json | 1 - .../react-interactive-tab/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/react-keytips/project.json | 2 +- packages/react-keytips/tsconfig.lib.json | 1 - packages/react-keytips/tsconfig.spec.json | 7 +---- packages/react-resize-handle/CHANGELOG.md | 2 +- packages/react-resize-handle/jest.config.mjs | 26 ++++++++++++++++ packages/react-resize-handle/jest.config.ts | 29 ------------------ packages/react-resize-handle/project.json | 2 +- .../react-resize-handle/tsconfig.lib.json | 1 - .../react-resize-handle/tsconfig.spec.json | 7 +---- .../jest.config.js} | 5 ++-- .../jest.config.mjs} | 4 ++- .../jest.config.mts} | 2 +- packages/react-shadow/jest.config.ts | 29 ------------------ packages/react-shadow/package.json | 3 ++ packages/react-shadow/project.json | 2 +- packages/react-shadow/tsconfig.spec.json | 5 ++-- .../{jest.config.ts => jest.config.mjs} | 9 ++---- .../react-themeless-provider/project.json | 2 +- .../tsconfig.lib.json | 1 - .../tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 14 ++++----- packages/react-tree-grid/project.json | 2 +- packages/react-tree-grid/tsconfig.lib.json | 1 - packages/react-tree-grid/tsconfig.spec.json | 7 +---- packages/react-virtualizer/CHANGELOG.md | 2 +- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/react-virtualizer/project.json | 2 +- packages/react-virtualizer/tsconfig.lib.json | 1 - packages/react-virtualizer/tsconfig.spec.json | 7 +---- packages/stylelint-plugin/jest.config.mjs | 26 ++++++++++++++++ packages/stylelint-plugin/jest.config.ts | 29 ------------------ packages/stylelint-plugin/project.json | 2 +- packages/stylelint-plugin/tsconfig.lib.json | 7 +---- packages/stylelint-plugin/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/teams-components/project.json | 2 +- packages/teams-components/tsconfig.lib.json | 1 - packages/teams-components/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/token-analyzer/project.json | 2 +- packages/token-analyzer/tsconfig.lib.json | 7 +---- packages/token-analyzer/tsconfig.spec.json | 7 +---- .../{jest.config.ts => jest.config.mjs} | 9 ++---- packages/variant-theme/project.json | 2 +- packages/variant-theme/tsconfig.lib.json | 1 - packages/variant-theme/tsconfig.spec.json | 7 +---- 105 files changed, 298 insertions(+), 486 deletions(-) rename apps/react-17-tests/{jest.config.ts => jest.config.mjs} (88%) rename apps/react-18-tests/{jest.config.ts => jest.config.mjs} (88%) rename apps/react-19-tests/{jest.config.ts => jest.config.mjs} (89%) rename packages/azure-theme/{jest.config.ts => jest.config.mjs} (90%) rename packages/houdini-utils/{jest.config.ts => jest.config.mjs} (90%) rename packages/nx-plugin/{jest.config.ts => jest.config.mjs} (90%) rename packages/{react-data-grid-react-window-grid/jest.config.ts => pierce-dom/jest.config.mjs} (90%) rename packages/react-cap-theme/{jest.config.ts => jest.config.mjs} (90%) create mode 100644 packages/react-chat/jest.config.mjs rename packages/react-contextual-pane/{jest.config.ts => jest.config.mjs} (90%) create mode 100644 packages/react-data-grid-react-window-grid/jest.config.mjs create mode 100644 packages/react-data-grid-react-window/jest.config.mjs rename packages/react-draggable-dialog/{jest.config.ts => jest.config.mjs} (86%) rename packages/react-gamepad-navigation/{jest.config.ts => jest.config.mjs} (90%) create mode 100644 packages/react-headless-provider/jest.config.mjs delete mode 100644 packages/react-headless-provider/jest.config.ts rename packages/react-interactive-tab/{jest.config.ts => jest.config.mjs} (90%) rename packages/react-keytips/{jest.config.ts => jest.config.mjs} (90%) create mode 100644 packages/react-resize-handle/jest.config.mjs delete mode 100644 packages/react-resize-handle/jest.config.ts rename packages/{react-data-grid-react-window/jest.config.ts => react-shadow/jest.config.js} (93%) rename packages/{pierce-dom/jest.config.ts => react-shadow/jest.config.mjs} (90%) rename packages/{react-chat/jest.config.ts => react-shadow/jest.config.mts} (94%) delete mode 100644 packages/react-shadow/jest.config.ts rename packages/react-themeless-provider/{jest.config.ts => jest.config.mjs} (90%) rename packages/react-tree-grid/{jest.config.ts => jest.config.mjs} (86%) rename packages/react-virtualizer/{jest.config.ts => jest.config.mjs} (90%) create mode 100644 packages/stylelint-plugin/jest.config.mjs delete mode 100644 packages/stylelint-plugin/jest.config.ts rename packages/teams-components/{jest.config.ts => jest.config.mjs} (90%) rename packages/token-analyzer/{jest.config.ts => jest.config.mjs} (90%) rename packages/variant-theme/{jest.config.ts => jest.config.mjs} (90%) diff --git a/apps/react-17-tests/jest.config.ts b/apps/react-17-tests/jest.config.mjs similarity index 88% rename from apps/react-17-tests/jest.config.ts rename to apps/react-17-tests/jest.config.mjs index ef447bd0..55d120f4 100644 --- a/apps/react-17-tests/jest.config.ts +++ b/apps/react-17-tests/jest.config.mjs @@ -1,32 +1,26 @@ // @ts-check /* eslint-disable */ - import { existsSync, readdirSync, readFileSync } from 'node:fs'; import { resolve, join } from 'node:path'; - // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(join(__dirname, '.swcrc'), 'utf-8') + readFileSync(join(import.meta.dirname, '.swcrc'), 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - -const rootNodeModulesPath = join(__dirname, '../..', 'node_modules'); -const nohoistNodeModulesPath = join(__dirname, 'node_modules'); +const rootNodeModulesPath = join(import.meta.dirname, '../..', 'node_modules'); +const nohoistNodeModulesPath = join(import.meta.dirname, 'node_modules'); const usedNodeModulesPath = existsSync(join(nohoistNodeModulesPath, 'react')) ? nohoistNodeModulesPath : rootNodeModulesPath; - export default { displayName: 'react-17-tests', preset: '../../jest.preset.js', @@ -46,29 +40,26 @@ export default { ), }, }; - /** * Creates an array of paths to packages that don't have specific tags * @returns {string[]} An array of paths to test */ function createRoots() { - const rootDir = resolve(__dirname, '../../packages/'); + const rootDir = resolve(import.meta.dirname, '../../packages/'); return findValidPackagePaths(rootDir); - /** * Recursively finds valid package paths that don't have excluded tags * @param {string} dirPath - Directory to scan * @returns {string[]} Array of valid package paths */ - function findValidPackagePaths(dirPath: string) { + function findValidPackagePaths(dirPath) { const entries = readdirSync(dirPath, { withFileTypes: true }); - let validPaths = [] as string[]; - + /* @type {string[]} */ + let validPaths = []; // Check if current directory is a valid package if (isValidPackage(dirPath)) { validPaths.push(dirPath); } - // Recursively check subdirectories for (const entry of entries) { if (entry.isDirectory()) { @@ -76,27 +67,22 @@ function createRoots() { validPaths = validPaths.concat(findValidPackagePaths(fullPath)); } } - return validPaths; } - /** * Checks if a directory is a valid package based on its project.json * @param {string} packagePath - Path to potential package * @returns {boolean} Whether the package is valid */ - function isValidPackage(packagePath: string) { + function isValidPackage(packagePath) { try { const projectJsonPath = join(packagePath, 'project.json'); - if (existsSync(projectJsonPath)) { const projectJson = JSON.parse(readFileSync(projectJsonPath, 'utf8')); - return !['nx-plugin', 'houdini-utils', 'stylelint-plugin'].some( (projectName) => projectName === projectJson.name ); } - return false; // Only include directories with project.json } catch (error) { console.warn(`Error reading project.json for ${packagePath}:`, error); diff --git a/apps/react-18-tests/jest.config.ts b/apps/react-18-tests/jest.config.mjs similarity index 88% rename from apps/react-18-tests/jest.config.ts rename to apps/react-18-tests/jest.config.mjs index de76c656..05bd0e7d 100644 --- a/apps/react-18-tests/jest.config.ts +++ b/apps/react-18-tests/jest.config.mjs @@ -1,34 +1,28 @@ // @ts-check /* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); import { existsSync, readdirSync } from 'node:fs'; import { resolve } from 'node:path'; - // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(join(__dirname, '.swcrc'), 'utf-8') + readFileSync(join(import.meta.dirname, '.swcrc'), 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - -const rootNodeModulesPath = join(__dirname, '../..', 'node_modules'); -const nohoistNodeModulesPath = join(__dirname, 'node_modules'); +const rootNodeModulesPath = join(import.meta.dirname, '../..', 'node_modules'); +const nohoistNodeModulesPath = join(import.meta.dirname, 'node_modules'); const usedNodeModulesPath = existsSync(join(nohoistNodeModulesPath, 'react')) ? nohoistNodeModulesPath : rootNodeModulesPath; - export default { displayName: 'react-18-tests', preset: '../../jest.preset.js', @@ -48,29 +42,26 @@ export default { ), }, }; - /** * Creates an array of paths to packages that don't have specific tags * @returns {string[]} An array of paths to test */ function createRoots() { - const rootDir = resolve(__dirname, '../../packages/'); + const rootDir = resolve(import.meta.dirname, '../../packages/'); return findValidPackagePaths(rootDir); - /** * Recursively finds valid package paths that don't have excluded tags * @param {string} dirPath - Directory to scan * @returns {string[]} Array of valid package paths */ - function findValidPackagePaths(dirPath: string) { + function findValidPackagePaths(dirPath) { const entries = readdirSync(dirPath, { withFileTypes: true }); - let validPaths = [] as string[]; - + /* @type {string[]} */ + let validPaths = []; // Check if current directory is a valid package if (isValidPackage(dirPath)) { validPaths.push(dirPath); } - // Recursively check subdirectories for (const entry of entries) { if (entry.isDirectory()) { @@ -78,27 +69,22 @@ function createRoots() { validPaths = validPaths.concat(findValidPackagePaths(fullPath)); } } - return validPaths; } - /** * Checks if a directory is a valid package based on its project.json * @param {string} packagePath - Path to potential package * @returns {boolean} Whether the package is valid */ - function isValidPackage(packagePath: string) { + function isValidPackage(packagePath) { try { const projectJsonPath = join(packagePath, 'project.json'); - if (existsSync(projectJsonPath)) { const projectJson = JSON.parse(readFileSync(projectJsonPath, 'utf8')); - return !['nx-plugin', 'houdini-utils', 'stylelint-plugin'].some( (projectName) => projectName === projectJson.name ); } - return false; // Only include directories with project.json } catch (error) { console.warn(`Error reading project.json for ${packagePath}:`, error); diff --git a/apps/react-19-tests/jest.config.ts b/apps/react-19-tests/jest.config.mjs similarity index 89% rename from apps/react-19-tests/jest.config.ts rename to apps/react-19-tests/jest.config.mjs index c8817d0b..8a2b6706 100644 --- a/apps/react-19-tests/jest.config.ts +++ b/apps/react-19-tests/jest.config.mjs @@ -1,34 +1,28 @@ // @ts-check /* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); import { existsSync, readdirSync } from 'node:fs'; import { resolve } from 'node:path'; - // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(join(__dirname, '.swcrc'), 'utf-8') + readFileSync(join(import.meta.dirname, '.swcrc'), 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - -const rootNodeModulesPath = join(__dirname, '../..', 'node_modules'); -const nohoistNodeModulesPath = join(__dirname, 'node_modules'); +const rootNodeModulesPath = join(import.meta.dirname, '../..', 'node_modules'); +const nohoistNodeModulesPath = join(import.meta.dirname, 'node_modules'); const usedNodeModulesPath = existsSync(join(nohoistNodeModulesPath, 'react')) ? nohoistNodeModulesPath : rootNodeModulesPath; - export default { displayName: 'react-19-tests', preset: '../../jest.preset.js', @@ -50,29 +44,26 @@ export default { ), }, }; - /** * Creates an array of paths to packages that don't have specific tags * @returns {string[]} An array of paths to test */ function createRoots() { - const rootDir = resolve(__dirname, '../../packages/'); + const rootDir = resolve(import.meta.dirname, '../../packages/'); return findValidPackagePaths(rootDir); - /** * Recursively finds valid package paths that don't have excluded tags * @param {string} dirPath - Directory to scan * @returns {string[]} Array of valid package paths */ - function findValidPackagePaths(dirPath: string) { + function findValidPackagePaths(dirPath) { const entries = readdirSync(dirPath, { withFileTypes: true }); - let validPaths = [] as string[]; - + /* @type {string[]} */ + let validPaths = []; // Check if current directory is a valid package if (isValidPackage(dirPath)) { validPaths.push(dirPath); } - // Recursively check subdirectories for (const entry of entries) { if (entry.isDirectory()) { @@ -80,27 +71,22 @@ function createRoots() { validPaths = validPaths.concat(findValidPackagePaths(fullPath)); } } - return validPaths; } - /** * Checks if a directory is a valid package based on its project.json * @param {string} packagePath - Path to potential package * @returns {boolean} Whether the package is valid */ - function isValidPackage(packagePath: string) { + function isValidPackage(packagePath) { try { const projectJsonPath = join(packagePath, 'project.json'); - if (existsSync(projectJsonPath)) { const projectJson = JSON.parse(readFileSync(projectJsonPath, 'utf8')); - return !['nx-plugin', 'houdini-utils', 'stylelint-plugin'].some( (projectName) => projectName === projectJson.name ); } - return false; // Only include directories with project.json } catch (error) { console.warn(`Error reading project.json for ${packagePath}:`, error); diff --git a/packages/azure-theme/jest.config.ts b/packages/azure-theme/jest.config.mjs similarity index 90% rename from packages/azure-theme/jest.config.ts rename to packages/azure-theme/jest.config.mjs index 053995da..51a714a2 100644 --- a/packages/azure-theme/jest.config.ts +++ b/packages/azure-theme/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'azure-theme', preset: '../../jest.preset.js', diff --git a/packages/azure-theme/project.json b/packages/azure-theme/project.json index e4058ca8..13926861 100644 --- a/packages/azure-theme/project.json +++ b/packages/azure-theme/project.json @@ -26,7 +26,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/azure-theme/jest.config.ts", + "jestConfig": "packages/azure-theme/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/azure-theme/tsconfig.lib.json b/packages/azure-theme/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/azure-theme/tsconfig.lib.json +++ b/packages/azure-theme/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/azure-theme/tsconfig.spec.json b/packages/azure-theme/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/azure-theme/tsconfig.spec.json +++ b/packages/azure-theme/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/houdini-utils/jest.config.ts b/packages/houdini-utils/jest.config.mjs similarity index 90% rename from packages/houdini-utils/jest.config.ts rename to packages/houdini-utils/jest.config.mjs index 96792b0a..0eddbf46 100644 --- a/packages/houdini-utils/jest.config.ts +++ b/packages/houdini-utils/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'houdini-utils', preset: '../../jest.preset.js', diff --git a/packages/houdini-utils/project.json b/packages/houdini-utils/project.json index 678f17a3..91e0a5ca 100644 --- a/packages/houdini-utils/project.json +++ b/packages/houdini-utils/project.json @@ -26,7 +26,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/houdini-utils/jest.config.ts", + "jestConfig": "packages/houdini-utils/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/houdini-utils/tsconfig.lib.json b/packages/houdini-utils/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/houdini-utils/tsconfig.lib.json +++ b/packages/houdini-utils/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/houdini-utils/tsconfig.spec.json b/packages/houdini-utils/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/houdini-utils/tsconfig.spec.json +++ b/packages/houdini-utils/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/nx-plugin/jest.config.ts b/packages/nx-plugin/jest.config.mjs similarity index 90% rename from packages/nx-plugin/jest.config.ts rename to packages/nx-plugin/jest.config.mjs index 8910ab54..747db26d 100644 --- a/packages/nx-plugin/jest.config.ts +++ b/packages/nx-plugin/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'nx-plugin', preset: '../../jest.preset.js', diff --git a/packages/nx-plugin/project.json b/packages/nx-plugin/project.json index a6162013..41f8d149 100644 --- a/packages/nx-plugin/project.json +++ b/packages/nx-plugin/project.json @@ -53,7 +53,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/nx-plugin/jest.config.ts", + "jestConfig": "packages/nx-plugin/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/nx-plugin/tsconfig.lib.json b/packages/nx-plugin/tsconfig.lib.json index 7914110c..5ba8e1ae 100644 --- a/packages/nx-plugin/tsconfig.lib.json +++ b/packages/nx-plugin/tsconfig.lib.json @@ -6,5 +6,5 @@ "types": ["node"] }, "include": ["src/**/*.ts"], - "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/files/**"] + "exclude": ["src/**/*.spec.ts", "src/**/*.test.ts", "src/**/files/**"] } diff --git a/packages/nx-plugin/tsconfig.spec.json b/packages/nx-plugin/tsconfig.spec.json index 9b2a121d..7667e312 100644 --- a/packages/nx-plugin/tsconfig.spec.json +++ b/packages/nx-plugin/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] } diff --git a/packages/react-data-grid-react-window-grid/jest.config.ts b/packages/pierce-dom/jest.config.mjs similarity index 90% rename from packages/react-data-grid-react-window-grid/jest.config.ts rename to packages/pierce-dom/jest.config.mjs index 80b8addc..7dbe2277 100644 --- a/packages/react-data-grid-react-window-grid/jest.config.ts +++ b/packages/pierce-dom/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'button', preset: '../../jest.preset.js', diff --git a/packages/pierce-dom/project.json b/packages/pierce-dom/project.json index 2abcc3e7..532ab5e7 100644 --- a/packages/pierce-dom/project.json +++ b/packages/pierce-dom/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/pierce-dom/jest.config.ts", + "jestConfig": "packages/pierce-dom/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/pierce-dom/tsconfig.lib.json b/packages/pierce-dom/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/pierce-dom/tsconfig.lib.json +++ b/packages/pierce-dom/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/pierce-dom/tsconfig.spec.json b/packages/pierce-dom/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/pierce-dom/tsconfig.spec.json +++ b/packages/pierce-dom/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-cap-theme/jest.config.ts b/packages/react-cap-theme/jest.config.mjs similarity index 90% rename from packages/react-cap-theme/jest.config.ts rename to packages/react-cap-theme/jest.config.mjs index d8b9fce2..3a6348bf 100644 --- a/packages/react-cap-theme/jest.config.ts +++ b/packages/react-cap-theme/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-cap-theme', preset: '../../jest.preset.js', diff --git a/packages/react-cap-theme/project.json b/packages/react-cap-theme/project.json index e6532ed7..c8dc562d 100644 --- a/packages/react-cap-theme/project.json +++ b/packages/react-cap-theme/project.json @@ -51,7 +51,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-cap-theme/jest.config.ts", + "jestConfig": "packages/react-cap-theme/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-cap-theme/tsconfig.lib.json b/packages/react-cap-theme/tsconfig.lib.json index 884038ea..0c8fdf4d 100644 --- a/packages/react-cap-theme/tsconfig.lib.json +++ b/packages/react-cap-theme/tsconfig.lib.json @@ -5,10 +5,5 @@ "declaration": true }, "include": ["src/**/*.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "files/**" - ] + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "files/**"] } diff --git a/packages/react-cap-theme/tsconfig.spec.json b/packages/react-cap-theme/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-cap-theme/tsconfig.spec.json +++ b/packages/react-cap-theme/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-chat/jest.config.mjs b/packages/react-chat/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/react-chat/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/react-chat/project.json b/packages/react-chat/project.json index b2ca288a..d07ff6a0 100644 --- a/packages/react-chat/project.json +++ b/packages/react-chat/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-chat/jest.config.ts", + "jestConfig": "packages/react-chat/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-chat/tsconfig.lib.json b/packages/react-chat/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-chat/tsconfig.lib.json +++ b/packages/react-chat/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-chat/tsconfig.spec.json b/packages/react-chat/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-chat/tsconfig.spec.json +++ b/packages/react-chat/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-contextual-pane/jest.config.ts b/packages/react-contextual-pane/jest.config.mjs similarity index 90% rename from packages/react-contextual-pane/jest.config.ts rename to packages/react-contextual-pane/jest.config.mjs index 2b57aaa2..77cb570d 100644 --- a/packages/react-contextual-pane/jest.config.ts +++ b/packages/react-contextual-pane/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-contextual-pane', preset: '../../jest.preset.js', diff --git a/packages/react-contextual-pane/project.json b/packages/react-contextual-pane/project.json index 711699d8..8977d72b 100644 --- a/packages/react-contextual-pane/project.json +++ b/packages/react-contextual-pane/project.json @@ -21,7 +21,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-contextual-pane/jest.config.ts", + "jestConfig": "packages/react-contextual-pane/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-contextual-pane/tsconfig.lib.json b/packages/react-contextual-pane/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-contextual-pane/tsconfig.lib.json +++ b/packages/react-contextual-pane/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-contextual-pane/tsconfig.spec.json b/packages/react-contextual-pane/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-contextual-pane/tsconfig.spec.json +++ b/packages/react-contextual-pane/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-data-grid-react-window-grid/CHANGELOG.md b/packages/react-data-grid-react-window-grid/CHANGELOG.md index 377fbc4a..46584bf3 100644 --- a/packages/react-data-grid-react-window-grid/CHANGELOG.md +++ b/packages/react-data-grid-react-window-grid/CHANGELOG.md @@ -48,7 +48,7 @@ Fri, 21 Jun 2024 06:08:36 GMT ### Minor changes -- feat(react-data-grid-react-window*): add scrolling indicators (sghorashi@microsoft.com) +- feat(react-data-grid-react-window\*): add scrolling indicators (sghorashi@microsoft.com) ## 2.2.1 diff --git a/packages/react-data-grid-react-window-grid/jest.config.mjs b/packages/react-data-grid-react-window-grid/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/react-data-grid-react-window-grid/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/react-data-grid-react-window-grid/project.json b/packages/react-data-grid-react-window-grid/project.json index 7991a791..4d12570e 100644 --- a/packages/react-data-grid-react-window-grid/project.json +++ b/packages/react-data-grid-react-window-grid/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-data-grid-react-window-grid/jest.config.ts", + "jestConfig": "packages/react-data-grid-react-window-grid/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-data-grid-react-window-grid/tsconfig.lib.json b/packages/react-data-grid-react-window-grid/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-data-grid-react-window-grid/tsconfig.lib.json +++ b/packages/react-data-grid-react-window-grid/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-data-grid-react-window-grid/tsconfig.spec.json b/packages/react-data-grid-react-window-grid/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-data-grid-react-window-grid/tsconfig.spec.json +++ b/packages/react-data-grid-react-window-grid/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-data-grid-react-window/CHANGELOG.md b/packages/react-data-grid-react-window/CHANGELOG.md index b79960f2..ca94f171 100644 --- a/packages/react-data-grid-react-window/CHANGELOG.md +++ b/packages/react-data-grid-react-window/CHANGELOG.md @@ -64,7 +64,7 @@ Fri, 21 Jun 2024 06:08:36 GMT ### Minor changes -- feat(react-data-grid-react-window*): add scrolling indicators (sghorashi@microsoft.com) +- feat(react-data-grid-react-window\*): add scrolling indicators (sghorashi@microsoft.com) ## 1.1.2 diff --git a/packages/react-data-grid-react-window/jest.config.mjs b/packages/react-data-grid-react-window/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/react-data-grid-react-window/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/react-data-grid-react-window/project.json b/packages/react-data-grid-react-window/project.json index f65c8c19..5af546d7 100644 --- a/packages/react-data-grid-react-window/project.json +++ b/packages/react-data-grid-react-window/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-data-grid-react-window/jest.config.ts", + "jestConfig": "packages/react-data-grid-react-window/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-data-grid-react-window/tsconfig.lib.json b/packages/react-data-grid-react-window/tsconfig.lib.json index b331bf1f..4c52811b 100644 --- a/packages/react-data-grid-react-window/tsconfig.lib.json +++ b/packages/react-data-grid-react-window/tsconfig.lib.json @@ -7,7 +7,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-data-grid-react-window/tsconfig.spec.json b/packages/react-data-grid-react-window/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-data-grid-react-window/tsconfig.spec.json +++ b/packages/react-data-grid-react-window/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-draggable-dialog/jest.config.ts b/packages/react-draggable-dialog/jest.config.mjs similarity index 86% rename from packages/react-draggable-dialog/jest.config.ts rename to packages/react-draggable-dialog/jest.config.mjs index 3109c9aa..f9997fbe 100644 --- a/packages/react-draggable-dialog/jest.config.ts +++ b/packages/react-draggable-dialog/jest.config.mjs @@ -1,25 +1,22 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; -import { Config } from 'jest'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/docs/technologies/test-tools/jest/introduction#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - -const config: Config = { +/** @type {import('jest').Config} */ +const config = { displayName: 'react-draggable-dialog', preset: '../../jest.preset.js', transform: { @@ -29,5 +26,4 @@ const config: Config = { testEnvironment: 'jsdom', coverageDirectory: '../../coverage/packages/react-draggable-dialog', }; - export default config; diff --git a/packages/react-draggable-dialog/project.json b/packages/react-draggable-dialog/project.json index bcd7b13c..1d187c6b 100644 --- a/packages/react-draggable-dialog/project.json +++ b/packages/react-draggable-dialog/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-draggable-dialog/jest.config.ts", + "jestConfig": "packages/react-draggable-dialog/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-draggable-dialog/tsconfig.lib.json b/packages/react-draggable-dialog/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-draggable-dialog/tsconfig.lib.json +++ b/packages/react-draggable-dialog/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-draggable-dialog/tsconfig.spec.json b/packages/react-draggable-dialog/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-draggable-dialog/tsconfig.spec.json +++ b/packages/react-draggable-dialog/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-gamepad-navigation/jest.config.ts b/packages/react-gamepad-navigation/jest.config.mjs similarity index 90% rename from packages/react-gamepad-navigation/jest.config.ts rename to packages/react-gamepad-navigation/jest.config.mjs index bc8c14b6..6113d8b2 100644 --- a/packages/react-gamepad-navigation/jest.config.ts +++ b/packages/react-gamepad-navigation/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-gamepad-navigation', preset: '../../jest.preset.js', diff --git a/packages/react-gamepad-navigation/project.json b/packages/react-gamepad-navigation/project.json index 16d67913..cb47a407 100644 --- a/packages/react-gamepad-navigation/project.json +++ b/packages/react-gamepad-navigation/project.json @@ -22,7 +22,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-gamepad-navigation/jest.config.ts", + "jestConfig": "packages/react-gamepad-navigation/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-gamepad-navigation/tsconfig.lib.json b/packages/react-gamepad-navigation/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-gamepad-navigation/tsconfig.lib.json +++ b/packages/react-gamepad-navigation/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-gamepad-navigation/tsconfig.spec.json b/packages/react-gamepad-navigation/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-gamepad-navigation/tsconfig.spec.json +++ b/packages/react-gamepad-navigation/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-headless-provider/jest.config.mjs b/packages/react-headless-provider/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/react-headless-provider/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/react-headless-provider/jest.config.ts b/packages/react-headless-provider/jest.config.ts deleted file mode 100644 index 80b8addc..00000000 --- a/packages/react-headless-provider/jest.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; diff --git a/packages/react-headless-provider/project.json b/packages/react-headless-provider/project.json index 1a214eb6..69238364 100644 --- a/packages/react-headless-provider/project.json +++ b/packages/react-headless-provider/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-headless-provider/jest.config.ts", + "jestConfig": "packages/react-headless-provider/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-headless-provider/tsconfig.lib.json b/packages/react-headless-provider/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-headless-provider/tsconfig.lib.json +++ b/packages/react-headless-provider/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-headless-provider/tsconfig.spec.json b/packages/react-headless-provider/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-headless-provider/tsconfig.spec.json +++ b/packages/react-headless-provider/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-interactive-tab/jest.config.ts b/packages/react-interactive-tab/jest.config.mjs similarity index 90% rename from packages/react-interactive-tab/jest.config.ts rename to packages/react-interactive-tab/jest.config.mjs index e312bfe7..a9e3aca9 100644 --- a/packages/react-interactive-tab/jest.config.ts +++ b/packages/react-interactive-tab/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-interactive-tab', preset: '../../jest.preset.js', diff --git a/packages/react-interactive-tab/project.json b/packages/react-interactive-tab/project.json index c92701e8..4dbae36a 100644 --- a/packages/react-interactive-tab/project.json +++ b/packages/react-interactive-tab/project.json @@ -22,7 +22,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-interactive-tab/jest.config.ts", + "jestConfig": "packages/react-interactive-tab/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-interactive-tab/tsconfig.lib.json b/packages/react-interactive-tab/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-interactive-tab/tsconfig.lib.json +++ b/packages/react-interactive-tab/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-interactive-tab/tsconfig.spec.json b/packages/react-interactive-tab/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-interactive-tab/tsconfig.spec.json +++ b/packages/react-interactive-tab/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-keytips/jest.config.ts b/packages/react-keytips/jest.config.mjs similarity index 90% rename from packages/react-keytips/jest.config.ts rename to packages/react-keytips/jest.config.mjs index 31de3afa..35b87342 100644 --- a/packages/react-keytips/jest.config.ts +++ b/packages/react-keytips/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-keytips', preset: '../../jest.preset.js', diff --git a/packages/react-keytips/project.json b/packages/react-keytips/project.json index 65f5e13d..152a1c2a 100644 --- a/packages/react-keytips/project.json +++ b/packages/react-keytips/project.json @@ -22,7 +22,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-keytips/jest.config.ts", + "jestConfig": "packages/react-keytips/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-keytips/tsconfig.lib.json b/packages/react-keytips/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-keytips/tsconfig.lib.json +++ b/packages/react-keytips/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-keytips/tsconfig.spec.json b/packages/react-keytips/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-keytips/tsconfig.spec.json +++ b/packages/react-keytips/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-resize-handle/CHANGELOG.md b/packages/react-resize-handle/CHANGELOG.md index 90158c24..d96997a5 100644 --- a/packages/react-resize-handle/CHANGELOG.md +++ b/packages/react-resize-handle/CHANGELOG.md @@ -54,7 +54,7 @@ Thu, 15 May 2025 10:13:29 GMT ### Minor changes -- feat: support viewport units (olfedias@microsoft.com) +- feat: support viewport units (olfedias@microsoft.com) ### Patches diff --git a/packages/react-resize-handle/jest.config.mjs b/packages/react-resize-handle/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/react-resize-handle/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/react-resize-handle/jest.config.ts b/packages/react-resize-handle/jest.config.ts deleted file mode 100644 index 80b8addc..00000000 --- a/packages/react-resize-handle/jest.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; diff --git a/packages/react-resize-handle/project.json b/packages/react-resize-handle/project.json index 5d734bc7..642c69ff 100644 --- a/packages/react-resize-handle/project.json +++ b/packages/react-resize-handle/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-resize-handle/jest.config.ts", + "jestConfig": "packages/react-resize-handle/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-resize-handle/tsconfig.lib.json b/packages/react-resize-handle/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-resize-handle/tsconfig.lib.json +++ b/packages/react-resize-handle/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-resize-handle/tsconfig.spec.json b/packages/react-resize-handle/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-resize-handle/tsconfig.spec.json +++ b/packages/react-resize-handle/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-data-grid-react-window/jest.config.ts b/packages/react-shadow/jest.config.js similarity index 93% rename from packages/react-data-grid-react-window/jest.config.ts rename to packages/react-shadow/jest.config.js index 80b8addc..2e3822cd 100644 --- a/packages/react-data-grid-react-window/jest.config.ts +++ b/packages/react-shadow/jest.config.js @@ -1,5 +1,6 @@ /* eslint-disable */ -import { readFileSync } from 'fs'; +// @ts-check +const { readFileSync } = require('fs'); // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC @@ -18,7 +19,7 @@ if (swcJestConfig.swcrc === undefined) { // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; -export default { +module.exports = { displayName: 'button', preset: '../../jest.preset.js', transform: { diff --git a/packages/pierce-dom/jest.config.ts b/packages/react-shadow/jest.config.mjs similarity index 90% rename from packages/pierce-dom/jest.config.ts rename to packages/react-shadow/jest.config.mjs index 80b8addc..efd8d52d 100644 --- a/packages/pierce-dom/jest.config.ts +++ b/packages/react-shadow/jest.config.mjs @@ -1,10 +1,11 @@ /* eslint-disable */ +// @ts-check import { readFileSync } from 'fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. @@ -18,6 +19,7 @@ if (swcJestConfig.swcrc === undefined) { // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; +/** @type {import('jest').Config} */ export default { displayName: 'button', preset: '../../jest.preset.js', diff --git a/packages/react-chat/jest.config.ts b/packages/react-shadow/jest.config.mts similarity index 94% rename from packages/react-chat/jest.config.ts rename to packages/react-shadow/jest.config.mts index 80b8addc..41a27ff5 100644 --- a/packages/react-chat/jest.config.ts +++ b/packages/react-shadow/jest.config.mts @@ -4,7 +4,7 @@ import { readFileSync } from 'fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. diff --git a/packages/react-shadow/jest.config.ts b/packages/react-shadow/jest.config.ts deleted file mode 100644 index 80b8addc..00000000 --- a/packages/react-shadow/jest.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; diff --git a/packages/react-shadow/package.json b/packages/react-shadow/package.json index 61e1c649..05286d39 100644 --- a/packages/react-shadow/package.json +++ b/packages/react-shadow/package.json @@ -2,6 +2,9 @@ "name": "@fluentui-contrib/react-shadow", "version": "0.1.4", "description": "React components for Shadow DOM", + "scripts": { + "tsc": "tsc --version" + }, "dependencies": { "@griffel/shadow-dom": "~0.2.0", "@swc/helpers": "~0.5.11", diff --git a/packages/react-shadow/project.json b/packages/react-shadow/project.json index b207f841..d8f3af92 100644 --- a/packages/react-shadow/project.json +++ b/packages/react-shadow/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-shadow/jest.config.ts", + "jestConfig": "packages/react-shadow/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-shadow/tsconfig.spec.json b/packages/react-shadow/tsconfig.spec.json index 361fd5a7..e9c5900d 100644 --- a/packages/react-shadow/tsconfig.spec.json +++ b/packages/react-shadow/tsconfig.spec.json @@ -3,10 +3,11 @@ "compilerOptions": { "outDir": "../../dist/out-tsc", "module": "commonjs", - "types": ["jest", "node"] + "types": ["jest", "node"], + "allowJs": true }, "include": [ - "jest.config.ts", + "jest.config.js", "src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts" diff --git a/packages/react-themeless-provider/jest.config.ts b/packages/react-themeless-provider/jest.config.mjs similarity index 90% rename from packages/react-themeless-provider/jest.config.ts rename to packages/react-themeless-provider/jest.config.mjs index 9074f732..44f7d526 100644 --- a/packages/react-themeless-provider/jest.config.ts +++ b/packages/react-themeless-provider/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-themeless-provider', preset: '../../jest.preset.js', diff --git a/packages/react-themeless-provider/project.json b/packages/react-themeless-provider/project.json index f64cf6b0..92430849 100644 --- a/packages/react-themeless-provider/project.json +++ b/packages/react-themeless-provider/project.json @@ -26,7 +26,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-themeless-provider/jest.config.ts", + "jestConfig": "packages/react-themeless-provider/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-themeless-provider/tsconfig.lib.json b/packages/react-themeless-provider/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-themeless-provider/tsconfig.lib.json +++ b/packages/react-themeless-provider/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-themeless-provider/tsconfig.spec.json b/packages/react-themeless-provider/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-themeless-provider/tsconfig.spec.json +++ b/packages/react-themeless-provider/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-tree-grid/jest.config.ts b/packages/react-tree-grid/jest.config.mjs similarity index 86% rename from packages/react-tree-grid/jest.config.ts rename to packages/react-tree-grid/jest.config.mjs index 41f87aae..422feaa3 100644 --- a/packages/react-tree-grid/jest.config.ts +++ b/packages/react-tree-grid/jest.config.mjs @@ -1,25 +1,22 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; -import { Config } from 'jest'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - -const config: Config = { +/** @type {import('jest').Config} */ +const config = { displayName: 'button', preset: '../../jest.preset.js', transform: { @@ -29,5 +26,4 @@ const config: Config = { coverageDirectory: '../../coverage/packages/button', modulePathIgnorePatterns: ['.spec.tsx'], }; - export default config; diff --git a/packages/react-tree-grid/project.json b/packages/react-tree-grid/project.json index 8f8138a8..e20351bc 100644 --- a/packages/react-tree-grid/project.json +++ b/packages/react-tree-grid/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-tree-grid/jest.config.ts", + "jestConfig": "packages/react-tree-grid/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/react-tree-grid/tsconfig.lib.json b/packages/react-tree-grid/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-tree-grid/tsconfig.lib.json +++ b/packages/react-tree-grid/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-tree-grid/tsconfig.spec.json b/packages/react-tree-grid/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-tree-grid/tsconfig.spec.json +++ b/packages/react-tree-grid/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/react-virtualizer/CHANGELOG.md b/packages/react-virtualizer/CHANGELOG.md index 5e360cce..d6f383ba 100644 --- a/packages/react-virtualizer/CHANGELOG.md +++ b/packages/react-virtualizer/CHANGELOG.md @@ -10,7 +10,7 @@ Tue, 18 Nov 2025 08:19:33 GMT ### Patches -- fix: improve child array rendering logic enhance tests (dmytrokirpa@microsoft.com) +- fix: improve child array rendering logic enhance tests (dmytrokirpa@microsoft.com) ## 0.5.3 diff --git a/packages/react-virtualizer/jest.config.ts b/packages/react-virtualizer/jest.config.mjs similarity index 90% rename from packages/react-virtualizer/jest.config.ts rename to packages/react-virtualizer/jest.config.mjs index 632cb50d..128ed0d9 100644 --- a/packages/react-virtualizer/jest.config.ts +++ b/packages/react-virtualizer/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'react-virtualizer', preset: '../../jest.preset.js', diff --git a/packages/react-virtualizer/project.json b/packages/react-virtualizer/project.json index 648416a3..5608c6dc 100644 --- a/packages/react-virtualizer/project.json +++ b/packages/react-virtualizer/project.json @@ -21,7 +21,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/react-virtualizer/jest.config.ts", + "jestConfig": "packages/react-virtualizer/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/react-virtualizer/tsconfig.lib.json b/packages/react-virtualizer/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/react-virtualizer/tsconfig.lib.json +++ b/packages/react-virtualizer/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/react-virtualizer/tsconfig.spec.json b/packages/react-virtualizer/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/react-virtualizer/tsconfig.spec.json +++ b/packages/react-virtualizer/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/stylelint-plugin/jest.config.mjs b/packages/stylelint-plugin/jest.config.mjs new file mode 100644 index 00000000..7dbe2277 --- /dev/null +++ b/packages/stylelint-plugin/jest.config.mjs @@ -0,0 +1,26 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: 'button', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], + coverageDirectory: '../../coverage/packages/button', +}; diff --git a/packages/stylelint-plugin/jest.config.ts b/packages/stylelint-plugin/jest.config.ts deleted file mode 100644 index 80b8addc..00000000 --- a/packages/stylelint-plugin/jest.config.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; diff --git a/packages/stylelint-plugin/project.json b/packages/stylelint-plugin/project.json index 84eba23b..e8ce2e57 100644 --- a/packages/stylelint-plugin/project.json +++ b/packages/stylelint-plugin/project.json @@ -27,7 +27,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/stylelint-plugin/jest.config.ts", + "jestConfig": "packages/stylelint-plugin/jest.config.mjs", "passWithNoTests": true }, "configurations": { diff --git a/packages/stylelint-plugin/tsconfig.lib.json b/packages/stylelint-plugin/tsconfig.lib.json index 884038ea..0c8fdf4d 100644 --- a/packages/stylelint-plugin/tsconfig.lib.json +++ b/packages/stylelint-plugin/tsconfig.lib.json @@ -5,10 +5,5 @@ "declaration": true }, "include": ["src/**/*.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "files/**" - ] + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "files/**"] } diff --git a/packages/stylelint-plugin/tsconfig.spec.json b/packages/stylelint-plugin/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/stylelint-plugin/tsconfig.spec.json +++ b/packages/stylelint-plugin/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/teams-components/jest.config.ts b/packages/teams-components/jest.config.mjs similarity index 90% rename from packages/teams-components/jest.config.ts rename to packages/teams-components/jest.config.mjs index 3e1c3f76..229238ed 100644 --- a/packages/teams-components/jest.config.ts +++ b/packages/teams-components/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'teams-components', preset: '../../jest.preset.js', diff --git a/packages/teams-components/project.json b/packages/teams-components/project.json index 87b8ee50..6c10c7d4 100644 --- a/packages/teams-components/project.json +++ b/packages/teams-components/project.json @@ -22,7 +22,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/teams-components/jest.config.ts", + "jestConfig": "packages/teams-components/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/teams-components/tsconfig.lib.json b/packages/teams-components/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/teams-components/tsconfig.lib.json +++ b/packages/teams-components/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/teams-components/tsconfig.spec.json b/packages/teams-components/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/teams-components/tsconfig.spec.json +++ b/packages/teams-components/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/token-analyzer/jest.config.ts b/packages/token-analyzer/jest.config.mjs similarity index 90% rename from packages/token-analyzer/jest.config.ts rename to packages/token-analyzer/jest.config.mjs index 055af4bb..3ebf79fe 100644 --- a/packages/token-analyzer/jest.config.ts +++ b/packages/token-analyzer/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'token-analyzer', preset: '../../jest.preset.js', diff --git a/packages/token-analyzer/project.json b/packages/token-analyzer/project.json index 9cad91df..638d0212 100644 --- a/packages/token-analyzer/project.json +++ b/packages/token-analyzer/project.json @@ -21,7 +21,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/token-analyzer/jest.config.ts", + "jestConfig": "packages/token-analyzer/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/token-analyzer/tsconfig.lib.json b/packages/token-analyzer/tsconfig.lib.json index 884038ea..0c8fdf4d 100644 --- a/packages/token-analyzer/tsconfig.lib.json +++ b/packages/token-analyzer/tsconfig.lib.json @@ -5,10 +5,5 @@ "declaration": true }, "include": ["src/**/*.ts"], - "exclude": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "files/**" - ] + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "files/**"] } diff --git a/packages/token-analyzer/tsconfig.spec.json b/packages/token-analyzer/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/token-analyzer/tsconfig.spec.json +++ b/packages/token-analyzer/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } diff --git a/packages/variant-theme/jest.config.ts b/packages/variant-theme/jest.config.mjs similarity index 90% rename from packages/variant-theme/jest.config.ts rename to packages/variant-theme/jest.config.mjs index 2cdfa1fb..c9426aad 100644 --- a/packages/variant-theme/jest.config.ts +++ b/packages/variant-theme/jest.config.mjs @@ -1,23 +1,20 @@ +// @ts-check /* eslint-disable */ -import { readFileSync } from 'fs'; - +import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - export default { displayName: 'variant-theme', preset: '../../jest.preset.js', diff --git a/packages/variant-theme/project.json b/packages/variant-theme/project.json index 99d5528a..23e3d087 100644 --- a/packages/variant-theme/project.json +++ b/packages/variant-theme/project.json @@ -26,7 +26,7 @@ "executor": "@nx/jest:jest", "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], "options": { - "jestConfig": "packages/variant-theme/jest.config.ts", + "jestConfig": "packages/variant-theme/jest.config.mjs", "passWithNoTests": true } }, diff --git a/packages/variant-theme/tsconfig.lib.json b/packages/variant-theme/tsconfig.lib.json index 590b0063..031f7698 100644 --- a/packages/variant-theme/tsconfig.lib.json +++ b/packages/variant-theme/tsconfig.lib.json @@ -6,7 +6,6 @@ }, "include": ["src/**/*.ts"], "exclude": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "files/**", diff --git a/packages/variant-theme/tsconfig.spec.json b/packages/variant-theme/tsconfig.spec.json index 361fd5a7..df58d560 100644 --- a/packages/variant-theme/tsconfig.spec.json +++ b/packages/variant-theme/tsconfig.spec.json @@ -5,10 +5,5 @@ "module": "commonjs", "types": ["jest", "node"] }, - "include": [ - "jest.config.ts", - "src/**/*.test.ts", - "src/**/*.test.tsx", - "src/**/*.d.ts" - ] + "include": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts"] } From 70195a3ff34f71237195e8edb64bee9fc1510395 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:13:49 +0100 Subject: [PATCH 05/11] chore: update bball ignore list --- beachball.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beachball.config.js b/beachball.config.js index 7761957d..f2fcbbe7 100644 --- a/beachball.config.js +++ b/beachball.config.js @@ -12,8 +12,8 @@ module.exports = { '**/*.spec.ts', '**/*.component-browser-spec.tsx', '**/*.stories.tsx', - '**/eslint.config.js', - '**/jest.config.js', + '**/eslint.config.{js,mjs}', + '**/jest.config.{ts,mts,cts,js,mjs,cjs}', '**/playwright.config.ts', '**/project.json', '**/*.md', From 3f595a5efd50e20c36a46e85c8bffea87f002146 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:18:14 +0100 Subject: [PATCH 06/11] ci: update rit pipeline --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dd3b52f..67692d0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,7 +158,7 @@ jobs: if: steps.affected_projects_test_count.outputs.value > 0 # need to run this outside nx runner context to avoid https://github.com/nrwl/nx/issues/30562 run: | - yarn jest -c apps/react-${{ matrix.react }}-tests/jest.config.ts + yarn jest -c apps/react-${{ matrix.react }}-tests/jest.config.mjs continue-on-error: true - name: Integration tests summary From 0c21d5d9231a5793aedffb0e58d480ec8b21602f Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:22:15 +0100 Subject: [PATCH 07/11] fixup! chore: migrate jest configs to .mjs to keep type-safety DX and make it work with old @nx/jest executor with jest 30 and node 22+ which added native TypeScript support --- packages/react-shadow/jest.config.js | 30 --------------------------- packages/react-shadow/jest.config.mts | 29 -------------------------- 2 files changed, 59 deletions(-) delete mode 100644 packages/react-shadow/jest.config.js delete mode 100644 packages/react-shadow/jest.config.mts diff --git a/packages/react-shadow/jest.config.js b/packages/react-shadow/jest.config.js deleted file mode 100644 index 2e3822cd..00000000 --- a/packages/react-shadow/jest.config.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable */ -// @ts-check -const { readFileSync } = require('fs'); - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${__dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -module.exports = { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; diff --git a/packages/react-shadow/jest.config.mts b/packages/react-shadow/jest.config.mts deleted file mode 100644 index 41a27ff5..00000000 --- a/packages/react-shadow/jest.config.mts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable */ -import { readFileSync } from 'fs'; - -// Reading the SWC compilation config and remove the "exclude" -// for the test files to be compiled by SWC -const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') -); - -// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. -// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" -if (swcJestConfig.swcrc === undefined) { - swcJestConfig.swcrc = false; -} - -// Uncomment if using global setup/teardown files being transformed via swc -// https://nx.dev/packages/jest/documents/overview#global-setup/teardown-with-nx-libraries -// jest needs EsModule Interop to find the default exported setup/teardown functions -// swcJestConfig.module.noInterop = false; - -export default { - displayName: 'button', - preset: '../../jest.preset.js', - transform: { - '^.+\\.[tj]sx?$': ['@swc/jest', swcJestConfig], - }, - moduleFileExtensions: ['js', 'ts', 'tsx', 'html'], - coverageDirectory: '../../coverage/packages/button', -}; From 676a90eea21576d5325e104de5c7a9fe924a1f4c Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:39:26 +0100 Subject: [PATCH 08/11] fixup! fixup! chore: migrate jest configs to .mjs to keep type-safety DX and make it work with old @nx/jest executor with jest 30 and node 22+ which added native TypeScript support --- apps/react-18-tests/jest.config.mjs | 6 ++---- apps/react-19-tests/jest.config.mjs | 6 ++---- jest.config.ts => jest.config.mjs | 1 + 3 files changed, 5 insertions(+), 8 deletions(-) rename jest.config.ts => jest.config.mjs (90%) diff --git a/apps/react-18-tests/jest.config.mjs b/apps/react-18-tests/jest.config.mjs index 05bd0e7d..ef078992 100644 --- a/apps/react-18-tests/jest.config.mjs +++ b/apps/react-18-tests/jest.config.mjs @@ -1,9 +1,7 @@ // @ts-check /* eslint-disable */ -const { readFileSync } = require('node:fs'); -const { join } = require('node:path'); -import { existsSync, readdirSync } from 'node:fs'; -import { resolve } from 'node:path'; +import { readFileSync, existsSync, readdirSync } from 'node:fs'; +import { join, resolve } from 'node:path'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( diff --git a/apps/react-19-tests/jest.config.mjs b/apps/react-19-tests/jest.config.mjs index 8a2b6706..c132714c 100644 --- a/apps/react-19-tests/jest.config.mjs +++ b/apps/react-19-tests/jest.config.mjs @@ -1,9 +1,7 @@ // @ts-check /* eslint-disable */ -const { readFileSync } = require('node:fs'); -const { join } = require('node:path'); -import { existsSync, readdirSync } from 'node:fs'; -import { resolve } from 'node:path'; +import { readFileSync, existsSync, readdirSync } from 'node:fs'; +import { join, resolve } from 'node:path'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( diff --git a/jest.config.ts b/jest.config.mjs similarity index 90% rename from jest.config.ts rename to jest.config.mjs index 6b3f2d6e..87781c89 100644 --- a/jest.config.ts +++ b/jest.config.mjs @@ -1,3 +1,4 @@ +// @ts-check import { getJestProjectsAsync } from '@nx/jest'; export default async () => ({ From 7947db075fd50511c8897ab9a7d59df84252e518 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:54:02 +0100 Subject: [PATCH 09/11] change files --- ...b-azure-theme-564fa82c-bd61-4b2c-86b5-ae7801bed65c.json | 7 +++++++ ...houdini-utils-b035ae80-234d-4448-9a3e-e4ba1918181d.json | 7 +++++++ ...ib-pierce-dom-27005c26-00d7-4e0e-9e3b-2fe41e7a31aa.json | 7 +++++++ ...act-cap-theme-865ae1f5-c882-46e0-b9e2-5765879c3a28.json | 7 +++++++ ...ib-react-chat-993f1be7-10a1-49a1-b7f4-fd7cc6644189.json | 7 +++++++ ...-react-window-4052405b-7a82-43fa-8329-d048cad3f973.json | 7 +++++++ ...t-window-grid-432c6ba4-b537-46ab-9e3b-31711b8103c8.json | 7 +++++++ ...ggable-dialog-beb25ea2-2850-4cde-b2c7-8574c677a5dc.json | 7 +++++++ ...ad-navigation-24da1739-ed15-4e59-b712-f56354b8555b.json | 7 +++++++ ...less-provider-df128e63-ea8c-4734-a46b-f13977925221.json | 7 +++++++ ...teractive-tab-44ce4b46-db66-46b0-a96c-216347d58992.json | 7 +++++++ ...react-keytips-804f57c6-2fc5-4e77-a39d-8c2dc19202e2.json | 7 +++++++ ...resize-handle-82aa463a-1420-4c4a-a36a-a4d510ffa551.json | 7 +++++++ ...-react-shadow-265c5a05-a782-4cef-9a47-50fb53e5a075.json | 7 +++++++ ...less-provider-aecfe89d-356a-4835-93c2-0bcef8677ffe.json | 7 +++++++ ...act-tree-grid-799ba25c-4234-4675-b816-5bd4d0c8fb7c.json | 7 +++++++ ...t-virtualizer-f0204f7e-8ef2-4c1f-acf1-d58bbf90a4e2.json | 7 +++++++ ...lelint-plugin-8c738f00-dd39-4064-889c-4e806424df98.json | 7 +++++++ ...ms-components-e93a9f29-f711-432f-89bc-b076c45f509b.json | 7 +++++++ ...variant-theme-1fca9c31-c793-4e85-a8a0-d10d5804d1f2.json | 7 +++++++ 20 files changed, 140 insertions(+) create mode 100644 change/@fluentui-contrib-azure-theme-564fa82c-bd61-4b2c-86b5-ae7801bed65c.json create mode 100644 change/@fluentui-contrib-houdini-utils-b035ae80-234d-4448-9a3e-e4ba1918181d.json create mode 100644 change/@fluentui-contrib-pierce-dom-27005c26-00d7-4e0e-9e3b-2fe41e7a31aa.json create mode 100644 change/@fluentui-contrib-react-cap-theme-865ae1f5-c882-46e0-b9e2-5765879c3a28.json create mode 100644 change/@fluentui-contrib-react-chat-993f1be7-10a1-49a1-b7f4-fd7cc6644189.json create mode 100644 change/@fluentui-contrib-react-data-grid-react-window-4052405b-7a82-43fa-8329-d048cad3f973.json create mode 100644 change/@fluentui-contrib-react-data-grid-react-window-grid-432c6ba4-b537-46ab-9e3b-31711b8103c8.json create mode 100644 change/@fluentui-contrib-react-draggable-dialog-beb25ea2-2850-4cde-b2c7-8574c677a5dc.json create mode 100644 change/@fluentui-contrib-react-gamepad-navigation-24da1739-ed15-4e59-b712-f56354b8555b.json create mode 100644 change/@fluentui-contrib-react-headless-provider-df128e63-ea8c-4734-a46b-f13977925221.json create mode 100644 change/@fluentui-contrib-react-interactive-tab-44ce4b46-db66-46b0-a96c-216347d58992.json create mode 100644 change/@fluentui-contrib-react-keytips-804f57c6-2fc5-4e77-a39d-8c2dc19202e2.json create mode 100644 change/@fluentui-contrib-react-resize-handle-82aa463a-1420-4c4a-a36a-a4d510ffa551.json create mode 100644 change/@fluentui-contrib-react-shadow-265c5a05-a782-4cef-9a47-50fb53e5a075.json create mode 100644 change/@fluentui-contrib-react-themeless-provider-aecfe89d-356a-4835-93c2-0bcef8677ffe.json create mode 100644 change/@fluentui-contrib-react-tree-grid-799ba25c-4234-4675-b816-5bd4d0c8fb7c.json create mode 100644 change/@fluentui-contrib-react-virtualizer-f0204f7e-8ef2-4c1f-acf1-d58bbf90a4e2.json create mode 100644 change/@fluentui-contrib-stylelint-plugin-8c738f00-dd39-4064-889c-4e806424df98.json create mode 100644 change/@fluentui-contrib-teams-components-e93a9f29-f711-432f-89bc-b076c45f509b.json create mode 100644 change/@fluentui-contrib-variant-theme-1fca9c31-c793-4e85-a8a0-d10d5804d1f2.json diff --git a/change/@fluentui-contrib-azure-theme-564fa82c-bd61-4b2c-86b5-ae7801bed65c.json b/change/@fluentui-contrib-azure-theme-564fa82c-bd61-4b2c-86b5-ae7801bed65c.json new file mode 100644 index 00000000..f95ad4ce --- /dev/null +++ b/change/@fluentui-contrib-azure-theme-564fa82c-bd61-4b2c-86b5-ae7801bed65c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/azure-theme", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-houdini-utils-b035ae80-234d-4448-9a3e-e4ba1918181d.json b/change/@fluentui-contrib-houdini-utils-b035ae80-234d-4448-9a3e-e4ba1918181d.json new file mode 100644 index 00000000..bf953509 --- /dev/null +++ b/change/@fluentui-contrib-houdini-utils-b035ae80-234d-4448-9a3e-e4ba1918181d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/houdini-utils", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-pierce-dom-27005c26-00d7-4e0e-9e3b-2fe41e7a31aa.json b/change/@fluentui-contrib-pierce-dom-27005c26-00d7-4e0e-9e3b-2fe41e7a31aa.json new file mode 100644 index 00000000..f183e104 --- /dev/null +++ b/change/@fluentui-contrib-pierce-dom-27005c26-00d7-4e0e-9e3b-2fe41e7a31aa.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/pierce-dom", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-cap-theme-865ae1f5-c882-46e0-b9e2-5765879c3a28.json b/change/@fluentui-contrib-react-cap-theme-865ae1f5-c882-46e0-b9e2-5765879c3a28.json new file mode 100644 index 00000000..4520e7d6 --- /dev/null +++ b/change/@fluentui-contrib-react-cap-theme-865ae1f5-c882-46e0-b9e2-5765879c3a28.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-cap-theme", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-chat-993f1be7-10a1-49a1-b7f4-fd7cc6644189.json b/change/@fluentui-contrib-react-chat-993f1be7-10a1-49a1-b7f4-fd7cc6644189.json new file mode 100644 index 00000000..2d98340a --- /dev/null +++ b/change/@fluentui-contrib-react-chat-993f1be7-10a1-49a1-b7f4-fd7cc6644189.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-chat", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-data-grid-react-window-4052405b-7a82-43fa-8329-d048cad3f973.json b/change/@fluentui-contrib-react-data-grid-react-window-4052405b-7a82-43fa-8329-d048cad3f973.json new file mode 100644 index 00000000..13f0ae20 --- /dev/null +++ b/change/@fluentui-contrib-react-data-grid-react-window-4052405b-7a82-43fa-8329-d048cad3f973.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-data-grid-react-window", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-data-grid-react-window-grid-432c6ba4-b537-46ab-9e3b-31711b8103c8.json b/change/@fluentui-contrib-react-data-grid-react-window-grid-432c6ba4-b537-46ab-9e3b-31711b8103c8.json new file mode 100644 index 00000000..dad88186 --- /dev/null +++ b/change/@fluentui-contrib-react-data-grid-react-window-grid-432c6ba4-b537-46ab-9e3b-31711b8103c8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-data-grid-react-window-grid", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-draggable-dialog-beb25ea2-2850-4cde-b2c7-8574c677a5dc.json b/change/@fluentui-contrib-react-draggable-dialog-beb25ea2-2850-4cde-b2c7-8574c677a5dc.json new file mode 100644 index 00000000..a016c3c1 --- /dev/null +++ b/change/@fluentui-contrib-react-draggable-dialog-beb25ea2-2850-4cde-b2c7-8574c677a5dc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-draggable-dialog", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-gamepad-navigation-24da1739-ed15-4e59-b712-f56354b8555b.json b/change/@fluentui-contrib-react-gamepad-navigation-24da1739-ed15-4e59-b712-f56354b8555b.json new file mode 100644 index 00000000..1272cdc7 --- /dev/null +++ b/change/@fluentui-contrib-react-gamepad-navigation-24da1739-ed15-4e59-b712-f56354b8555b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-gamepad-navigation", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-headless-provider-df128e63-ea8c-4734-a46b-f13977925221.json b/change/@fluentui-contrib-react-headless-provider-df128e63-ea8c-4734-a46b-f13977925221.json new file mode 100644 index 00000000..a593d188 --- /dev/null +++ b/change/@fluentui-contrib-react-headless-provider-df128e63-ea8c-4734-a46b-f13977925221.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-headless-provider", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-interactive-tab-44ce4b46-db66-46b0-a96c-216347d58992.json b/change/@fluentui-contrib-react-interactive-tab-44ce4b46-db66-46b0-a96c-216347d58992.json new file mode 100644 index 00000000..6fb6fabc --- /dev/null +++ b/change/@fluentui-contrib-react-interactive-tab-44ce4b46-db66-46b0-a96c-216347d58992.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-interactive-tab", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-keytips-804f57c6-2fc5-4e77-a39d-8c2dc19202e2.json b/change/@fluentui-contrib-react-keytips-804f57c6-2fc5-4e77-a39d-8c2dc19202e2.json new file mode 100644 index 00000000..d9dd87ea --- /dev/null +++ b/change/@fluentui-contrib-react-keytips-804f57c6-2fc5-4e77-a39d-8c2dc19202e2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-keytips", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-resize-handle-82aa463a-1420-4c4a-a36a-a4d510ffa551.json b/change/@fluentui-contrib-react-resize-handle-82aa463a-1420-4c4a-a36a-a4d510ffa551.json new file mode 100644 index 00000000..2e19babe --- /dev/null +++ b/change/@fluentui-contrib-react-resize-handle-82aa463a-1420-4c4a-a36a-a4d510ffa551.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-resize-handle", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-shadow-265c5a05-a782-4cef-9a47-50fb53e5a075.json b/change/@fluentui-contrib-react-shadow-265c5a05-a782-4cef-9a47-50fb53e5a075.json new file mode 100644 index 00000000..c96e958f --- /dev/null +++ b/change/@fluentui-contrib-react-shadow-265c5a05-a782-4cef-9a47-50fb53e5a075.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-shadow", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-themeless-provider-aecfe89d-356a-4835-93c2-0bcef8677ffe.json b/change/@fluentui-contrib-react-themeless-provider-aecfe89d-356a-4835-93c2-0bcef8677ffe.json new file mode 100644 index 00000000..48679aa4 --- /dev/null +++ b/change/@fluentui-contrib-react-themeless-provider-aecfe89d-356a-4835-93c2-0bcef8677ffe.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-themeless-provider", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-tree-grid-799ba25c-4234-4675-b816-5bd4d0c8fb7c.json b/change/@fluentui-contrib-react-tree-grid-799ba25c-4234-4675-b816-5bd4d0c8fb7c.json new file mode 100644 index 00000000..4eab31dd --- /dev/null +++ b/change/@fluentui-contrib-react-tree-grid-799ba25c-4234-4675-b816-5bd4d0c8fb7c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-tree-grid", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-react-virtualizer-f0204f7e-8ef2-4c1f-acf1-d58bbf90a4e2.json b/change/@fluentui-contrib-react-virtualizer-f0204f7e-8ef2-4c1f-acf1-d58bbf90a4e2.json new file mode 100644 index 00000000..1dc6cba4 --- /dev/null +++ b/change/@fluentui-contrib-react-virtualizer-f0204f7e-8ef2-4c1f-acf1-d58bbf90a4e2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/react-virtualizer", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-stylelint-plugin-8c738f00-dd39-4064-889c-4e806424df98.json b/change/@fluentui-contrib-stylelint-plugin-8c738f00-dd39-4064-889c-4e806424df98.json new file mode 100644 index 00000000..409d2e93 --- /dev/null +++ b/change/@fluentui-contrib-stylelint-plugin-8c738f00-dd39-4064-889c-4e806424df98.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/stylelint-plugin", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-teams-components-e93a9f29-f711-432f-89bc-b076c45f509b.json b/change/@fluentui-contrib-teams-components-e93a9f29-f711-432f-89bc-b076c45f509b.json new file mode 100644 index 00000000..68ed92c7 --- /dev/null +++ b/change/@fluentui-contrib-teams-components-e93a9f29-f711-432f-89bc-b076c45f509b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/teams-components", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-contrib-variant-theme-1fca9c31-c793-4e85-a8a0-d10d5804d1f2.json b/change/@fluentui-contrib-variant-theme-1fca9c31-c793-4e85-a8a0-d10d5804d1f2.json new file mode 100644 index 00000000..e0c3b4f8 --- /dev/null +++ b/change/@fluentui-contrib-variant-theme-1fca9c31-c793-4e85-a8a0-d10d5804d1f2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove jest config from excludes", + "packageName": "@fluentui-contrib/variant-theme", + "email": "hochelmartin@gmail.com", + "dependentChangeType": "none" +} From b0c4cf0be23d37a612b050a9997efca53eaed988 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 18:54:23 +0100 Subject: [PATCH 10/11] fixup! chore: update bball ignore list --- beachball.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/beachball.config.js b/beachball.config.js index f2fcbbe7..ae1683e9 100644 --- a/beachball.config.js +++ b/beachball.config.js @@ -16,6 +16,7 @@ module.exports = { '**/jest.config.{ts,mts,cts,js,mjs,cjs}', '**/playwright.config.ts', '**/project.json', + '**/tsconfig.spec.json', '**/*.md', '**/*.babelrc', '**/playwright/**', From ade52e84c1eeaecec3d35e32c98322caa2ce3d2d Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Thu, 15 Jan 2026 19:44:51 +0100 Subject: [PATCH 11/11] feat(nx-plugin): update library generator to build our jest.config.mjs --- .../library/files/jest.config.mjs.template | 27 +++++++++++++++++++ .../library/files/tsconfig.lib.json.template | 2 +- .../library/files/tsconfig.spec.json.template | 1 - .../src/generators/library/generator.spec.ts | 21 +++++++-------- .../src/generators/library/generator.ts | 12 +++++++-- 5 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 packages/nx-plugin/src/generators/library/files/jest.config.mjs.template diff --git a/packages/nx-plugin/src/generators/library/files/jest.config.mjs.template b/packages/nx-plugin/src/generators/library/files/jest.config.mjs.template new file mode 100644 index 00000000..c9b59031 --- /dev/null +++ b/packages/nx-plugin/src/generators/library/files/jest.config.mjs.template @@ -0,0 +1,27 @@ +// @ts-check +/* eslint-disable */ +import { readFileSync } from 'node:fs'; +// Reading the SWC compilation config and remove the "exclude" +// for the test files to be compiled by SWC +const { exclude: _, ...swcJestConfig } = JSON.parse( + readFileSync(`${import.meta.dirname}/.swcrc`, 'utf-8') +); +// disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. +// If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" +if (swcJestConfig.swcrc === undefined) { + swcJestConfig.swcrc = false; +} +// Uncomment if using global setup/teardown files being transformed via swc +// https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries +// jest needs EsModule Interop to find the default exported setup/teardown functions +// swcJestConfig.module.noInterop = false; +export default { + displayName: '<%= project %>', + preset: '../../jest.preset.js', + transform: { + '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig], + }, + moduleFileExtensions: ['ts', 'js', 'html'], + testEnvironment: '<%= testEnvironment %>', + coverageDirectory: '<%= coverageDirectory %>', +}; diff --git a/packages/nx-plugin/src/generators/library/files/tsconfig.lib.json.template b/packages/nx-plugin/src/generators/library/files/tsconfig.lib.json.template index c14e363a..75b2bf04 100644 --- a/packages/nx-plugin/src/generators/library/files/tsconfig.lib.json.template +++ b/packages/nx-plugin/src/generators/library/files/tsconfig.lib.json.template @@ -5,5 +5,5 @@ "declaration": true }, "include": ["src/**/*.ts"], - "exclude": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx" , "files/**"] + "exclude": ["src/**/*.test.ts", "src/**/*.test.tsx" , "files/**"] } diff --git a/packages/nx-plugin/src/generators/library/files/tsconfig.spec.json.template b/packages/nx-plugin/src/generators/library/files/tsconfig.spec.json.template index 361fd5a7..a7655bda 100644 --- a/packages/nx-plugin/src/generators/library/files/tsconfig.spec.json.template +++ b/packages/nx-plugin/src/generators/library/files/tsconfig.spec.json.template @@ -6,7 +6,6 @@ "types": ["jest", "node"] }, "include": [ - "jest.config.ts", "src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.d.ts" diff --git a/packages/nx-plugin/src/generators/library/generator.spec.ts b/packages/nx-plugin/src/generators/library/generator.spec.ts index 93adbfaa..77790613 100644 --- a/packages/nx-plugin/src/generators/library/generator.spec.ts +++ b/packages/nx-plugin/src/generators/library/generator.spec.ts @@ -43,8 +43,8 @@ describe('create-package generator', () => { "package.json", "project.json", "tsconfig.spec.json", - "jest.config.cts", "eslint.config.js", + "jest.config.mjs", ] `); @@ -61,36 +61,33 @@ describe('create-package generator', () => { const config = readProjectConfiguration(tree, 'test'); expect( - tree.read(joinPathFragments(config.root, 'jest.config.cts'), 'utf-8') + tree.read(joinPathFragments(config.root, 'jest.config.mjs'), 'utf-8') ).toMatchInlineSnapshot(` - "/* eslint-disable */ - const { readFileSync } = require('fs'); - + "// @ts-check + /* eslint-disable */ + import { readFileSync } from 'node:fs'; // Reading the SWC compilation config and remove the "exclude" // for the test files to be compiled by SWC const { exclude: _, ...swcJestConfig } = JSON.parse( - readFileSync(\`\${__dirname}/.swcrc\`, 'utf-8') + readFileSync(\`\${import.meta.dirname}/.swcrc\`, 'utf-8') ); - // disable .swcrc look-up by SWC core because we're passing in swcJestConfig ourselves. // If we do not disable this, SWC Core will read .swcrc and won't transform our test files due to "exclude" if (swcJestConfig.swcrc === undefined) { swcJestConfig.swcrc = false; } - // Uncomment if using global setup/teardown files being transformed via swc // https://nx.dev/nx-api/jest/documents/overview#global-setupteardown-with-nx-libraries // jest needs EsModule Interop to find the default exported setup/teardown functions // swcJestConfig.module.noInterop = false; - - module.exports = { + export default { displayName: 'test', preset: '../../jest.preset.js', transform: { '^.+\\\\.[tj]s$': ['@swc/jest', swcJestConfig], }, moduleFileExtensions: ['ts', 'js', 'html'], - testEnvironment: '', + testEnvironment: 'jsdom', coverageDirectory: '../../coverage/packages/test', }; " @@ -106,7 +103,7 @@ describe('create-package generator', () => { { "executor": "@nx/jest:jest", "options": { - "jestConfig": "packages/test/jest.config.cts", + "jestConfig": "packages/test/jest.config.mjs", "passWithNoTests": true, }, "outputs": [ diff --git a/packages/nx-plugin/src/generators/library/generator.ts b/packages/nx-plugin/src/generators/library/generator.ts index 1bb10b1d..1b28985f 100644 --- a/packages/nx-plugin/src/generators/library/generator.ts +++ b/packages/nx-plugin/src/generators/library/generator.ts @@ -10,6 +10,7 @@ import { ProjectConfiguration, readNxJson, updateNxJson, + offsetFromRoot, } from '@nx/devkit'; import * as path from 'path'; import { libraryGenerator } from '@nx/js'; @@ -18,7 +19,7 @@ import { PackageJson, getPackagePaths, npmScope } from '../../utils'; import { addCodeowner } from '../add-codeowners'; export default async function (tree: Tree, options: LibraryGeneratorSchema) { - const { name, owner } = options; + const { name, owner, testEnvironment = 'jsdom' } = options; const { projectConfig: newProject } = await invokeNxGenerators(tree, options); @@ -42,6 +43,7 @@ export default async function (tree: Tree, options: LibraryGeneratorSchema) { }; newProject.targets.test.options.passWithNoTests = true; + newProject.targets.test.options.jestConfig = `${newProject.root}/jest.config.mjs`; addCodeowner(tree, { path: projectRoot, @@ -57,7 +59,12 @@ export default async function (tree: Tree, options: LibraryGeneratorSchema) { return packageJson; }); - generateFiles(tree, path.join(__dirname, 'files'), paths.root, options); + generateFiles(tree, path.join(__dirname, 'files'), paths.root, { + ...options, + testEnvironment, + project: name, + coverageDirectory: offsetFromRoot(projectRoot) + `coverage/${projectRoot}`, + }); await formatFiles(tree); } @@ -79,6 +86,7 @@ async function invokeNxGenerators(tree: Tree, options: LibraryGeneratorSchema) { const projectConfig = readProjectConfiguration(tree, name); // remove nx/js generator defaults that we generate ourselves + tree.delete(joinPathFragments(projectConfig.root, 'jest.config.cts')); tree.delete(joinPathFragments(projectConfig.root, 'eslint.config.mjs')); tree.delete(joinPathFragments(projectConfig.root, 'eslint.config.cjs'));