Skip to content

Commit dd04197

Browse files
authored
Merge pull request #1298 from AlDrag/development
feat(Angular): update to v21
2 parents 3aeaa06 + c48c8a2 commit dd04197

7 files changed

Lines changed: 11465 additions & 8134 deletions

File tree

apps/demo/src/app/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import { SimpleDemoComponent } from './components/file-upload/simple-demo';
1313
@NgModule({
1414
imports: [BrowserModule, CommonModule, FileUploadModule, TabsModule.forRoot(), FormsModule],
1515
declarations: [AppComponent, FileUploadSectionComponent, SimpleDemoComponent],
16-
bootstrap: [AppComponent]
16+
bootstrap: [AppComponent],
17+
providers: []
1718
})
1819
export class AppModule {
1920
}

libs/ng2-file-upload/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"author": "Dmitriy Shekhovtsov <valorkin@gmail.com>",
66
"license": "MIT",
77
"peerDependencies": {
8-
"@angular/core": "^20.0.0",
9-
"@angular/common": "^20.0.0"
8+
"@angular/core": "^21.x.x",
9+
"@angular/common": "^21.x.x"
1010
},
1111
"sideEffects": false,
1212
"publishConfig": {

libs/ng2-file-upload/testing/spec/file-drop.directive.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { FileDropDirective } from '../../file-upload/file-drop.directive';
1111
template: `<div type="file"
1212
ng2FileDrop
1313
[uploader]="uploader"
14-
></div>`
14+
></div>`,
15+
standalone: false,
1516
})
1617
export class ContainerComponent {
1718
public get url(): string { return 'localhost:3000'; }

libs/ng2-file-upload/testing/spec/file-select.directive.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { FileUploader } from '../../file-upload/file-uploader.class';
1111
template: `<input type="file"
1212
ng2FileSelect
1313
[uploader]="uploader"
14-
/>`
14+
/>`,
15+
standalone: false,
1516
})
1617
export class ContainerComponent {
1718
public get url(): string { return 'localhost:3000'; }

migrations.json

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
{
2+
"migrations": [
3+
{
4+
"version": "22.0.0-beta.1",
5+
"description": "Updates release version config based on the breaking changes in Nx v22",
6+
"implementation": "./src/migrations/update-22-0-0/release-version-config-changes",
7+
"package": "nx",
8+
"name": "22-0-0-release-version-config-changes"
9+
},
10+
{
11+
"version": "22.0.0-beta.2",
12+
"description": "Consolidates releaseTag* options into nested releaseTag object structure",
13+
"implementation": "./src/migrations/update-22-0-0/consolidate-release-tag-config",
14+
"package": "nx",
15+
"name": "22-0-0-consolidate-release-tag-config"
16+
},
17+
{
18+
"cli": "nx",
19+
"version": "22.1.0-beta.5",
20+
"description": "Updates the nx wrapper.",
21+
"implementation": "./src/migrations/update-22-1-0/update-nx-wrapper",
22+
"package": "nx",
23+
"name": "22-1-0-update-nx-wrapper"
24+
},
25+
{
26+
"cli": "nx",
27+
"version": "21.3.0-beta.4",
28+
"requires": {
29+
"@angular/core": ">=20.1.0"
30+
},
31+
"description": "Update the @angular/cli package version to ~20.1.0.",
32+
"factory": "./src/migrations/update-21-3-0/update-angular-cli",
33+
"package": "@nx/angular",
34+
"name": "update-angular-cli-version-20-1-0"
35+
},
36+
{
37+
"version": "21.5.0-beta.0",
38+
"description": "Set the 'tsConfig' option to build and test targets to help with Angular migration issues.",
39+
"factory": "./src/migrations/update-21-5-0/set-tsconfig-option",
40+
"package": "@nx/angular",
41+
"name": "set-tsconfig-option"
42+
},
43+
{
44+
"cli": "nx",
45+
"version": "21.5.0-beta.2",
46+
"requires": {
47+
"@angular/core": ">=20.2.0"
48+
},
49+
"description": "Update the @angular/cli package version to ~20.2.0.",
50+
"factory": "./src/migrations/update-21-5-0/update-angular-cli",
51+
"package": "@nx/angular",
52+
"name": "update-angular-cli-version-20-2-0"
53+
},
54+
{
55+
"version": "21.5.0-beta.2",
56+
"requires": {
57+
"@angular/core": ">=20.2.0"
58+
},
59+
"description": "Remove any Karma configuration files that only contain the default content. The default configuration is automatically available without a specific project configurationfile.",
60+
"factory": "./src/migrations/update-21-5-0/remove-default-karma-configuration-files",
61+
"package": "@nx/angular",
62+
"name": "remove-default-karma-configuration-files"
63+
},
64+
{
65+
"cli": "nx",
66+
"version": "21.6.1-beta.2",
67+
"requires": {
68+
"@angular/core": ">=20.3.0"
69+
},
70+
"description": "Update the @angular/cli package version to ~20.3.0.",
71+
"factory": "./src/migrations/update-21-6-1/update-angular-cli",
72+
"package": "@nx/angular",
73+
"name": "update-angular-cli-version-20-3-0"
74+
},
75+
{
76+
"version": "22.3.0-beta.0",
77+
"requires": {
78+
"@angular/core": ">=21.0.0"
79+
},
80+
"description": "Updates webpack-based SSR configuration to use preserve module format and bundler module resolution.",
81+
"factory": "./src/migrations/update-22-3-0/update-ssr-webpack-config",
82+
"package": "@nx/angular",
83+
"name": "update-ssr-webpack-config-22-2-0"
84+
},
85+
{
86+
"version": "22.3.0-beta.0",
87+
"requires": {
88+
"@angular/core": ">=21.0.0-rc.3"
89+
},
90+
"description": "Update 'module' to 'preserve' and 'moduleResolution' to 'bundler' in TypeScript configurations for Angular projects.",
91+
"factory": "./src/migrations/update-22-3-0/update-module-resolution",
92+
"package": "@nx/angular",
93+
"name": "update-module-resolution-22-2-0"
94+
},
95+
{
96+
"version": "22.3.0-beta.0",
97+
"requires": {
98+
"@angular/core": ">=21.0.0"
99+
},
100+
"description": "Updates the 'lib' property in tsconfig files to use 'es2022' or a more modern version.",
101+
"factory": "./src/migrations/update-22-3-0/update-typescript-lib",
102+
"package": "@nx/angular",
103+
"name": "update-typescript-lib-22-2-0"
104+
},
105+
{
106+
"version": "22.3.0-beta.0",
107+
"requires": {
108+
"@angular/core": ">=21.0.0"
109+
},
110+
"description": "Update 'vitest' unit test runner option to 'vitest-analog' in generator defaults.",
111+
"factory": "./src/migrations/update-22-3-0/update-unit-test-runner-option",
112+
"package": "@nx/angular",
113+
"name": "update-unit-test-runner-option"
114+
},
115+
{
116+
"version": "22.3.0-beta.3",
117+
"requires": {
118+
"@angular/core": ">=21.0.0"
119+
},
120+
"description": "Set 'isolatedModules' to 'true' in TypeScript test configurations for Angular projects.",
121+
"factory": "./src/migrations/update-22-3-0/set-isolated-modules",
122+
"package": "@nx/angular",
123+
"name": "set-isolated-modules-22-3-0"
124+
},
125+
{
126+
"version": "22.3.0-beta.3",
127+
"requires": {
128+
"@angular/core": ">=21.0.0"
129+
},
130+
"description": "Replace 'jest-preset-angular/setup-jest' imports with the new 'setupZoneTestEnv' function.",
131+
"factory": "./src/migrations/update-22-3-0/update-jest-preset-angular-setup",
132+
"package": "@nx/angular",
133+
"name": "update-jest-preset-angular-setup"
134+
},
135+
{
136+
"version": "21.3.0-beta.3",
137+
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.",
138+
"implementation": "./src/migrations/update-21-3-0/rename-test-path-pattern",
139+
"package": "@nx/jest",
140+
"name": "rename-test-path-pattern"
141+
},
142+
{
143+
"version": "21.3.0-beta.3",
144+
"requires": {
145+
"jest": ">=30.0.0"
146+
},
147+
"description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher",
148+
"implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases",
149+
"package": "@nx/jest",
150+
"name": "replace-removed-matcher-aliases"
151+
},
152+
{
153+
"version": "22.2.0-beta.2",
154+
"description": "Convert jest.config.ts files from ESM to CJS syntax (export default -> module.exports, import -> require) for projects using CommonJS resolution to ensure correct loading under Node.js type-stripping.",
155+
"implementation": "./src/migrations/update-22-2-0/convert-jest-config-to-cjs",
156+
"package": "@nx/jest",
157+
"name": "convert-jest-config-to-cjs"
158+
},
159+
{
160+
"version": "22.3.2-beta.0",
161+
"requires": {
162+
"jest": ">=30.0.0"
163+
},
164+
"description": "Replace removed matcher aliases in Jest v30 with their corresponding matcher",
165+
"implementation": "./src/migrations/update-21-3-0/replace-removed-matcher-aliases",
166+
"package": "@nx/jest",
167+
"name": "replace-removed-matcher-aliases-v22-3"
168+
},
169+
{
170+
"version": "21.0.0",
171+
"description": "Converts the entire application to block control flow syntax",
172+
"factory": "./bundles/control-flow-migration.cjs#migrate",
173+
"package": "@angular/core",
174+
"name": "control-flow-migration"
175+
},
176+
{
177+
"version": "21.0.0",
178+
"description": "Replaces usages of the deprecated Router.getCurrentNavigation method with the Router.currentNavigation signal",
179+
"factory": "./bundles/router-current-navigation.cjs#migrate",
180+
"optional": true,
181+
"package": "@angular/core",
182+
"name": "router-current-navigation"
183+
},
184+
{
185+
"version": "21.0.0",
186+
"description": "Ensures that the Router.lastSuccessfulNavigation signal is now invoked",
187+
"factory": "./bundles/router-last-successful-navigation.cjs#migrate",
188+
"package": "@angular/core",
189+
"name": "router-last-successful-navigation"
190+
},
191+
{
192+
"version": "21.0.0",
193+
"description": "Moves imports of `ApplicationConfig` from `@angular/platform-browser` to `@angular/core`",
194+
"factory": "./bundles/application-config-core.cjs#migrate",
195+
"package": "@angular/core",
196+
"name": "application-config-core"
197+
},
198+
{
199+
"version": "21.0.0",
200+
"description": "Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.",
201+
"factory": "./bundles/add-bootstrap-context-to-server-main.cjs#migrate",
202+
"package": "@angular/core",
203+
"name": "add-bootstrap-context-to-server-main"
204+
},
205+
{
206+
"version": "21.0.0",
207+
"description": "Migrates deprecated bootstrap options to providers.",
208+
"factory": "./bundles/bootstrap-options-migration.cjs#migrate",
209+
"package": "@angular/core",
210+
"name": "bootstrap-options-migration"
211+
}
212+
]
213+
}

0 commit comments

Comments
 (0)