-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nx migration: - bump '@angular/**' packages to version '^19.0.3' - bump '@ng-select/ng-select' to version '^14.1.0' - bump 'angular-oauth2-oidc' to version '19.0.0' - bump 'ngx-infinite-scroll' to version '^19.0.0' - bump 'zone.js' to version '0.15.0' - bump '@angular-devkit/**' libraries to version '^19.0.4' - bump '@angular-eslint/**' libraries to version '19.0.2' - bump '@nx/**' libraries to version '^20.2.2' - bump '@schematics/angular' to version '^19.0.4' - bump 'jest-preset-angular' to version '14.4.2' - bump 'ng-packagr' to version '^19.0.1' - bump 'nx' to version '^20.2.2' - bump '@ngrx/**' libraries to version '^19.0.0' - bump 'typescript' to version '^5.6.3' - bump '@typescript-eslint' to '8.18.1' - bump '@angular-builders/custom-webpack' to version '19.0.0' - add standalone: false to all components, directives and pipes for more, see: angular/angular#57643 - add rule "@angular-eslint/prefer-standalone": "off" in eslint files - remove deprecated "angular-eslint/no-host-metadata-property" for more, see: angular-eslint/angular-eslint#2113 - update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected for more, see: angular/angular-cli#28278 Unit tests issues: - update snapshots - adjust ssr/engine tests to use new required standalone: false property - adjust Jest config for setup/ssr library to use beasties from node_modules instead of the internalized one provided with @angular/ssr due to issues with not supported ES format for more, see: angular/angular-cli#28228 and: angular/angular-cli#28726 Schematics: - refactor `server.ts` to use `dist/server/index.server.html` and adjust schematics - #19878 Migration docs - migration to Angular v19
- Loading branch information
Showing
1,007 changed files
with
10,697 additions
and
5,658 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# (EARLY NOTES) Migrating a custom app to use Spartacus with Angular v18 | ||
|
||
Before upgrading Spartacus to the new version with Angular 18, you need to first: | ||
|
||
- upgrade Spartacus to version 2211.32.1 | ||
- install Node 22 version | ||
- upgrade `@types/node` to version 22 | ||
```bash | ||
npm i @types/node@22 | ||
``` | ||
- upgrade Angular to version v18 and then to v19 | ||
|
||
## Update Angular to 18 and 19 | ||
|
||
### Update Angular to 18 and 3rd party deps to be compatible with Angular 18 | ||
|
||
> **Warning** | ||
> | ||
> Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already support it. | ||
Follow the [Angular guidelines for upgrading from v17 to v18](https://angular.dev/update-guide?v=17.0-18.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 18 (e.g. `@ng-select/ng-select@13`, `@ngrx/store@18`, `ngx-infinite-scroll@18`): | ||
|
||
```bash | ||
ng update @angular/core@18 @angular/cli@18 @ng-select/ng-select@13 @ngrx/store@18 ngx-infinite-scroll@18 --force | ||
git add . | ||
git commit -m "update angular 18 and 3rd party deps angular 18 compatible" | ||
``` | ||
|
||
|
||
### Update Angular to 19 and 3rd party deps to be compatible with Angular 19 | ||
|
||
> **Warning** | ||
> | ||
> Hit SPACE to unselect `use-application-builder` migration when migrating to Angular 19. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already support it. | ||
Follow the [Angular guidelines for upgrading from v18 to v19](https://angular.dev/update-guide?v=18.0-19.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 19 (e.g. `@ng-select/ng-select@14`, `@ngrx/store@19`, `ngx-infinite-scroll@19`): | ||
|
||
```bash | ||
ng update @angular/cli@19 @angular/core@19 ngx-infinite-scroll@19 @ng-select/ng-select@14 @ngrx/store@19 angular-oauth2-oidc@19 --force | ||
git add . | ||
git commit -m "update angular 19 and 3rd party deps angular 19 compatible" | ||
``` | ||
|
||
|
||
|
||
## Run Spartacus update | ||
|
||
After successfully updating the application to Angular 19, execute this command to initiate the Spartacus update process. | ||
|
||
```bash | ||
ng update @spartacus/schematics@latest | ||
``` | ||
|
||
### If using Server Side Rendering (SSR) and `application` builder | ||
|
||
For applications with SSR support that use the Angular's `application` builder (i.e. having in `angular.json` the following value: `... "architect": { "build": { "builder": "@angular-devkit/build-angular:application", ...`), you need to adjust the `server.ts` file to be compatible with the output generated by this builder. | ||
|
||
```diff | ||
/* ... */ | ||
- const indexHtml = join(browserDistFolder, 'index.html'); | ||
+ const indexHtml = join(serverDistFolder, 'index.server.html'); | ||
``` | ||
|
||
|
||
|
||
|
||
|
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
{ | ||
"extends": "../../.eslintrc.json", | ||
"ignorePatterns": ["schematics/**/*.d.ts"] | ||
"ignorePatterns": ["schematics/**/*.d.ts"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"] | ||
} | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.