Skip to content

Commit a537137

Browse files
authored
update to nx 10 (#110)
1 parent ee82e96 commit a537137

38 files changed

+1762
-833
lines changed

angular.json

-19
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@
105105
"builder": "@nrwl/jest:jest",
106106
"options": {
107107
"jestConfig": "apps/products/jest.config.js",
108-
"tsConfig": "apps/products/tsconfig.spec.json",
109-
"setupFile": "apps/products/src/test-setup.ts",
110108
"passWithNoTests": true
111109
}
112110
},
@@ -236,8 +234,6 @@
236234
"builder": "@nrwl/jest:jest",
237235
"options": {
238236
"jestConfig": "apps/cart/jest.config.js",
239-
"tsConfig": "apps/cart/tsconfig.spec.json",
240-
"setupFile": "apps/cart/src/test-setup.ts",
241237
"passWithNoTests": true
242238
}
243239
},
@@ -330,8 +326,6 @@
330326
"builder": "@nrwl/jest:jest",
331327
"options": {
332328
"jestConfig": "libs/shared/product/ui/jest.config.js",
333-
"tsConfig": "libs/shared/product/ui/tsconfig.spec.json",
334-
"setupFile": "libs/shared/product/ui/src/test-setup.ts",
335329
"passWithNoTests": true
336330
}
337331
}
@@ -357,8 +351,6 @@
357351
"builder": "@nrwl/jest:jest",
358352
"options": {
359353
"jestConfig": "libs/products/home-page/jest.config.js",
360-
"tsConfig": "libs/products/home-page/tsconfig.spec.json",
361-
"setupFile": "libs/products/home-page/src/test-setup.ts",
362354
"passWithNoTests": true
363355
}
364356
}
@@ -389,8 +381,6 @@
389381
"builder": "@nrwl/jest:jest",
390382
"options": {
391383
"jestConfig": "libs/cart/cart-page/jest.config.js",
392-
"tsConfig": "libs/cart/cart-page/tsconfig.spec.json",
393-
"setupFile": "libs/cart/cart-page/src/test-setup.ts",
394384
"passWithNoTests": true
395385
}
396386
}
@@ -446,8 +436,6 @@
446436
"builder": "@nrwl/jest:jest",
447437
"options": {
448438
"jestConfig": "libs/shared/cart/state/jest.config.js",
449-
"tsConfig": "libs/shared/cart/state/tsconfig.spec.json",
450-
"setupFile": "libs/shared/cart/state/src/test-setup.ts",
451439
"passWithNoTests": true
452440
}
453441
}
@@ -478,8 +466,6 @@
478466
"builder": "@nrwl/jest:jest",
479467
"options": {
480468
"jestConfig": "libs/shared/product/state/jest.config.js",
481-
"tsConfig": "libs/shared/product/state/tsconfig.spec.json",
482-
"setupFile": "libs/shared/product/state/src/test-setup.ts",
483469
"passWithNoTests": true
484470
}
485471
}
@@ -517,8 +503,6 @@
517503
"builder": "@nrwl/jest:jest",
518504
"options": {
519505
"jestConfig": "libs/shared/header/jest.config.js",
520-
"tsConfig": "libs/shared/header/tsconfig.spec.json",
521-
"setupFile": "libs/shared/header/src/test-setup.ts",
522506
"passWithNoTests": true
523507
}
524508
}
@@ -547,8 +531,6 @@
547531
"builder": "@nrwl/jest:jest",
548532
"options": {
549533
"jestConfig": "libs/products/product-detail-page/jest.config.js",
550-
"tsConfig": "libs/products/product-detail-page/tsconfig.spec.json",
551-
"setupFile": "libs/products/product-detail-page/src/test-setup.ts",
552534
"passWithNoTests": true
553535
}
554536
}
@@ -577,7 +559,6 @@
577559
},
578560
"cli": {
579561
"warnings": {
580-
"typescriptMismatch": false,
581562
"versionMismatch": false
582563
},
583564
"packageManager": "yarn",

apps/cart-e2e/tsconfig.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["cypress", "node"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.e2e.json"
11+
}
12+
]
713
}

