Skip to content

Commit 7251504

Browse files
committed
update for ng16.2
1 parent 6ae2fa8 commit 7251504

File tree

83 files changed

+2690
-2336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2690
-2336
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
88
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
9+
"@nx/enforce-module-boundaries": [
1010
"error",
1111
{
1212
"enforceBuildableLibDependency": true,
@@ -23,12 +23,12 @@
2323
},
2424
{
2525
"files": ["*.ts", "*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
26+
"extends": ["plugin:@nx/typescript"],
2727
"rules": {}
2828
},
2929
{
3030
"files": ["*.js", "*.jsx"],
31-
"extends": ["plugin:@nrwl/nx/javascript"],
31+
"extends": ["plugin:@nx/javascript"],
3232
"rules": {}
3333
},
3434
{

apps/mfe1-e2e/project.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"projectType": "application",
66
"targets": {
77
"e2e": {
8-
"executor": "@nrwl/cypress:cypress",
8+
"executor": "@nx/cypress:cypress",
99
"options": {
1010
"cypressConfig": "apps/mfe1-e2e/cypress.json",
1111
"devServerTarget": "mfe1:serve:development",
12-
"testingType": "e2e",
13-
"tsConfig": "apps/mfe1-e2e/tsconfig.json"
12+
"testingType": "e2e"
1413
},
1514
"configurations": {
1615
"production": {
@@ -19,7 +18,7 @@
1918
}
2019
},
2120
"lint": {
22-
"executor": "@nrwl/linter:eslint",
21+
"executor": "@nx/linter:eslint",
2322
"outputs": ["{options.outputFile}"],
2423
"options": {
2524
"lintFilePatterns": ["apps/mfe1-e2e/**/*.{js,ts}"]

apps/mfe1-e2e/src/plugins/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// This function is called when a project is opened or re-opened (e.g. due to
1212
// the project's config changing)
1313

14-
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
14+
const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
1515

1616
module.exports = (on, config) => {
1717
// `on` is used to hook into various events Cypress emits

apps/mfe1/.browserslistrc

-16
This file was deleted.

apps/mfe1/.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
"rules": {
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"files": ["*.html"],
32-
"extends": ["plugin:@nrwl/nx/angular-template"],
32+
"extends": ["plugin:@nx/angular-template"],
3333
"rules": {}
3434
}
3535
]

apps/mfe1/jest.config.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ export default {
33
displayName: 'mfe1',
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/apps/mfe1',
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: [

apps/mfe1/project.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@
7070
}
7171
},
7272
"lint": {
73-
"executor": "@nrwl/linter:eslint",
73+
"executor": "@nx/linter:eslint",
7474
"options": {
7575
"lintFilePatterns": ["apps/mfe1/**/*.ts", "apps/mfe1/**/*.html"]
7676
}
7777
},
7878
"test": {
79-
"executor": "@nrwl/jest:jest",
80-
"outputs": ["coverage/apps/mfe1"],
79+
"executor": "@nx/jest:jest",
80+
"outputs": ["{workspaceRoot}/coverage/apps/mfe1"],
8181
"options": {
8282
"jestConfig": "apps/mfe1/jest.config.ts",
8383
"passWithNoTests": true

apps/mfe1/src/app/nx-welcome.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,10 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
769769
Add UI library
770770
</summary>
771771
<pre><span># Generate UI lib</span>
772-
nx g @nrwl/angular:lib ui
772+
nx g @nx/angular:lib ui
773773
774774
<span># Add a component</span>
775-
nx g @nrwl/angular:component button --project ui</pre>
775+
nx g @nx/angular:component button --project ui</pre>
776776
</details>
777777
<details>
778778
<summary>

apps/mfe1/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
},
77
"files": ["src/main.ts", "src/polyfills.ts"],
88
"include": ["src/**/*.d.ts"],
9-
"exclude": ["**/*.test.ts", "**/*.spec.ts"]
9+
"exclude": ["**/*.test.ts", "**/*.spec.ts", "jest.config.ts"]
1010
}

apps/mfe2-e2e/project.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
"projectType": "application",
66
"targets": {
77
"e2e": {
8-
"executor": "@nrwl/cypress:cypress",
8+
"executor": "@nx/cypress:cypress",
99
"options": {
1010
"cypressConfig": "apps/mfe2-e2e/cypress.json",
1111
"devServerTarget": "mfe2:serve:development",
12-
"testingType": "e2e",
13-
"tsConfig": "apps/mfe2-e2e/tsconfig.json"
12+
"testingType": "e2e"
1413
},
1514
"configurations": {
1615
"production": {
@@ -19,7 +18,7 @@
1918
}
2019
},
2120
"lint": {
22-
"executor": "@nrwl/linter:eslint",
21+
"executor": "@nx/linter:eslint",
2322
"outputs": ["{options.outputFile}"],
2423
"options": {
2524
"lintFilePatterns": ["apps/mfe2-e2e/**/*.{js,ts}"]

apps/mfe2-e2e/src/plugins/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// This function is called when a project is opened or re-opened (e.g. due to
1212
// the project's config changing)
1313

14-
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
14+
const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
1515

1616
module.exports = (on, config) => {
1717
// `on` is used to hook into various events Cypress emits

apps/mfe2/.browserslistrc

-16
This file was deleted.

apps/mfe2/.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
"rules": {
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"files": ["*.html"],
32-
"extends": ["plugin:@nrwl/nx/angular-template"],
32+
"extends": ["plugin:@nx/angular-template"],
3333
"rules": {}
3434
}
3535
]

apps/mfe2/jest.config.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ export default {
33
displayName: 'mfe2',
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/apps/mfe2',
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: [

apps/mfe2/project.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@
7171
}
7272
},
7373
"lint": {
74-
"executor": "@nrwl/linter:eslint",
74+
"executor": "@nx/linter:eslint",
7575
"options": {
7676
"lintFilePatterns": ["apps/mfe2/**/*.ts", "apps/mfe2/**/*.html"]
7777
}
7878
},
7979
"test": {
80-
"executor": "@nrwl/jest:jest",
81-
"outputs": ["coverage/apps/mfe2"],
80+
"executor": "@nx/jest:jest",
81+
"outputs": ["{workspaceRoot}/coverage/apps/mfe2"],
8282
"options": {
8383
"jestConfig": "apps/mfe2/jest.config.ts",
8484
"passWithNoTests": true

apps/mfe2/src/app/nx-welcome.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -769,10 +769,10 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
769769
Add UI library
770770
</summary>
771771
<pre><span># Generate UI lib</span>
772-
nx g @nrwl/angular:lib ui
772+
nx g @nx/angular:lib ui
773773
774774
<span># Add a component</span>
775-
nx g @nrwl/angular:component button --project ui</pre>
775+
nx g @nx/angular:component button --project ui</pre>
776776
</details>
777777
<details>
778778
<summary>

apps/mfe2/tsconfig.app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
},
77
"files": ["src/main.ts", "src/polyfills.ts"],
88
"include": ["src/**/*.d.ts"],
9-
"exclude": ["**/*.test.ts", "**/*.spec.ts"]
9+
"exclude": ["**/*.test.ts", "**/*.spec.ts", "jest.config.ts"]
1010
}

apps/native-federation-e2e/jest.config.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
export default {
33
displayName: 'native-federation-e2e',
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/apps/native-federation-e2e',

apps/native-federation-e2e/project.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
"sourceRoot": "apps/native-federation-e2e/src",
66
"targets": {
77
"e2e": {
8-
"executor": "@nrwl/nx-plugin:e2e",
8+
"executor": "@nx/jest:jest",
99
"options": {
10-
"target": "native-federation:build",
11-
"jestConfig": "apps/native-federation-e2e/jest.config.ts"
12-
}
10+
"jestConfig": "apps/native-federation-e2e/jest.config.ts",
11+
"runInBand": true
12+
},
13+
"dependsOn": ["native-federation:build"]
1314
}
1415
},
1516
"tags": [],

apps/native-federation-e2e/tests/native-federation.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
readJson,
55
runNxCommandAsync,
66
uniq,
7-
} from '@nrwl/nx-plugin/testing';
7+
} from '@nx/plugin/testing';
88

99
describe('native-federation e2e', () => {
1010
// Setting up individual workspaces per

apps/playground-e2e/project.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"projectType": "application",
66
"targets": {
77
"e2e": {
8-
"executor": "@nrwl/cypress:cypress",
8+
"executor": "@nx/cypress:cypress",
99
"options": {
1010
"cypressConfig": "apps/playground-e2e/cypress.json",
1111
"tsConfig": "apps/playground-e2e/tsconfig.e2e.json",
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"lint": {
21-
"executor": "@nrwl/linter:eslint",
21+
"executor": "@nx/linter:eslint",
2222
"options": {
2323
"lintFilePatterns": ["apps/playground-e2e/**/*.{js,ts}"]
2424
},

apps/playground-e2e/src/plugins/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// This function is called when a project is opened or re-opened (e.g. due to
1212
// the project's config changing)
1313

14-
const { preprocessTypescript } = require('@nrwl/cypress/plugins/preprocessor');
14+
const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
1515

1616
module.exports = (on, config) => {
1717
// `on` is used to hook into various events Cypress emits

apps/playground/.browserslistrc

-17
This file was deleted.

0 commit comments

Comments
 (0)