Skip to content

Commit e7e1456

Browse files
committed
chore: upgrade nx
1 parent 97ae506 commit e7e1456

File tree

6 files changed

+20304
-14857
lines changed

6 files changed

+20304
-14857
lines changed

jest.preset.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
const nxPreset = require('@nrwl/jest/preset').default;
22

3-
module.exports = { ...nxPreset };
3+
module.exports = {
4+
...nxPreset,
5+
/* TODO: Update to latest Jest snapshotFormat
6+
* By default Nx has kept the older style of Jest Snapshot formats
7+
* to prevent breaking of any existing tests with snapshots.
8+
* It's recommend you update to the latest format.
9+
* You can do this by removing snapshotFormat property
10+
* and running tests with --update-snapshot flag.
11+
* Example: "nx affected --targets=test --update-snapshot"
12+
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
13+
*/
14+
snapshotFormat: { escapeString: true, printBasicPrototype: true },
15+
};

libs/angular-three/jest.config.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ export default {
33
displayName: 'angular-three',
44
preset: '../../jest.preset.js',
55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6-
globals: {
7-
'ts-jest': {
8-
tsconfig: '<rootDir>/tsconfig.spec.json',
9-
stringifyContentPathRegex: '\\.(html|svg)$',
10-
},
11-
},
6+
globals: {},
127
coverageDirectory: '../../coverage/libs/angular-three',
138
transform: {
14-
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
9+
'^.+\\.(ts|mjs|js|html)$': [
10+
'jest-preset-angular',
11+
{
12+
tsconfig: '<rootDir>/tsconfig.spec.json',
13+
stringifyContentPathRegex: '\\.(html|svg)$',
14+
},
15+
],
1516
},
1617
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
1718
snapshotSerializers: [

libs/plugin/jest.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
export default {
33
displayName: 'plugin',
44
preset: '../../jest.preset.js',
5-
globals: {
6-
'ts-jest': {
7-
tsconfig: '<rootDir>/tsconfig.spec.json',
8-
},
9-
},
5+
globals: {},
106
transform: {
11-
'^.+\\.[tj]s$': 'ts-jest',
7+
'^.+\\.[tj]s$': [
8+
'ts-jest',
9+
{
10+
tsconfig: '<rootDir>/tsconfig.spec.json',
11+
},
12+
],
1213
},
1314
moduleFileExtensions: ['ts', 'js', 'html'],
1415
coverageDirectory: '../../coverage/libs/plugin',

migrations.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
22
"migrations": [
33
{
4-
"version": "15.7.0-beta.0",
5-
"description": "Split global configuration files into individual project.json files. This migration has been added automatically to the beginning of your migration set to retroactively make them work with the new version of Nx.",
64
"cli": "nx",
7-
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
8-
"package": "@nrwl/workspace",
9-
"name": "15-7-0-split-configuration-into-project-json-files"
5+
"version": "15.8.0-beta.0",
6+
"description": "Rename .lib.swcrc to .swcrc for better SWC support throughout the workspace",
7+
"factory": "./src/migrations/update-15-8-0/rename-swcrc-config",
8+
"package": "@nrwl/js",
9+
"name": "rename-swcrc-config"
1010
},
1111
{
12-
"version": "15.7.0-beta.0",
13-
"description": "Split global configuration files (e.g., workspace.json) into individual project.json files.",
12+
"version": "15.8.0-beta.0",
1413
"cli": "nx",
15-
"implementation": "./src/migrations/update-15-7-0/split-configuration-into-project-json-files",
16-
"package": "@nrwl/workspace",
17-
"name": "15-7-0-split-configuration-into-project-json-files"
14+
"description": "Update jest configs to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
15+
"factory": "./src/migrations/update-15-8-0/update-configs-jest-29",
16+
"package": "@nrwl/jest",
17+
"name": "update-configs-jest-29"
1818
},
1919
{
20+
"version": "15.8.0-beta.0",
2021
"cli": "nx",
21-
"version": "15.7.1-beta.0",
22-
"description": "Add node_modules to root eslint ignore",
23-
"factory": "./src/migrations/update-15-7-1/add-eslint-ignore",
24-
"package": "@nrwl/linter",
25-
"name": "add-eslint-ignore"
22+
"description": "Update jest test files to support jest 29 changes (https://jestjs.io/docs/upgrading-to-jest29)",
23+
"factory": "./src/migrations/update-15-8-0/update-tests-jest-29",
24+
"package": "@nrwl/jest",
25+
"name": "update-tests-jest-29"
2626
},
2727
{
2828
"cli": "nx",
29-
"version": "15.7.0-beta.1",
30-
"description": "Install the required angular-devkit packages as we do not directly depend on them anymore",
31-
"factory": "./src/migrations/update-15-7-0/install-required-packages",
29+
"version": "15.8.0-beta.4",
30+
"description": "Update the @angular/cli package version to ~15.2.0.",
31+
"factory": "./src/migrations/update-15-8-0/update-angular-cli",
3232
"package": "@nrwl/angular",
33-
"name": "install-required-packages"
33+
"name": "update-angular-cli-version-15-2-0"
3434
}
3535
]
3636
}

package.json

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,65 +8,65 @@
88
},
99
"private": true,
1010
"devDependencies": {
11-
"@angular-devkit/build-angular": "~15.1.6",
12-
"@angular-devkit/core": "~15.1.6",
13-
"@angular-devkit/schematics": "~15.1.6",
11+
"@angular-devkit/build-angular": "15.2.0",
12+
"@angular-devkit/core": "15.2.0",
13+
"@angular-devkit/schematics": "15.2.0",
1414
"@angular-eslint/eslint-plugin": "~15.2.1",
1515
"@angular-eslint/eslint-plugin-template": "~15.2.1",
1616
"@angular-eslint/template-parser": "~15.2.1",
17-
"@angular/cli": "~15.1.6",
18-
"@angular/compiler-cli": "~15.1.5",
19-
"@angular/language-service": "~15.1.5",
20-
"@nrwl/angular": "15.7.2",
21-
"@nrwl/devkit": "15.7.2",
22-
"@nrwl/eslint-plugin-nx": "15.7.2",
23-
"@nrwl/jest": "15.7.2",
24-
"@nrwl/js": "15.7.2",
25-
"@nrwl/linter": "15.7.2",
26-
"@nrwl/nx-cloud": "15.0.3",
27-
"@nrwl/nx-plugin": "15.7.2",
28-
"@nrwl/workspace": "15.7.2",
17+
"@angular/cli": "~15.2.0",
18+
"@angular/compiler-cli": "15.2.0",
19+
"@angular/language-service": "15.2.0",
20+
"@nrwl/angular": "15.8.1",
21+
"@nrwl/devkit": "15.8.1",
22+
"@nrwl/eslint-plugin-nx": "15.8.1",
23+
"@nrwl/jest": "15.8.1",
24+
"@nrwl/js": "15.8.1",
25+
"@nrwl/linter": "15.8.1",
26+
"@nrwl/nx-cloud": "15.1.1",
27+
"@nrwl/nx-plugin": "15.8.1",
28+
"@nrwl/workspace": "15.8.1",
2929
"@release-it/bumper": "^4.0.2",
3030
"@release-it/conventional-changelog": "^5.1.1",
31-
"@schematics/angular": "~15.1.6",
31+
"@schematics/angular": "15.2.0",
3232
"@swc-node/register": "^1.6.2",
3333
"@swc/cli": "~0.1.62",
3434
"@swc/core": "^1.3.35",
35-
"@types/jest": "28.1.1",
35+
"@types/jest": "29.4.0",
3636
"@types/node": "18.14.0",
3737
"@types/three": "^0.149.0",
3838
"@typescript-eslint/eslint-plugin": "^5.53.0",
3939
"@typescript-eslint/parser": "^5.53.0",
4040
"dotenv-cli": "^7.0.0",
4141
"eslint": "~8.34.0",
4242
"eslint-config-prettier": "8.6.0",
43-
"jest": "28.1.1",
44-
"jest-environment-jsdom": "28.1.1",
45-
"jest-preset-angular": "~12.2.6",
43+
"jest": "29.4.3",
44+
"jest-environment-jsdom": "29.4.3",
45+
"jest-preset-angular": "13.0.0",
4646
"jsonc-eslint-parser": "^2.1.0",
47-
"ng-packagr": "~15.1.2",
48-
"nx": "15.7.2",
47+
"ng-packagr": "15.2.2",
48+
"nx": "15.8.1",
4949
"postcss": "^8.4.21",
5050
"postcss-import": "~15.1.0",
5151
"postcss-preset-env": "~8.0.1",
5252
"postcss-url": "~10.1.3",
5353
"prettier": "^2.8.4",
5454
"prettier-plugin-organize-imports": "^3.2.2",
5555
"release-it": "^15.6.0",
56-
"ts-jest": "28.0.5",
56+
"ts-jest": "29.0.5",
5757
"ts-node": "10.9.1",
5858
"typescript": "~4.9.5"
5959
},
6060
"dependencies": {
61-
"@angular/animations": "~15.1.5",
62-
"@angular/cdk": "~15.1.5",
63-
"@angular/common": "~15.1.5",
64-
"@angular/compiler": "~15.1.5",
65-
"@angular/core": "~15.1.5",
66-
"@angular/forms": "~15.1.5",
67-
"@angular/platform-browser": "~15.1.5",
68-
"@angular/platform-browser-dynamic": "~15.1.5",
69-
"@angular/router": "~15.1.5",
61+
"@angular/animations": "15.2.0",
62+
"@angular/cdk": "15.2.0",
63+
"@angular/common": "15.2.0",
64+
"@angular/compiler": "15.2.0",
65+
"@angular/core": "15.2.0",
66+
"@angular/forms": "15.2.0",
67+
"@angular/platform-browser": "15.2.0",
68+
"@angular/platform-browser-dynamic": "15.2.0",
69+
"@angular/router": "15.2.0",
7070
"@rx-angular/state": "^1.7.0",
7171
"@swc/helpers": "~0.4.14",
7272
"ngx-resize": "^1.0.6",
@@ -75,6 +75,6 @@
7575
"three": "^0.149.0",
7676
"three-stdlib": "^2.21.8",
7777
"tslib": "^2.5.0",
78-
"zone.js": "~0.12.0"
78+
"zone.js": "0.12.0"
7979
}
8080
}

0 commit comments

Comments
 (0)