Skip to content
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

feat(all)!: upgrade to Angular v17 #2728

Merged
merged 14 commits into from
Jan 25, 2024

Conversation

griest024
Copy link
Member

@griest024 griest024 commented Jan 18, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Upgrade your app to Angular v17

Other information

fixes #2707

@griest024
Copy link
Member Author

blocked by angular/angular-cli#26922

@griest024 griest024 added the status: blocked This PR is blocked and cannot currently be progressed label Jan 22, 2024
@griest024 griest024 marked this pull request as ready for review January 22, 2024 22:51
@griest024 griest024 requested review from a team and damienwebdev as code owners January 22, 2024 22:51
@griest024 griest024 marked this pull request as draft January 22, 2024 23:19
@griest024 griest024 marked this pull request as ready for review January 23, 2024 16:43
@griest024 griest024 added status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin and removed status: blocked This PR is blocked and cannot currently be progressed labels Jan 24, 2024
@griest024 griest024 force-pushed the feat/all/angular-17 branch 3 times, most recently from 3abec0e to 4276cba Compare January 25, 2024 16:07
BREAKING CHANGE: Angular has been upgraded to v16

ng update @angular/{pwa,core,cdk,cli,animations,common,compiler,elements,forms,platform-browser,platform-browser-dynamic,platform-server,router,service-worker,compiler
-cli,language-service}@16.0.0 @nguniversal/{builders,express-engine}@16.0.0 @angular-devkit/{schematics,build-angular,core}@16.
0.0 @angular-eslint/{builder,eslint-plugin,eslint-plugin-template,schematics,template-parser}@16.0.0 @ngrx/{effects,entity,rout
er-store,schematics,store,store-devtools}@16.0.0 ng-packagr@16.0.0 @angular-devkit/architect@0.1602.11 angular-in-memory-web-ap
i@0.16.0 typescript@4.9.3 --force
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 16.2.11 to perform the update.
✔ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 106 dependencies.
Fetching dependency metadata from registry...
    Updating package.json with dependency @angular-devkit/architect @ "0.1602.11" (was "0.1502.9")...
    Updating package.json with dependency @angular-devkit/build-angular @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular-devkit/core @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular-devkit/schematics @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular-eslint/builder @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency @angular-eslint/eslint-plugin @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency @angular-eslint/eslint-plugin-template @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency @angular-eslint/schematics @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency @angular-eslint/template-parser @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency @angular/cli @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/compiler-cli @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/language-service @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @ngrx/store-devtools @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @nguniversal/builders @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency ng-packagr @ "16.0.0" (was "15.2.2")...
    Updating package.json with dependency typescript @ "4.9.3" (was "4.8.4")...
    Updating package.json with dependency @angular/animations @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/cdk @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/common @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/compiler @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/core @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/elements @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/forms @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/platform-browser @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/platform-server @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/pwa @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/router @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @angular/service-worker @ "16.0.0" (was "15.2.9")...
    Updating package.json with dependency @ngrx/effects @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @ngrx/entity @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @ngrx/router-store @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @ngrx/schematics @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @ngrx/store @ "16.0.0" (was "15.4.0")...
    Updating package.json with dependency @nguniversal/express-engine @ "16.0.0" (was "15.2.1")...
    Updating package.json with dependency angular-in-memory-web-api @ "0.16.0" (was "0.15.0")...
    Updating package.json with dependency zone.js @ "0.13.3" (was "0.11.5")...
