FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: support angular@20 by pieh · Pull Request #292 · netlify/angular-runtime · GitHub

This repository was archived by the owner on Jul 17, 2026. It is now read-only.
/ angular-runtime Public archive

feat: support angular@20 - #292

Merged
pieh merged 26 commits into
mainfrom
chore/try-20
May 27, 2025
Merged

feat: support angular@20#292
pieh merged 26 commits into
mainfrom
chore/try-20

Conversation

pieh commented Apr 11, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

Adjustments for Angular@20:

  • newly scaffolded Angular@20 project don't explicitly define outputPath which we rely on, so this adds default fallback for this case (dist/<project-name>) to make it as easy as possible to use Angular@20 on Netlify
  • Adding test fixtures and upgrading demo to use 20 (note that Angular@20 requires node@>=20.11 so I'm skipping tests and test setups below that version - we do have node 20 in test matrix version so we run tests against them. Additionally I do add node@22 to matrix to be have tests on current default)
  • don't suggest Common Engine with Angular@20 (it still works, but App Engine is much better overall, supporting way more features and integrates with dev server and it's no longer Developer Preview/experimental)

github-actions Bot added the type: chore work needed to keep the product and development running smoothly label Apr 11, 2025

netlify Bot commented Apr 11, 2025
edited
Loading

Copy link
Copy Markdown

Deploy Preview for plugin-angular-universal-demo ready!

Name Link
🔨 Latest commit 22d7905
🔍 Latest deploy log https://app.netlify.com/projects/plugin-angular-universal-demo/deploys/6835d1b3527f33000891fe07
😎 Deploy Preview https://deploy-preview-292--plugin-angular-universal-demo.netlify.app
📱 Preview on mobile Toggle QR Code...



Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.


const serverConfig: ApplicationConfig = {
providers: [provideServerRendering(), provideServerRoutesConfig(serverRoutes)],
providers: [provideServerRendering(withRoutes(serverRoutes))],

pieh Apr 11, 2025
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This had to be migrated manually (checked how newly scaffolded project with npx @angular/cli@next new sets things up) as ng update @angular/cli @angular/core --next didn't cover it (initially it resulted in trying to import no longer existing provideServerRoutesConfig function)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should this be called out somewhere that shows up in release notes? This might be relevant to folks upgrading, is that right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can also ask the Angular team if this is expected to not be handled

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'll check if migration handles that now (this comment was done very early on before there was any rc yet, so maybe something changed) but if it didn't change I'll check with Angular team

pieh May 21, 2025
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

So this still happens (diff is what automatic migration with npx @angular/cli@next update @angular/cli @angular/core --next does):

And I also don't see a mention of it yet on https://next.angular.dev/update-guide?v=19.0-20.0&l=3 so I'll ask about this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

update:
Angular 19.1 "renamed" provideServerRoutesConfig to provideServerRouting (keeping previous one for backward compat) so it was somewhat quirk of us scaffolding / migrating really early on

There is currently migration for renamed one, but not for "original" one and angular/angular-cli#30359 is looking to address this

So this will be handled automatically soon

pieh commented Apr 11, 2025

Copy link
Copy Markdown
Contributor Author

Note - test on Node 18 fail because it's unsupported with Angular 20:

$ npm run build

> demo@0.0.0 build
> ng build --verbose

Node.js version v18.19.0 detected.
The Angular CLI requires a minimum Node.js version of v20.11.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

Test setup would need adjustment to skip tests using Angular 20 when on not supported Node version to continue testing previous Angular major versions (or maybe drop testing this node version as it's no longer maintained anyway)

Comment thread .github/workflows/test.yml Outdated
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [18.19.0, 20.13.1]
node-version: [18.19.1, 20.13.1]

pieh May 20, 2025
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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)

pieh changed the title test: try 20-next feat: support angular@20 May 20, 2025
pieh marked this pull request as ready for review May 20, 2025 10:21
pieh requested a review from a team as a code owner May 20, 2025 10:21
github-actions Bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 20, 2025
serhalp previously approved these changes May 20, 2025

serhalp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Comment thread demo/.nvmrc Outdated

const serverConfig: ApplicationConfig = {
providers: [provideServerRendering(), provideServerRoutesConfig(serverRoutes)],
providers: [provideServerRendering(withRoutes(serverRoutes))],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Should this be called out somewhere that shows up in release notes? This might be relevant to folks upgrading, is that right?


const serverConfig: ApplicationConfig = {
providers: [provideServerRendering(), provideServerRoutesConfig(serverRoutes)],
providers: [provideServerRendering(withRoutes(serverRoutes))],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can also ask the Angular team if this is expected to not be handled

Comment on lines +66 to +77
let { outputPath } = workspaceType === 'nx' ? project.targets.build.options : project.architect.build.options

if (!outputPath && workspaceType === 'default') {
// outputPath might not be explicitly defined in angular.json
// so we will try default which is dist/<project-name>
outputPath = join('dist', projectName)
}

const isApplicationBuilder =
workspaceType === 'nx'
? project.targets.build.executor.endsWith(':application')
: project.architect.build.builder.endsWith(':application')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: do project.targets.build and project.architect.build have the exact same shape? if so, we could do the nx check only one and hold the build object in a variable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

They don't: build.executor vs build.builder in here.

This code was overall already there before this PR when it was introduced in https://github.com/netlify/angular-runtime/pull/263/files#diff-76ddf06bdc3bb03e611fc684812e5455f0c7bc846aae658cc44f8785a747f6ecL12-R24 - I just moved it because extracting projectName needed for fallback case was messy otherwise

pieh commented May 21, 2025

Copy link
Copy Markdown
Contributor Author

angular/angular-cli@d06ff3f there will be bump of min node from 20.11 to 20.19 released soon so adjusting checks / node version for test runner in 9463872

pieh merged commit c204c08 into main May 27, 2025
pieh deleted the chore/try-20 branch May 27, 2025 15:10
serhalp pushed a commit to netlify/framework-adapters that referenced this pull request Jul 3, 2026
* test: upgrade demo to 20-next

* chore(demo): ensure min supported node version

* chore: manual migration of app.config.server.ts

* chore: bump

* chore: bump to rc.0

* chore: bump to newest rc

* test: add 20-rc fixtures

* fix: add angular-20 server.ts signature

* fix: handle case of outputPath not being explicitly defined

* chore: remove outputPath from demo's angular.json to follow newly scaffolded projects setup

* fix: nx handling

* test: install new fixtures deps

* chore: skip angular@20 on not supported node versions

* chore: bump node18 version a bit to match node18 compatible angular min node version

* chore: add node22 to test matrix

* chore: don't suggest common engine for Angular 20

* docs: refresh readme for Angular 20

* chore: bump min to 20.19

* fix: add link to repo readme for more details

* chore: upgrade demo and recreate angular-20 fixtures using most recent versions

* chore: sync lock files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: chore work needed to keep the product and development running smoothly type: feature code contributing to the implementation of a feature and/or user facing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL