Skip to content

Commit

Permalink
ng update @angular/core@16 @angular/cli@16
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 committed Oct 11, 2023
1 parent 0cbb464 commit ed58530
Show file tree
Hide file tree
Showing 12 changed files with 15,323 additions and 14,967 deletions.
64 changes: 64 additions & 0 deletions angular-update.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
________________________________________________________________________________


ng update @angular/core@16 @angular/cli@16
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 16.2.6 to perform the update.
✔ Packages successfully installed.
Using package manager: yarn
Collecting installed dependencies...
Found 92 dependencies.
Fetching dependency metadata from registry...
Updating package.json with dependency @angular-devkit/build-angular @ "16.2.6" (was "15.2.10")...
Updating package.json with dependency @angular-devkit/schematics @ "16.2.6" (was "15.2.10")...
Updating package.json with dependency @angular/cli @ "16.2.6" (was "15.2.10")...
Updating package.json with dependency @angular/compiler-cli @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/language-service @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency typescript @ "5.1.6" (was "4.8.4")...
Updating package.json with dependency @angular-devkit/core @ "16.2.6" (was "15.2.10")...
Updating package.json with dependency @angular/animations @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/common @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/compiler @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/core @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/forms @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/localize @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/platform-browser @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/platform-browser-dynamic @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/router @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency @angular/service-worker @ "16.2.8" (was "15.2.10")...
Updating package.json with dependency zone.js @ "0.13.3" (was "0.11.8")...
UPDATE package.json (6057 bytes)
⠙ Installing packages...
⠹ Installing packages...
✔ Packages successfully installed.
** 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.
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 src/app/guards/authenticated.guard.ts (848 bytes)
UPDATE src/app/guards/sign-in.guard.ts (2282 bytes)
UPDATE src/app/guards/authorize.guard.ts (3661 bytes)
UPDATE src/app/guards/register.guard.ts (922 bytes)
UPDATE src/app/guards/link-account.guard.ts (1198 bytes)
UPDATE src/app/guards/language.guard.ts (4575 bytes)
UPDATE src/app/guards/third-party-signin-completed.guard.ts (2312 bytes)
UPDATE src/app/guards/two-factor-signin.guard.ts (1058 bytes)
UPDATE src/app/guards/authenticated-no-delagator.guard.ts (1379 bytes)
Migration completed (9 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).


________________________________________________________________________________


ng update @angular/core@15 @angular/cli@15
The installed Angular CLI version is outdated.
Installing a temporary Angular CLI versioned 15.2.10 to perform the update.
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@
},
"private": true,
"dependencies": {
"@angular-devkit/core": "^15.2.10",
"@angular/animations": "^15.2.10",
"@angular-devkit/core": "^16.2.6",
"@angular/animations": "^16.2.8",
"@angular/cdk": "^15.2.9",
"@angular/common": "^15.2.10",
"@angular/compiler": "^15.2.10",
"@angular/core": "^15.2.10",
"@angular/forms": "^15.2.10",
"@angular/localize": "^15.2.10",
"@angular/common": "^16.2.8",
"@angular/compiler": "^16.2.8",
"@angular/core": "^16.2.8",
"@angular/forms": "^16.2.8",
"@angular/localize": "^16.2.8",
"@angular/material": "^15.2.9",
"@angular/platform-browser": "^15.2.10",
"@angular/platform-browser-dynamic": "^15.2.10",
"@angular/router": "^15.2.10",
"@angular/service-worker": "^15.2.10",
"@angular/platform-browser": "^16.2.8",
"@angular/platform-browser-dynamic": "^16.2.8",
"@angular/router": "^16.2.8",
"@angular/service-worker": "^16.2.8",
"@orcid/bibtex-parse-js": "0.0.25",
"@storybook/addon-a11y": "^7.3.0",
"browserslist": "^4.19.1",
Expand All @@ -79,14 +79,14 @@
"stream": "0.0.2",
"timers": "^0.1.1",
"xml2js": "^0.5.0",
"zone.js": "~0.11.4"
"zone.js": "~0.13.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^15.2.10",
"@angular-devkit/schematics": "15.2.10",
"@angular/cli": "^15.2.10",
"@angular/compiler-cli": "^15.2.10",
"@angular/language-service": "^15.2.10",
"@angular-devkit/build-angular": "^16.2.6",
"@angular-devkit/schematics": "16.2.6",
"@angular/cli": "^16.2.6",
"@angular/compiler-cli": "^16.2.8",
"@angular/language-service": "^16.2.8",
"@babel/core": "^7.6.0",
"@compodoc/compodoc": "^1.1.21",
"@storybook/addon-essentials": "^7.0.17",
Expand Down Expand Up @@ -136,6 +136,6 @@
"ts-node": "^8.5.2",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "~4.8.4"
"typescript": "~5.1.6"
}
}
10 changes: 2 additions & 8 deletions src/app/guards/authenticated-no-delagator.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { combineLatest, Observable } from 'rxjs'
import { map } from 'rxjs/operators'

