Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a38615

Browse files
Chau TranChau Tran
Chau Tran
authored and
Chau Tran
committed
chore: upgrade nx and angular
1 parent 3c9d513 commit 0a38615

File tree

5 files changed

+1982
-3154
lines changed

5 files changed

+1982
-3154
lines changed

apps/example/src/app/app.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { ApplicationConfig } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
4+
export const appConfig: ApplicationConfig = {
5+
providers: [
6+
provideRouter(
7+
[
8+
{
9+
path: '',
10+
redirectTo: 'routed',
11+
pathMatch: 'full',
12+
},
13+
{
14+
path: 'routed',
15+
loadComponent: () => import('./scene/scene.component'),
16+
loadChildren: () => import('./scene/scene.routes'),
17+
},
18+
]
19+
// withDebugTracing()
20+
),
21+
],
22+
};

apps/example/src/main.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
11
import { bootstrapApplication } from '@angular/platform-browser';
2-
import { provideRouter } from '@angular/router';
32
import { AppComponent } from './app/app.component';
3+
import { appConfig } from './app/app.config';
44

5-
bootstrapApplication(AppComponent, {
6-
providers: [
7-
provideRouter(
8-
[
9-
{
10-
path: '',
11-
redirectTo: 'routed',
12-
pathMatch: 'full',
13-
},
14-
{
15-
path: 'routed',
16-
loadComponent: () => import('./app/scene/scene.component'),
17-
loadChildren: () => import('./app/scene/scene.routes'),
18-
},
19-
]
20-
// withDebugTracing()
21-
),
22-
],
23-
}).catch((err) => console.error(err));
5+
bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));

migrations.json

