Skip to content

Commit 96e5539

Browse files
committed
build: update nx
1 parent d81c15e commit 96e5539

22 files changed

+14221
-12415
lines changed

.eslintrc.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
@@ -11,7 +11,7 @@
1111
},
1212
"plugins": ["jest"],
1313
"rules": {
14-
"@nrwl/nx/enforce-module-boundaries": [
14+
"@nx/enforce-module-boundaries": [
1515
"error",
1616
{
1717
"enforceBuildableLibDependency": true,
@@ -28,15 +28,15 @@
2828
},
2929
{
3030
"files": ["*.ts", "*.tsx"],
31-
"extends": ["plugin:@nrwl/nx/typescript"],
31+
"extends": ["plugin:@nx/typescript"],
3232
"parserOptions": {
3333
"project": "./tsconfig.*?.json"
3434
},
3535
"rules": {}
3636
},
3737
{
3838
"files": ["*.js", "*.jsx"],
39-
"extends": ["plugin:@nrwl/nx/javascript"],
39+
"extends": ["plugin:@nx/javascript"],
4040
"rules": {}
4141
}
4242
]

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ Thumbs.db
4141

4242
# we use npm
4343
yarn.lock
44+
45+
.nx/cache

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.19.0
1+
v20

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22

33
/dist
44
/coverage
5+
6+
/.nx/cache

angular.json

-73
This file was deleted.

decorate-angular-cli.js

-79
This file was deleted.

jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const { getJestProjects } = require('@nrwl/jest');
1+
const { getJestProjects } = require('@nx/jest');
22

33
export default { projects: getJestProjects() };

jest.preset.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1-
const nxPreset = require('@nrwl/jest/preset').default;
1+
const nxPreset = require('@nx/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/ng-mockito/integration/.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"files": ["*.ts"],
77
"extends": [
8-
"plugin:@nrwl/nx/angular",
8+
"plugin:@nx/angular",
99
"plugin:@angular-eslint/template/process-inline-templates"
1010
],
1111
"parserOptions": {
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"files": ["*.html"],
35-
"extends": ["plugin:@nrwl/nx/angular-template"],
35+
"extends": ["plugin:@nx/angular-template"],
3636
"rules": {}
3737
}
3838
]

libs/ng-mockito/integration/jest.config.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ export default {
33
displayName: 'ng-mockito-integration',
44

55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6-
globals: {
7-
'ts-jest': {
8-
stringifyContentPathRegex: '\\.(html|svg)$',
9-
10-
tsconfig: '<rootDir>/tsconfig.spec.json',
11-
},
12-
},
6+
globals: {},
137
coverageDirectory: '../../../coverage/libs/ng-mockito/integration',
148
snapshotSerializers: [
159
'jest-preset-angular/build/serializers/no-ng-attributes',
1610
'jest-preset-angular/build/serializers/ng-snapshot',
1711
'jest-preset-angular/build/serializers/html-comment',
1812
],
1913
transform: {
20-
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
14+
'^.+.(ts|mjs|js|html)$': [
15+
'jest-preset-angular',
16+
{
17+
stringifyContentPathRegex: '\\.(html|svg)$',
18+
19+
tsconfig: '<rootDir>/tsconfig.spec.json',
20+
},
21+
],
2122
},
2223
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
2324
preset: '../../../jest.preset.js',
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "ng-mockito-integration",
3+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
4+
"projectType": "library",
5+
"sourceRoot": "libs/ng-mockito/integration/src",
6+
"prefix": "qp",
7+
"tags": ["scope:ng-mockito"],
8+
"generators": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
13+
"targets": {
14+
"lint": {
15+
"executor": "@nrwl/linter:eslint",
16+
"options": {
17+
"lintFilePatterns": ["libs/ng-mockito/integration/src/**/*.ts"]
18+
}
19+
},
20+
"test": {
21+
"executor": "@nx/jest:jest",
22+
"options": {
23+
"jestConfig": "libs/ng-mockito/integration/jest.config.ts"
24+
},
25+
"outputs": ["{workspaceRoot}/coverage/libs/ng-mockito/integration"]
26+
}
27+
}
28+
}

libs/ng-mockito/integration/tsconfig.spec.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"compilerOptions": {
44
"outDir": "../../../dist/out-tsc",
55
"module": "commonjs",
6-
"types": ["jest", "node"]
6+
"types": ["jest", "node"],
7+
"target": "es2016"
78
},
89
"files": ["src/test-setup.ts"],
910
"include": ["**/*.spec.ts", "**/*.test.ts", "**/*.d.ts", "jest.config.ts"]

libs/ng-mockito/ng-mockito/.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"files": ["*.ts"],
77
"extends": [
8-
"plugin:@nrwl/nx/angular",
8+
"plugin:@nx/angular",
99
"plugin:@angular-eslint/template/process-inline-templates"
1010
],
1111
"parserOptions": {
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"files": ["*.html"],
35-
"extends": ["plugin:@nrwl/nx/angular-template"],
35+
"extends": ["plugin:@nx/angular-template"],
3636
"rules": {}
3737
}
3838
]

libs/ng-mockito/ng-mockito/jest.config.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ export default {
33
displayName: 'ng-mockito-ng-mockito',
44

55
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
6-
globals: {
7-
'ts-jest': {
8-
stringifyContentPathRegex: '\\.(html|svg)$',
9-
10-
tsconfig: '<rootDir>/tsconfig.spec.json',
11-
},
12-
},
6+
globals: {},
137
coverageDirectory: '../../../coverage/libs/ng-mockito/ng-mockito',
148
snapshotSerializers: [
159
'jest-preset-angular/build/serializers/no-ng-attributes',
1610
'jest-preset-angular/build/serializers/ng-snapshot',
1711
'jest-preset-angular/build/serializers/html-comment',
1812
],
1913
transform: {
20-
'^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
14+
'^.+.(ts|mjs|js|html)$': [
15+
'jest-preset-angular',
16+
{
17+
stringifyContentPathRegex: '\\.(html|svg)$',
18+
19+
tsconfig: '<rootDir>/tsconfig.spec.json',
20+
},
21+
],
2122
},
2223
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
2324
preset: '../../../jest.preset.js',

0 commit comments

Comments
 (0)