Expand All @@ -16,7 +10,7 @@ import { TogglzService } from '../core/togglz/togglz.service'
@Injectable({
providedIn: 'root',
})
export class AuthenticatedNoDelegatorGuard implements CanActivateChild {
export class AuthenticatedNoDelegatorGuard {
constructor(
private _userInfo: UserService,
private _router: Router,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/authenticated.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable } from 'rxjs'
import { map } from 'rxjs/operators'

Expand All @@ -15,7 +9,7 @@ import { UserService } from '../core'
@Injectable({
providedIn: 'root',
})
export class AuthenticatedGuard implements CanActivateChild {
export class AuthenticatedGuard {
constructor(private _userInfo: UserService, private _router: Router) {}
canActivateChild(
next: ActivatedRouteSnapshot,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/authorize.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Inject, Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { forkJoin, NEVER, Observable, of, throwError, timer } from 'rxjs'
import { catchError, map, switchMap, take, tap, timeout } from 'rxjs/operators'

Expand All @@ -20,7 +14,7 @@ import { GoogleTagManagerService } from '../core/google-tag-manager/google-tag-m
@Injectable({
providedIn: 'root',
})
export class AuthorizeGuard implements CanActivateChild {
export class AuthorizeGuard {
lastRedirectUrl: string
redirectTroughGtmWasCalled: boolean
constructor(
Expand Down
8 changes: 2 additions & 6 deletions src/app/guards/language.guard.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Inject, Injectable, LOCALE_ID } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
RouterStateSnapshot,
} from '@angular/router'
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'
import { CookieService } from 'ngx-cookie-service'
import { NEVER, Observable, of } from 'rxjs'
import { catchError, switchMap, tap } from 'rxjs/operators'
Expand All @@ -19,7 +15,7 @@ const GUARD_COOKIE_CHECK = 'lang_refresh'
@Injectable({
providedIn: 'root',
})
export class LanguageGuard implements CanActivateChild {
export class LanguageGuard {
constructor(
@Inject(LOCALE_ID) public locale: string,
private _user: UserService,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/link-account.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable, of } from 'rxjs'
import { catchError, map, take } from 'rxjs/operators'

Expand All @@ -16,7 +10,7 @@ import { OauthService } from '../core/oauth/oauth.service'
@Injectable({
providedIn: 'root',
})
export class LinkAccountGuard implements CanActivateChild {
export class LinkAccountGuard {
constructor(
private _userInfo: UserService,
private _router: Router,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/register.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable } from 'rxjs'
import { map } from 'rxjs/operators'

Expand All @@ -14,7 +8,7 @@ import { UserService } from '../core'
@Injectable({
providedIn: 'root',
})
export class RegisterGuard implements CanActivateChild {
export class RegisterGuard {
constructor(private _user: UserService, private _router: Router) {}

canActivateChild(
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/sign-in.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Inject, Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable } from 'rxjs'
import { map, take } from 'rxjs/operators'

Expand All @@ -17,7 +11,7 @@ import { ErrorHandlerService } from '../core/error-handler/error-handler.service
@Injectable({
providedIn: 'root',
})
export class SignInGuard implements CanActivateChild {
export class SignInGuard {
constructor(
private _user: UserService,
private _router: Router,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/third-party-signin-completed.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Inject, Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { forkJoin, Observable } from 'rxjs'
import { catchError, first, map } from 'rxjs/operators'

Expand All @@ -19,7 +13,7 @@ import { ErrorHandlerService } from '../core/error-handler/error-handler.service
@Injectable({
providedIn: 'root',
})
export class ThirdPartySigninCompletedGuard implements CanActivateChild {
export class ThirdPartySigninCompletedGuard {
constructor(
private _router: Router,
@Inject(WINDOW) private window: Window,
Expand Down
10 changes: 2 additions & 8 deletions src/app/guards/two-factor-signin.guard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { Injectable } from '@angular/core'
import {
ActivatedRouteSnapshot,
CanActivateChild,
Router,
RouterStateSnapshot,
UrlTree,
} from '@angular/router'
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable } from 'rxjs'
import { map, take } from 'rxjs/operators'
import { UserService } from '../core'
Expand All @@ -15,7 +9,7 @@ import { OauthService } from '../core/oauth/oauth.service'
@Injectable({
providedIn: 'root',
})
export class TwoFactorSigninGuard implements CanActivateChild {
export class TwoFactorSigninGuard {
constructor(
private _userInfo: UserService,
private _router: Router,
Expand Down
Loading

0 comments on commit ed58530

Please sign in to comment.