Skip to content

feat: support angular@20 #292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d1eb0de
test: upgrade demo to 20-next
pieh Apr 11, 2025
a8de33c
chore(demo): ensure min supported node version
pieh Apr 11, 2025
d023e2a
chore: manual migration of app.config.server.ts
pieh Apr 11, 2025
074bc3c
Merge remote-tracking branch 'origin/main' into chore/try-20
pieh Apr 18, 2025
f931f0b
chore: bump
pieh Apr 18, 2025
498862f
chore: bump to rc.0
pieh May 13, 2025
b3f6f44
Merge remote-tracking branch 'origin/main' into chore/try-20
pieh May 13, 2025
353e63a
chore: bump to newest rc
pieh May 20, 2025
32181e1
Merge remote-tracking branch 'origin/main' into chore/try-20
pieh May 20, 2025
c98527c
test: add 20-rc fixtures
pieh May 20, 2025
d308467
fix: add angular-20 server.ts signature
pieh May 20, 2025
9f2ffc7
fix: handle case of outputPath not being explicitly defined
pieh May 20, 2025
7fb6080
chore: remove outputPath from demo's angular.json to follow newly sca…
pieh May 20, 2025
0c284ee
fix: nx handling
pieh May 20, 2025
1f18438
test: install new fixtures deps
pieh May 20, 2025
c7cdd32
chore: skip angular@20 on not supported node versions
pieh May 20, 2025
581d156
chore: bump node18 version a bit to match node18 compatible angular m…
pieh May 20, 2025
23ebfa0
chore: add node22 to test matrix
pieh May 20, 2025
2e80a23
chore: don't suggest common engine for Angular 20
pieh May 20, 2025
9a50e78
docs: refresh readme for Angular 20
pieh May 20, 2025
9463872
chore: bump min to 20.19
pieh May 21, 2025
dea254f
fix: add link to repo readme for more details
pieh May 22, 2025
e154ae0
chore: upgrade demo and recreate angular-20 fixtures using most recen…
pieh May 23, 2025
189b651
Merge remote-tracking branch 'origin/main' into chore/try-20
pieh May 23, 2025
f650742
chore: sync lock files
pieh May 23, 2025
22d7905
Merge branch 'main' into chore/try-20
pieh May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [18.19.0, 20.13.1]
node-version: [18.19.1, 20.13.1]
Copy link
Contributor Author

@pieh pieh May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://github.com/netlify/angular-runtime/actions/runs/15134325612/job/42542439173#step:6:1422 - this is just to get rid of that warning for pre-angular-20 fixtures (it requires adjustment to required checks)

exclude:
- os: macOS-latest
node-version: 18.19.0
node-version: 18.19.1
- os: windows-latest
node-version: 18.19.0
node-version: 18.19.1
fail-fast: false

steps:
Expand Down
37 changes: 23 additions & 14 deletions demo.test.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
import assert from 'node:assert'
import { versions } from 'node:process'
import { test } from 'node:test'

test('edge function config', async () => {
const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs')
import { satisfies } from 'semver'

const excludedPathsWithMaskedHashes = config.excludedPath.map((path) => path.replace(/-[A-Z\d]{8}\./, '-HASHHASH.'))
test(
'edge function config',
{
skip: !satisfies(versions.node, '>=20.11'),
},
async () => {
const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs')

assert.deepEqual(excludedPathsWithMaskedHashes, [
'/.netlify/*',
'/favicon.ico',
'/heroes/index.html',
'/index.csr.html',
'/main-HASHHASH.js',
'/polyfills-HASHHASH.js',
'/styles-HASHHASH.css',
'/heroes',
])
})
const excludedPathsWithMaskedHashes = config.excludedPath.map((path) => path.replace(/-[A-Z\d]{8}\./, '-HASHHASH.'))

assert.deepEqual(excludedPathsWithMaskedHashes, [
'/.netlify/*',
'/favicon.ico',
'/heroes/index.html',
'/index.csr.html',
'/main-HASHHASH.js',
'/polyfills-HASHHASH.js',
'/styles-HASHHASH.css',
'/heroes',
])
},
)
1 change: 1 addition & 0 deletions demo/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11
35 changes: 30 additions & 5 deletions demo/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular/build:application",
"options": {
"outputPath": "dist/demo",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
Expand Down Expand Up @@ -59,7 +58,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "demo:build:production"
Expand All @@ -71,13 +70,13 @@
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@angular/build:extract-i18n",
"options": {
"buildTarget": "demo:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular/build:karma",
"options": {
"polyfills": [
"zone.js",
Expand All @@ -99,5 +98,31 @@
},
"cli": {
"analytics": false
},
"schematics": {
"@schematics/angular:component": {
"type": "component"
},
"@schematics/angular:directive": {
"type": "directive"
},
"@schematics/angular:service": {
"type": "service"
},
"@schematics/angular:guard": {
"typeSeparator": "."
},
"@schematics/angular:interceptor": {
"typeSeparator": "."
},
"@schematics/angular:module": {
"typeSeparator": "."
},
"@schematics/angular:pipe": {
"typeSeparator": "."
},
"@schematics/angular:resolver": {
"typeSeparator": "."
}
}
}
Loading