Skip to content

Commit 0091a5a

Browse files
author
viacheslav.sotsenko
committed
feat: add angular & nx 16 + update all libs
1 parent 3c902e9 commit 0091a5a

20 files changed

+31256
-30972
lines changed

.eslintrc.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
"ecmaVersion": 12,
1010
"sourceType": "module"
1111
},
12-
"plugins": ["@typescript-eslint", "max-params-no-constructor", "@nrwl/nx"],
12+
"plugins": ["@typescript-eslint", "max-params-no-constructor", "@nx"],
1313
"overrides": [
1414
{
1515
"files": ["*.ts"],
1616
"extends": [
1717
"eslint:recommended",
18-
"plugin:@angular-eslint/recommended",
19-
"plugin:@typescript-eslint/recommended",
20-
"plugin:@angular-eslint/recommended--extra"
18+
"plugin:@typescript-eslint/recommended"
2119
],
2220
"rules": {
2321
"max-len": [
@@ -80,10 +78,7 @@
8078
"spaced-comment": ["error", "always"],
8179
"space-before-blocks": "error",
8280
"keyword-spacing": "error",
83-
"max-params-no-constructor/max-params-no-constructor": [
84-
"error",
85-
3
86-
],
81+
"max-params-no-constructor/max-params-no-constructor": ["error", 3],
8782
"no-eq-null": "error",
8883
"no-unreachable": "error",
8984
"quotes": [

apps/code-review-e2e/cypress.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig } from 'cypress';
2-
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
2+
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
33

44
export default defineConfig({
55
e2e: nxE2EPreset(__dirname)

apps/code-review-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/code-review-e2e/cypress.config.ts",
1111
"devServerTarget": "code-review:serve:development",
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"lint": {
21-
"executor": "@nrwl/linter:eslint",
21+
"executor": "@nx/linter:eslint",
2222
"outputs": ["{options.outputFile}"],
2323
"options": {
2424
"lintFilePatterns": ["apps/code-review-e2e/**/*.{js,ts}"]

apps/code-review/project.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"prefix": "acua",
77
"targets": {
88
"build": {
9-
"executor": "@nrwl/angular:webpack-browser",
9+
"executor": "@nx/angular:webpack-browser",
1010
"outputs": ["{options.outputPath}"],
1111
"options": {
1212
"outputPath": "dist/apps/code-review",
@@ -32,9 +32,7 @@
3232
"path": "apps/code-review/webpack.config.js"
3333
},
3434
"stylePreprocessorOptions": {
35-
"includePaths": [
36-
"libs/assets/src/lib/styles"
37-
]
35+
"includePaths": ["libs/assets/src/lib/styles"]
3836
}
3937
},
4038
"configurations": {
@@ -55,7 +53,7 @@
5553
},
5654
"development": {
5755
"buildOptimizer": false,
58-
"optimization": false,
56+
"optimization": true,
5957
"vendorChunk": true,
6058
"extractLicenses": false,
6159
"sourceMap": true,
@@ -69,7 +67,7 @@
6967
},
7068
"local": {
7169
"buildOptimizer": false,
72-
"optimization": false,
70+
"optimization": true,
7371
"vendorChunk": true,
7472
"extractLicenses": false,
7573
"sourceMap": true,
@@ -85,7 +83,7 @@
8583
"defaultConfiguration": "production"
8684
},
8785
"serve": {
88-
"executor": "@nrwl/angular:webpack-dev-server",
86+
"executor": "@nx/angular:webpack-dev-server",
8987
"options": {
9088
"port": 4201,
9189
"publicHost": "http://localhost:4201",
@@ -111,14 +109,14 @@
111109
}
112110
},
113111
"lint": {
114-
"executor": "@nrwl/linter:eslint",
112+
"executor": "@nx/linter:eslint",
115113
"outputs": ["{options.outputFile}"],
116114
"options": {
117115
"lintFilePatterns": ["apps/code-review/**/*.ts"]
118116
}
119117
},
120118
"test": {
121-
"executor": "@nrwl/jest:jest",
119+
"executor": "@nx/jest:jest",
122120
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
123121
"options": {
124122
"jestConfig": "apps/code-review/jest.config.ts",

apps/code-review/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { withModuleFederation } = require('@nrwl/angular/module-federation');
1+
const { withModuleFederation } = require('@nx/angular/module-federation');
22
const moduleFederationConfig = require('./module-federation.config');
33

4-
module.exports = withModuleFederation(moduleFederationConfig)
4+
module.exports = withModuleFederation(moduleFederationConfig);

apps/host-e2e/cypress.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineConfig } from 'cypress';
2-
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
2+
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
33

44
export default defineConfig({
55
e2e: nxE2EPreset(__dirname)

apps/host-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/host-e2e/cypress.config.ts",
1111
"devServerTarget": "host:serve:development",
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"lint": {
21-
"executor": "@nrwl/linter:eslint",
21+
"executor": "@nx/linter:eslint",
2222
"outputs": ["{options.outputFile}"],
2323
"options": {
2424
"lintFilePatterns": ["apps/host-e2e/**/*.{js,ts}"]

apps/host/project.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"prefix": "acua",
77
"targets": {
88
"build": {
9-
"executor": "@nrwl/angular:webpack-browser",
9+
"executor": "@nx/angular:webpack-browser",
1010
"outputs": ["{options.outputPath}"],
1111
"options": {
1212
"outputPath": "dist/apps/host",
@@ -57,7 +57,7 @@
5757
},
5858
"development": {
5959
"buildOptimizer": false,
60-
"optimization": false,
60+
"optimization": true,
6161
"vendorChunk": true,
6262
"extractLicenses": false,
6363
"sourceMap": true,
@@ -74,7 +74,7 @@
7474
},
7575
"local": {
7676
"buildOptimizer": false,
77-
"optimization": false,
77+
"optimization": true,
7878
"vendorChunk": true,
7979
"extractLicenses": false,
8080
"sourceMap": true,
@@ -93,7 +93,7 @@
9393
"defaultConfiguration": "production"
9494
},
9595
"serve": {
96-
"executor": "@nrwl/angular:webpack-dev-server",
96+
"executor": "@nx/angular:webpack-dev-server",
9797
"options": {
9898
"port": 80,
9999
"host": "127.0.0.1",
@@ -119,14 +119,14 @@
119119
}
120120
},
121121
"lint": {
122-
"executor": "@nrwl/linter:eslint",
122+
"executor": "@nx/linter:eslint",
123123
"outputs": ["{options.outputFile}"],
124124
"options": {
125125
"lintFilePatterns": ["apps/host/**/*.ts"]
126126
}
127127
},
128128
"test": {
129-
"executor": "@nrwl/jest:jest",
129+
"executor": "@nx/jest:jest",
130130
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
131131
"options": {
132132
"jestConfig": "apps/host/jest.config.ts",

apps/host/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { withModuleFederation } = require('@nrwl/angular/module-federation');
1+
const { withModuleFederation } = require('@nx/angular/module-federation');
22
const config = require('./module-federation.config');
33

44
module.exports = withModuleFederation({

apps/host/webpack.dev.config.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
const { withModuleFederation } = require('@nrwl/angular/module-federation');
1+
const { withModuleFederation } = require('@nx/angular/module-federation');
22
const config = require('./module-federation.config');
33

44
module.exports = withModuleFederation({
5-
...config,
6-
remotes: [
7-
['code-review', 'https://dev-acua-code-review.web.app']
8-
]
5+
...config,
6+
remotes: [['code-review', 'https://dev-acua-code-review.web.app']]
97
});

apps/host/webpack.prod.config.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
const { withModuleFederation } = require('@nrwl/angular/module-federation');
1+
const { withModuleFederation } = require('@nx/angular/module-federation');
22
const config = require('./module-federation.config');
33

44
module.exports = withModuleFederation({
5-
...config,
6-
remotes: [
7-
['code-review', 'https://acua-code-review.web.app']
8-
]
5+
...config,
6+
remotes: [['code-review', 'https://acua-code-review.web.app']]
97
});

jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getJestProjects } from '@nrwl/jest';
1+
import { getJestProjects } from '@nx/jest';
22

33
export default {
44
projects: getJestProjects()

jest.preset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const nxPreset = require('@nrwl/jest/preset').default;
1+
const nxPreset = require('@nx/jest/preset').default;
22

33
module.exports = {
44
...nxPreset,

libs/assets/project.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"projectType": "library",
66
"targets": {
77
"lint": {
8-
"executor": "@nrwl/linter:eslint",
8+
"executor": "@nx/linter:eslint",
99
"outputs": ["{options.outputFile}"],
1010
"options": {
1111
"lintFilePatterns": ["libs/assets/**/*.ts"]
1212
}
1313
},
1414
"test": {
15-
"executor": "@nrwl/jest:jest",
15+
"executor": "@nx/jest:jest",
1616
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
1717
"options": {
1818
"jestConfig": "libs/assets/jest.config.ts",

libs/shared/project.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"prefix": "acua",
77
"targets": {
88
"test": {
9-
"executor": "@nrwl/jest:jest",
9+
"executor": "@nx/jest:jest",
1010
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
1111
"options": {
1212
"jestConfig": "libs/shared/jest.config.ts",
@@ -20,12 +20,10 @@
2020
}
2121
},
2222
"lint": {
23-
"executor": "@nrwl/linter:eslint",
23+
"executor": "@nx/linter:eslint",
2424
"outputs": ["{options.outputFile}"],
2525
"options": {
26-
"lintFilePatterns": [
27-
"libs/shared/**/*.ts"
28-
]
26+
"lintFilePatterns": ["libs/shared/**/*.ts"]
2927
}
3028
}
3129
},

nx.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"tasksRunnerOptions": {
88
"default": {
9-
"runner": "@nrwl/nx-cloud",
9+
"runner": "nx-cloud",
1010
"options": {
1111
"cacheableOperations": ["build", "lint", "test", "e2e"],
1212
"accessToken": "ZmY0M2Y4MzEtYTZlNS00ZWY0LWE1OTUtMWQxZWNlNjg4OWY2fHJlYWQtd3JpdGU="
@@ -25,22 +25,22 @@
2525
}
2626
},
2727
"generators": {
28-
"@nrwl/angular:application": {
28+
"@nx/angular:application": {
2929
"style": "scss",
3030
"linter": "eslint",
3131
"unitTestRunner": "jest",
3232
"e2eTestRunner": "cypress"
3333
},
34-
"@nrwl/angular:library": {
34+
"@nx/angular:library": {
3535
"linter": "eslint",
3636
"unitTestRunner": "jest"
3737
},
38-
"@nrwl/angular:component": {
38+
"@nx/angular:component": {
3939
"style": "scss",
4040
"changeDetection": "OnPush",
4141
"skipTests": true
4242
},
43-
"@nrwl/angular:scam-pipe": {
43+
"@nx/angular:scam-pipe": {
4444
"skipTests": true
4545
}
4646
}

0 commit comments

Comments
 (0)