Lines changed: 78 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,80 @@
11
{
2-
"migrations": [
3-
{
4-
"cli": "nx",
5-
"version": "16.0.0-beta.0",
6-
"description": "Remove @nrwl/cli.",
7-
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
8-
"package": "nx",
9-
"name": "16.0.0-remove-nrwl-cli"
10-
},
11-
{
12-
"cli": "nx",
13-
"version": "16.0.0-beta.9",
14-
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
15-
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
16-
"package": "nx",
17-
"name": "16.0.0-tokens-for-depends-on"
18-
},
19-
{
20-
"cli": "nx",
21-
"version": "16.0.0-beta.0",
22-
"description": "Replace @nrwl/nx-cloud with nx-cloud",
23-
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
24-
"package": "nx",
25-
"name": "16.0.0-update-nx-cloud-runner"
26-
},
27-
{
28-
"cli": "nx",
29-
"version": "16.0.0-beta.1",
30-
"description": "Replace @nx/devkit with @nx/devkit",
31-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
32-
"package": "@nx/devkit",
33-
"name": "update-16-0-0-add-nx-packages"
34-
},
35-
{
36-
"cli": "nx",
37-
"version": "16.0.0-beta.1",
38-
"description": "Replace @nx/workspace with @nx/workspace",
39-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
40-
"package": "@nx/workspace",
41-
"name": "update-16-0-0-add-nx-packages"
42-
},
43-
{
44-
"version": "16.0.0-beta.4",
45-
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
46-
"cli": "nx",
47-
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
48-
"package": "@nx/workspace",
49-
"name": "16-0-0-move-workspace-generators-into-local-plugin"
50-
},
51-
{
52-
"version": "16.0.0-beta.9",
53-
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
54-
"cli": "nx",
55-
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
56-
"package": "@nx/workspace",
57-
"name": "16-0-0-fix-invalid-babelrc"
58-
},
59-
{
60-
"cli": "nx",
61-
"version": "16.0.0-beta.1",
62-
"description": "Replace @nx/js with @nx/js",
63-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
64-
"package": "@nx/js",
65-
"name": "update-16-0-0-add-nx-packages"
66-
},
67-
{
68-
"cli": "nx",
69-
"version": "16.0.0-beta.1",
70-
"description": "Replace @nx/linter with @nx/linter",
71-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
72-
"package": "@nx/linter",
73-
"name": "update-16-0-0-add-nx-packages"
74-
},
75-
{
76-
"cli": "nx",
77-
"version": "16.0.0-beta.1",
78-
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
79-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
80-
"package": "@nx/eslint-plugin",
81-
"name": "update-16-0-0-add-nx-packages"
82-
},
83-
{
84-
"cli": "nx",
85-
"version": "16.0.0-beta.1",
86-
"description": "Replace @nx/jest with @nx/jest",
87-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
88-
"package": "@nx/jest",
89-
"name": "update-16-0-0-add-nx-packages"
90-
},
91-
{
92-
"version": "16.0.0-beta.1",
93-
"cli": "nx",
94-
"description": "Removes CLI property within schema.json files and moves generators and schematics to the proper root node in migrations.json",
95-
"factory": "./src/migrations/update-16-0-0/cli-in-schema-json",
96-
"package": "@nx/plugin",
97-
"name": "update-remove-cli-prop"
98-
},
99-
{
100-
"cli": "nx",
101-
"version": "16.0.0-beta.1",
102-
"description": "Replace @nx/plugin with @nx/plugin",
103-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
104-
"package": "@nx/plugin",
105-
"name": "update-16-0-0-add-nx-packages"
106-
},
107-
{
108-
"cli": "nx",
109-
"version": "16.0.0-beta.1",
110-
"description": "Replace the deprecated library generator 'simpleModuleName' option from generator defaults with 'simpleName'",
111-
"factory": "./src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option",
112-
"package": "@nx/angular",
113-
"name": "remove-library-generator-simple-module-name-option"
114-
},
115-
{
116-
"cli": "nx",
117-
"version": "16.0.0-beta.1",
118-
"description": "Replace @nx/angular with @nx/angular",
119-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
120-
"package": "@nx/angular",
121-
"name": "update-16-0-0-add-nx-packages"
122-
},
123-
{
124-
"cli": "nx",
125-
"version": "16.0.0-beta.6",
126-
"description": "Remove protractor as default e2eTestRunner from nxJson and project configurations",
127-
"implementation": "./src/migrations/update-16-0-0/remove-protractor-defaults",
128-
"package": "@nx/angular",
129-
"name": "remove-protractor-defaults-from-generators"
130-
},
131-
{
132-
"cli": "nx",
133-
"version": "16.0.0-beta.6",
134-
"description": "Remove karma as default unitTestRunner from nxJson and project configurations",
135-
"implementation": "./src/migrations/update-16-0-0/remove-karma-defaults",
136-
"package": "@nx/angular",
137-
"name": "remove-karma-defaults-from-generators"
138-
}
139-
]
2+
"migrations": [
3+
{
4+
"cli": "nx",
5+
"version": "16.1.0-beta.1",
6+
"requires": {
7+
"@angular/core": ">=15.0.0"
8+
},
9+
"description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
10+
"factory": "./src/migrations/update-16-1-0/remove-render-module-platform-server-exports",
11+
"package": "@nx/angular",
12+
"name": "remove-render-module-platform-server-exports"
13+
},
14+
{
15+
"cli": "nx",
16+
"version": "16.1.0-beta.1",
17+
"requires": {
18+
"@angular/core": ">=16.0.0-rc.4"
19+
},
20+
"description": "Remove 'ngcc' invocation if exists from the 'postinstall' script in package.json.",
21+
"factory": "./src/migrations/update-16-1-0/remove-ngcc-invocation",
22+
"package": "@nx/angular",
23+
"name": "remove-ngcc-invocation"
24+
},
25+
{
26+
"cli": "nx",
27+
"version": "16.1.0-beta.1",
28+
"requires": {
29+
"@angular/core": ">=16.0.0-rc.4"
30+
},
31+
"description": "Extract the app config for standalone apps",
32+
"factory": "./src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap",
33+
"package": "@nx/angular",
34+
"name": "extract-app-config-for-standalone"
35+
},
36+
{
37+
"cli": "nx",
38+
"version": "16.1.0-beta.1",
39+
"requires": {
40+
"@angular/core": ">=16.0.0-rc.4"
41+
},
42+
"description": "Update server executors' configuration to disable 'buildOptimizer' for non optimized builds.",
43+
"factory": "./src/migrations/update-16-1-0/update-server-executor-config",
44+
"package": "@nx/angular",
45+
"name": "update-server-executor-config"
46+
},
47+
{
48+
"cli": "nx",
49+
"version": "16.1.0-beta.1",
50+
"requires": {
51+
"@angular/core": ">=16.0.0"
52+
},
53+
"description": "Update the @angular/cli package version to ~16.0.0.",
54+
"factory": "./src/migrations/update-16-1-0/update-angular-cli",
55+
"package": "@nx/angular",
56+
"name": "update-angular-cli-version-16-0-0"
57+
},
58+
{
59+
"version": "16.0.0",
60+
"description": "As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect.",
61+
"factory": "./migrations/remove-module-id/bundle",
62+
"package": "@angular/core",
63+
"name": "migration-v16-remove-module-id"
64+
},
65+
{
66+
"version": "16.0.0",
67+
"description": "In Angular version 15.2, the guard and resolver interfaces (CanActivate, Resolve, etc) were deprecated. This migration removes imports and 'implements' clauses that contain them.",
68+
"factory": "./migrations/guard-and-resolve-interfaces/bundle",
69+
"package": "@angular/core",
70+
"name": "migration-v16-guard-and-resolve-interfaces"
71+
},
72+
{
73+
"version": "16.0.0-0",
74+
"description": "Updates the Angular CDK to v16",
75+
"factory": "./ng-update/index#updateToV16",
76+
"package": "@angular/cdk",
77+
"name": "migration-v16"
78+
}
79+
]
14080
}

0 commit comments

Comments
 (0)