Skip to content

Commit 8a130c8

Browse files
authored
fix: support angular@21 (#401)
* fix: upgrade demo site * test: add angular 21 fixture * test: add case for angular 21 * test: add pretest command for angular 21 fixture * fix: add new signature for angular 21 * test: add netlify toml to angular 21 fixture * test: install plugin in fixture directory * ci: update timeout for windows runner
1 parent 6359999 commit 8a130c8

37 files changed

+13000
-1530
lines changed

.github/workflows/failure-notifier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id: wait
2222
uses: smartcontractkit/chainlink-github-actions/utils/wait-for-workflows@5a7543e418aa2dc57b75e85581eae30820a8c9ae
2323
with:
24-
max-timeout: '900'
24+
max-timeout: '1200'
2525
polling-interval: '30'
2626
github-token: ${{ secrets.GITHUB_TOKEN }}
2727
notify-on-failure:

demo/package-lock.json

Lines changed: 2570 additions & 1508 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
},
1212
"private": true,
1313
"dependencies": {
14-
"@angular/animations": "^20.2.0-next",
15-
"@angular/common": "^20.2.0-next",
16-
"@angular/compiler": "^20.2.0-next",
17-
"@angular/core": "^20.2.0-next",
18-
"@angular/forms": "^20.2.0-next",
19-
"@angular/platform-browser": "^20.2.0-next",
20-
"@angular/platform-browser-dynamic": "^20.2.0-next",
21-
"@angular/platform-server": "^20.2.0-next",
22-
"@angular/router": "^20.2.0-next",
23-
"@angular/ssr": "^20.3.6",
14+
"@angular/animations": "^21.0.0-rc.1",
15+
"@angular/common": "^21.0.0-rc.1",
16+
"@angular/compiler": "^21.0.0-rc.1",
17+
"@angular/core": "^21.0.0-rc.1",
18+
"@angular/forms": "^21.0.0-rc.1",
19+
"@angular/platform-browser": "^21.0.0-rc.1",
20+
"@angular/platform-browser-dynamic": "^21.0.0-rc.1",
21+
"@angular/platform-server": "^21.0.0-rc.1",
22+
"@angular/router": "^21.0.0-rc.1",
23+
"@angular/ssr": "^21.0.0-rc.1",
2424
"@netlify/angular-runtime": "file:..",
2525
"@netlify/edge-functions": "^3.0.2",
2626
"express": "^4.21.0",
@@ -29,9 +29,9 @@
2929
"zone.js": "~0.15.0"
3030
},
3131
"devDependencies": {
32-
"@angular/build": "^20.2.0-next",
33-
"@angular/cli": "^20.2.0-next",
34-
"@angular/compiler-cli": "^20.2.0-next",
32+
"@angular/build": "^21.0.0-rc.1",
33+
"@angular/cli": "^21.0.0-rc.1",
34+
"@angular/compiler-cli": "^21.0.0-rc.1",
3535
"@types/express": "^4.17.21",
3636
"@types/jasmine": "~5.1.0",
3737
"@types/node": "^22.0.0",
@@ -41,6 +41,6 @@
4141
"karma-coverage": "~2.2.0",
4242
"karma-jasmine": "~5.1.0",
4343
"karma-jasmine-html-reporter": "~2.1.0",
44-
"typescript": "~5.8.3"
44+
"typescript": "~5.9.3"
4545
}
4646
}

demo/src/main.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { provideZoneChangeDetection } from "@angular/core";
12
import { bootstrapApplication, type BootstrapContext } from '@angular/platform-browser';
23
import { AppComponent } from './app/app.component';
34
import { config } from './app/app.config.server';
45

5-
const bootstrap = (context?: BootstrapContext) => bootstrapApplication(AppComponent, config, context);
6+
const bootstrap = (context?: BootstrapContext) => bootstrapApplication(AppComponent, {...config, providers: [provideZoneChangeDetection(), ...config.providers]}, context);
67

78
export default bootstrap;

demo/src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { provideZoneChangeDetection } from "@angular/core";
12
import { bootstrapApplication } from '@angular/platform-browser';
23
import { appConfig } from './app/app.config';
34
import { AppComponent } from './app/app.component';
45

5-
bootstrapApplication(AppComponent, appConfig)
6+
bootstrapApplication(AppComponent, {...appConfig, providers: [provideZoneChangeDetection(), ...appConfig.providers]})
67
.catch((err) => console.error(err));

demo/tsconfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
"importHelpers": true,
1818
"target": "ES2022",
1919
"module": "ES2022",
20-
"useDefineForClassFields": false,
21-
"lib": [
22-
"ES2022",
23-
"dom"
24-
]
20+
"useDefineForClassFields": false
2521
},
2622
"angularCompilerOptions": {
2723
"enableI18nLegacyMessageIdFormat": false,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"pretest:fixtures:angular-19-prerender-false": "cd tests/fixtures/angular-19-prerender-false && npm ci",
6363
"pretest:fixtures:angular-20": "semver -r \"<20.19\" \"$(node -v)\" && echo \"Skipping on not supported node version (needed: >=20.19, got: $(node -v))\" || (cd tests/fixtures/angular-20 && npm ci)",
6464
"pretest:fixtures:angular-20-zoneless": "semver -r \"<20.19\" \"$(node -v)\" && echo \"Skipping on not supported node version (needed: >=20.19, got: $(node -v))\" || (cd tests/fixtures/angular-20-zoneless && npm ci)",
65+
"pretest:fixtures:angular-21": "semver -r \"<20.19\" \"$(node -v)\" && echo \"Skipping on not supported node version (needed: >=20.19, got: $(node -v))\" || (cd tests/fixtures/angular-21 && npm ci)",
6566
"pretest:fixtures:nx-angular-19-common-engine": "cd tests/fixtures/nx-angular-19-common-engine && npm ci",
6667
"pretest:fixtures:nx-angular-19-app-engine": "cd tests/fixtures/nx-angular-19-app-engine && npm ci",
6768
"pretest": "run-s pretest:*",

src/helpers/knownServerTsSignatures.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"140c0a0b4a8b648378d53630bee6bef9c3418daf27b372f50c06ab83c9d84a39": "CommonEngine",
99
"76419eb94b4b8672ba3bd79d34c5a66c7c30ff173995ecc6e0adc5808b86822d": "AppEngine",
1010
"8fc83d8961c0a74b52e2dc90f8f6bc21a6948ca35fda4b83ff063ae441d42c11": "AppEngine",
11+
"f69b5803d75aecad08bac73a3d2d5ac6383ae827bccdfbaa018f59aa0a14c2e6": "AppEngine",
1112
"a5aad843a116e34ce61264117cba981cff5eea3e6672815a4db08e7b4e5599d6": "AppEngine",
1213
"5e0de282eb33582f8ec4c3da2946762d4c95794cb749cfb589407f4d4a0115a7": "AppEngine"
1314
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
__screenshots__/
40+
41+
# System files
42+
.DS_Store
43+
Thumbs.db

0 commit comments

Comments
 (0)