apps/cart/jest.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ module.exports = {
22
name: 'cart',
33
preset: '../../jest.config.js',
44
transform: {
5-
'^.+\\.[tj]sx?$': 'ts-jest'
5+
'^.+\\.[tj]sx?$': 'ts-jest',
66
},
77
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8-
coverageDirectory: '../../coverage/apps/cart'
8+
coverageDirectory: '../../coverage/apps/cart',
9+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
10+
globals: { 'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' } },
911
};

apps/cart/tsconfig.app.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
"types": []
66
},
77
"exclude": ["**/*.spec.ts"],
8-
"include": ["**/*.ts"]
8+
"include": ["**/*.ts"],
9+
"files": [
10+
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
11+
"../../node_modules/@nrwl/react/typings/image.d.ts"
12+
]
913
}

apps/cart/tsconfig.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react",
55
"allowJs": true,
66
"esModuleInterop": true,
77
"allowSyntheticDefaultImports": true,
88
"types": ["node", "jest"]
99
},
10-
"include": ["**/*.ts", "**/*.tsx"],
11-
"files": [
12-
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
13-
"../../node_modules/@nrwl/react/typings/image.d.ts"
10+
"include": [],
11+
"files": [],
12+
"references": [
13+
{
14+
"path": "./tsconfig.app.json"
15+
},
16+
{
17+
"path": "./tsconfig.spec.json"
18+
}
1419
]
1520
}

apps/cart/tsconfig.spec.json

+4
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,9 @@
1111
"**/*.spec.js",
1212
"**/*.spec.jsx",
1313
"**/*.d.ts"
14+
],
15+
"files": [
16+
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
17+
"../../node_modules/@nrwl/react/typings/image.d.ts"
1418
]
1519
}

apps/products-e2e/tsconfig.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["cypress", "node"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.e2e.json"
11+
}
12+
]
713
}
File renamed without changes.

apps/products/jest.config.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ module.exports = {
55
snapshotSerializers: [
66
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
77
'jest-preset-angular/build/AngularSnapshotSerializer.js',
8-
'jest-preset-angular/build/HTMLCommentSerializer.js'
9-
]
8+
'jest-preset-angular/build/HTMLCommentSerializer.js',
9+
],
10+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
11+
globals: {
12+
'ts-jest': {
13+
tsConfig: '<rootDir>/tsconfig.spec.json',
14+
stringifyContentPathRegex: '\\.(html|svg)$',
15+
astTransformers: [
16+
'jest-preset-angular/build/InlineFilesTransformer',
17+
'jest-preset-angular/build/StripStylesTransformer',
18+
],
19+
},
20+
},
1021
};

apps/products/tsconfig.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["node", "jest"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.app.json"
11+
},
12+
{
13+
"path": "./tsconfig.spec.json"
14+
}
15+
]
716
}

libs/cart/cart-page/jest.config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ module.exports = {
22
name: 'cart-cart-page',
33
preset: '../../../jest.config.js',
44
transform: {
5-
'^.+\\.[tj]sx?$': 'ts-jest'
5+
'^.+\\.[tj]sx?$': 'ts-jest',
66
},
77
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html'],
8-
coverageDirectory: '../../../coverage/libs/cart/cart-page'
8+
coverageDirectory: '../../../coverage/libs/cart/cart-page',
9+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
10+
globals: { 'ts-jest': { tsConfig: '<rootDir>/tsconfig.spec.json' } },
911
};

libs/cart/cart-page/tsconfig.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
{
2-
"extends": "../../../tsconfig.json",
2+
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react",
55
"allowJs": true,
66
"esModuleInterop": true,
77
"allowSyntheticDefaultImports": true,
88
"types": ["node", "jest"]
99
},
10-
"include": ["**/*.ts", "**/*.tsx"]
10+
"include": [],
11+
"files": [],
12+
"references": [
13+
{
14+
"path": "./tsconfig.lib.json"
15+
},
16+
{
17+
"path": "./tsconfig.spec.json"
18+
}
19+
]
1120
}