UPDATE package.json (4251 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular-eslint/schematics' **

▸ Updates @angular-eslint to v16.
UPDATE package.json (4252 bytes)
✔ Packages installed successfully.
  Migration completed (1 file modified).

** Executing migrations of package '@angular/cli' **

▸ Remove 'defaultProject' option from workspace configuration.
  The project to use will be determined from the current working directory.
  Migration completed (No changes made).

▸ Replace removed 'defaultCollection' option in workspace configuration with 'schematicCollections'.
  Migration completed (No changes made).

▸ Update the '@angular-devkit/build-angular:server' builder configuration to disable 'buildOptimizer' for non optimized builds.
UPDATE angular.json (71902 bytes)
  Migration completed (1 file modified).

** Executing migrations of package '@angular/cdk' **

▸ Updates the Angular CDK to v16.
    Skipping migration for project demo-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project daffio-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project design-land-e2e. Unable to determine 'tsconfig.json' file in workspace config.

      ✓  Updated Angular CDK to version 16

  Migration completed (No changes made).

** Executing migrations of package '@angular/core' **

▸ In Angular version 15.2, the guard and resolver interfaces (CanActivate, Resolve, etc) were deprecated.
  This migration removes imports and 'implements' clauses that contain them.
UPDATE apps/demo/src/app/cart/routing-resolvers/resolvers/cart-resolver.service.ts (1198 bytes)
UPDATE apps/demo/src/app/cart/routing-resolvers/resolvers/empty-cart-resolver.service.ts (942 bytes)
UPDATE libs/external-router/routing/src/guard/existence.guard.ts (3506 bytes)
UPDATE libs/product/routing/src/resolvers/product-page-id/product-page-id.resolver.ts (1369 bytes)
UPDATE libs/product/routing/src/resolvers/product-page/product-page.resolver.ts (790 bytes)
UPDATE libs/product/routing/src/resolvers/product-page-url/product-page-url.resolver.ts (1700 bytes)
UPDATE libs/category/routing/src/resolvers/category-page-id/category-page-id.resolver.ts (1815 bytes)
UPDATE libs/category/routing/src/resolvers/category-page/category-page.resolver.ts (772 bytes)
UPDATE libs/category/routing/src/resolvers/category-page-url/category-page-url.resolver.ts (1703 bytes)
UPDATE libs/cart/routing/src/guards/billing-address/billing-address.guard.ts (1277 bytes)
UPDATE libs/cart/routing/src/guards/resolved-cart/resolved-cart.guard.ts (1781 bytes)
UPDATE libs/cart/routing/src/guards/resolve-cart/resolve-cart.guard.ts (3308 bytes)
UPDATE libs/cart/routing/src/guards/cart-items/cart-items.guard.ts (1409 bytes)
UPDATE libs/cart/routing/src/guards/in-stock-items/in-stock-items.guard.ts (1609 bytes)
UPDATE libs/cart/routing/src/guards/payment-method/payment-method.guard.ts (1268 bytes)
UPDATE libs/cart/routing/src/guards/shipping-address/shipping-address.guard.ts (1286 bytes)
UPDATE libs/cart/routing/src/guards/shipping-method/shipping-method.guard.ts (1277 bytes)
UPDATE libs/cart/routing/src/guards/order-result/order-result.guard.ts (1020 bytes)
UPDATE libs/cart/routing/src/resolvers/cart-resolver.service.ts (1837 bytes)
UPDATE libs/cart/routing/src/resolvers/empty-cart-resolver.service.ts (1402 bytes)
UPDATE apps/daffio/src/app/api/resolvers/api-list-resolver.service.ts (715 bytes)
UPDATE apps/daffio/src/app/docs/resolvers/docs-resolver.service.ts (1055 bytes)
UPDATE libs/auth/routing/src/guards/member-only.guard.ts (1690 bytes)
UPDATE libs/auth/routing/src/guards/guest-only.guard.ts (1689 bytes)
UPDATE libs/auth/routing/src/guards/reset-password.guard.ts (847 bytes)
UPDATE libs/paypal/routing/src/guards/express-payment/guard.ts (1283 bytes)
UPDATE libs/order/routing/src/guards/placed-order/placed-order.guard.ts (997 bytes)
UPDATE libs/search/routing/src/resolvers/search/search.resolver.ts (1844 bytes)
UPDATE libs/customer/routing/src/guards/clear-errors.guard.ts (627 bytes)
UPDATE libs/customer/routing/src/resolvers/customer.resolver.ts (474 bytes)
UPDATE libs/customer-store-credit/routing/src/guards/clear-errors.guard.ts (673 bytes)
UPDATE libs/customer-store-credit/routing/src/resolvers/customer-store-credit.resolver.ts (542 bytes)
UPDATE libs/cart-store-credit/routing/src/guards/clear-errors.guard.ts (653 bytes)
UPDATE libs/customer-payment/routing/src/guards/clear-errors.guard.ts (656 bytes)
UPDATE libs/customer-payment/routing/src/resolvers/customer-payments.resolver.ts (517 bytes)
UPDATE libs/seo/integration-tests/state/provided-canonical-updates.spec.ts (5800 bytes)
  Migration completed (36 files modified).

▸ As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect.
  Migration completed (No changes made).

** Executing migrations of package '@ngrx/store' **

▸ The road to v16.0-beta.
  Migration completed (No changes made).
BREAKING CHANGE: Angular has been upgraded to v17

ng update @angular/{pwa,core,cdk,cli,animations,common,compiler,elements,forms,platform-browser,platform-browser-dynamic,platform-server,router,service-worker,compiler-cli,language-service}@17.0.0 @angular-devkit/{schematics,build-angular,core}@17.0.0 @angular-eslint/{builder,eslint-plugin,eslint-plugin-templat
e,schematics,template-parser}@17.0.0 @ngrx/{effects,entity,router-store,schematics,store,store-devtools}@17.0.0 ng-packag
r@17.0.0 @angular-devkit/architect@0.1700.9 angular-in-memory-web-api@0.17.0 typescript@5.3 @fortawesome/angular-fontawes
ome@0.14 --force
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 17.0.9 to perform the update.
✔ Packages successfully installed.
Using package manager: npm
Collecting installed dependencies...
Found 106 dependencies.
Fetching dependency metadata from registry...
                  Package "@angular-devkit/build-angular" has an incompatible peer dependency to "typescript" (requires ">=5.2 <5.3", would install "5.3.3")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=5.2 <5.3", would install "5.3.3")
                  Package "ng-packagr" has an incompatible peer dependency to "typescript" (requires ">=5.2 <5.3", would install "5.3.3")
                  Package "@angular-devkit/build-angular" has an incompatible peer dependency to "typescript" (requires ">=5.2 <5.3", would install "5.3.3").
    Updating package.json with dependency @angular-devkit/architect @ "0.1700.9" (was "0.1602.11")...
    Updating package.json with dependency @angular-devkit/build-angular @ "17.0.0" (was "16.2.11")...
    Updating package.json with dependency @angular-devkit/core @ "17.0.0" (was "16.2.11")...
    Updating package.json with dependency @angular-devkit/schematics @ "17.0.0" (was "16.2.11")...
    Updating package.json with dependency @angular-eslint/builder @ "17.0.0" (was "16.3.1")...
    Updating package.json with dependency @angular-eslint/eslint-plugin @ "17.0.0" (was "16.3.1")...
    Updating package.json with dependency @angular-eslint/eslint-plugin-template @ "17.0.0" (was "16.3.1")...
    Updating package.json with dependency @angular-eslint/schematics @ "17.0.0" (was "16.3.1")...
    Updating package.json with dependency @angular-eslint/template-parser @ "17.0.0" (was "16.3.1")...
    Updating package.json with dependency @angular/cli @ "17.0.0" (was "16.2.11")...
    Updating package.json with dependency @angular/compiler-cli @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/language-service @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @ngrx/store-devtools @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency ng-packagr @ "17.0.0" (was "16.2.3")...
    Updating package.json with dependency typescript @ "5.3.3" (was "4.9.5")...
    Updating package.json with dependency @angular/animations @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/cdk @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/common @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/compiler @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/core @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/elements @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/forms @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/platform-browser @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/platform-server @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/pwa @ "17.0.0" (was "16.2.11")...
    Updating package.json with dependency @angular/router @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @angular/service-worker @ "17.0.0" (was "16.2.12")...
    Updating package.json with dependency @fortawesome/angular-fontawesome @ "0.14.1" (was "0.13.0")...
    Updating package.json with dependency @ngrx/effects @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency @ngrx/entity @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency @ngrx/router-store @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency @ngrx/schematics @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency @ngrx/store @ "17.0.0" (was "16.3.0")...
    Updating package.json with dependency angular-in-memory-web-api @ "0.17.0" (was "0.16.0")...
    Updating package.json with dependency zone.js @ "0.14.2" (was "0.13.3")...
UPDATE package.json (4250 bytes)
✔ Packages successfully installed.
** Executing migrations of package '@angular-eslint/schematics' **

▸ Updates @angular-eslint to v17.
UPDATE package.json (4251 bytes)
✔ Packages installed successfully.
  Migration completed (1 file modified).

** Executing migrations of package '@angular/cli' **

▸ Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.
UPDATE angular.json (71918 bytes)
UPDATE package.json (4211 bytes)
  Migration completed (2 files modified).

▸ Replace usages of '@nguniversal/' packages with '@angular/ssr'.
RENAME apps/daffio/server/server.ts => apps/daffio/server/server.ts.bak
CREATE apps/daffio/server/server.ts (2206 bytes)
UPDATE package.json (4195 bytes)
✔ Packages installed successfully.
  Migration completed (2 files modified).

▸ Replace deprecated options in 'angular.json'.
UPDATE angular.json (71896 bytes)
  Migration completed (1 file modified).

** Executing migrations of package '@ngrx/store-devtools' **

▸ The road to v17-beta.1.
UPDATE apps/daffio/src/app/app.module.ts (1866 bytes)
UPDATE apps/demo/src/app/app.module.ts (1861 bytes)
  Migration completed (2 files modified).

** Executing migrations of package '@angular/cdk' **

▸ Updates the Angular CDK to v17.
    Skipping migration for project demo-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project daffio-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project design-land-e2e. Unable to determine 'tsconfig.json' file in workspace config.

      ✓  Updated Angular CDK to version 17

  Migration completed (No changes made).

** Executing migrations of package '@angular/core' **

▸ Angular v17 introduces a new control flow syntax that uses the @ and } characters.
  This migration replaces the existing usages with their corresponding HTML entities.
UPDATE apps/demo/src/app/misc/help-box/help-box.component.html (604 bytes)
UPDATE apps/design-land/src/app/sidebar/sidebar.component.html (7697 bytes)
UPDATE apps/design-land/src/app/foundations/variables/variables.component.html (2063 bytes)
  Migration completed (3 files modified).

▸ Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`.
  Migration completed (No changes made).

▸ CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy.
  This migration removes their usage
  Migration completed (No changes made).
this replaces the separate client and server builds with a single build
@griest024 griest024 merged commit 8e07ccc into graycoreio:develop Jan 25, 2024
52 of 53 checks passed
@gray-bot gray-bot mentioned this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: awaiting merge This PR has met all the requirements for merge and is waiting on an admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Upgrade to Angular 17
2 participants