libs/products/home-page/jest.config.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ module.exports = {
55
snapshotSerializers: [
66
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
77
'jest-preset-angular/build/AngularSnapshotSerializer.js',
8-
'jest-preset-angular/build/HTMLCommentSerializer.js'
9-
]
8+
'jest-preset-angular/build/HTMLCommentSerializer.js',
9+
],
10+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
11+
globals: {
12+
'ts-jest': {
13+
tsConfig: '<rootDir>/tsconfig.spec.json',
14+
stringifyContentPathRegex: '\\.(html|svg)$',
15+
astTransformers: [
16+
'jest-preset-angular/build/InlineFilesTransformer',
17+
'jest-preset-angular/build/StripStylesTransformer',
18+
],
19+
},
20+
},
1021
};

libs/products/home-page/tsconfig.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
2-
"extends": "../../../tsconfig.json",
2+
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["node", "jest"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.lib.json"
11+
},
12+
{
13+
"path": "./tsconfig.spec.json"
14+
}
15+
]
716
}

libs/products/home-page/tsconfig.lib.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"strictInjectionParameters": true,
1717
"enableResourceInlining": true
1818
},
19-
"exclude": ["src/test-setup.ts", "**/*.spec.ts"]
19+
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
20+
"include": ["**/*.ts"]
2021
}

libs/products/product-detail-page/jest.config.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ module.exports = {
55
snapshotSerializers: [
66
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
77
'jest-preset-angular/build/AngularSnapshotSerializer.js',
8-
'jest-preset-angular/build/HTMLCommentSerializer.js'
9-
]
8+
'jest-preset-angular/build/HTMLCommentSerializer.js',
9+
],
10+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
11+
globals: {
12+
'ts-jest': {
13+
tsConfig: '<rootDir>/tsconfig.spec.json',
14+
stringifyContentPathRegex: '\\.(html|svg)$',
15+
astTransformers: [
16+
'jest-preset-angular/build/InlineFilesTransformer',
17+
'jest-preset-angular/build/StripStylesTransformer',
18+
],
19+
},
20+
},
1021
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
2-
"extends": "../../../tsconfig.json",
2+
"extends": "../../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["node", "jest"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.lib.json"
11+
},
12+
{
13+
"path": "./tsconfig.spec.json"
14+
}
15+
]
716
}

libs/products/product-detail-page/tsconfig.lib.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"strictInjectionParameters": true,
1717
"enableResourceInlining": true
1818
},
19-
"exclude": ["src/test-setup.ts", "**/*.spec.ts"]
19+
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
20+
"include": ["**/*.ts"]
2021
}

libs/shared/cart/state/jest.config.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ module.exports = {
55
snapshotSerializers: [
66
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
77
'jest-preset-angular/build/AngularSnapshotSerializer.js',
8-
'jest-preset-angular/build/HTMLCommentSerializer.js'
9-
]
8+
'jest-preset-angular/build/HTMLCommentSerializer.js',
9+
],
10+
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
11+
globals: {
12+
'ts-jest': {
13+
tsConfig: '<rootDir>/tsconfig.spec.json',
14+
stringifyContentPathRegex: '\\.(html|svg)$',
15+
astTransformers: [
16+
'jest-preset-angular/build/InlineFilesTransformer',
17+
'jest-preset-angular/build/StripStylesTransformer',
18+
],
19+
},
20+
},
1021
};

libs/shared/cart/state/tsconfig.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
{
2-
"extends": "../../../../tsconfig.json",
2+
"extends": "../../../../tsconfig.base.json",
33
"compilerOptions": {
44
"types": ["node", "jest"]
55
},
6-
"include": ["**/*.ts"]
6+
"include": [],
7+
"files": [],
8+
"references": [
9+
{
10+
"path": "./tsconfig.lib.json"
11+
},
12+
{
13+
"path": "./tsconfig.spec.json"
14+
}
15+
]
716
}

libs/shared/cart/state/tsconfig.lib.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"strictInjectionParameters": true,
1717
"enableResourceInlining": true
1818
},
19-
"exclude": ["src/test-setup.ts", "**/*.spec.ts"]
19+
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
20+
"include": ["**/*.ts"]
2021
}

0 commit comments

Comments
 (0)