Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit b7aa60f

Browse files
authored
build: update to Angular v16 (#1195)
Updates the docs to Angular v16 and resolves the build issues. Note that the Stackblitz template is currently locked down to `16.0.0-next.4`, because the latest APF changes break when forked to Stackblitz.
1 parent 584e6ba commit b7aa60f

File tree

10 files changed

+12551
-9088
lines changed

10 files changed

+12551
-9088
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
22
# This file should be checked into version control along with the pnpm-lock.yaml file.
33
.npmrc=-1306950124
4-
pnpm-lock.yaml=-499422130
5-
yarn.lock=2045546914
6-
package.json=-1343479525
4+
pnpm-lock.yaml=499870188
5+
yarn.lock=-1740706684
6+
package.json=-1344673372

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ speed-measure-plugin*.json
2222
.project
2323
.classpath
2424
.c9/
25+
.vscode/
2526
*.launch
2627
.settings/
2728
*.sublime-workspace

package.json

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,47 @@
3030
},
3131
"private": true,
3232
"dependencies": {
33-
"@angular/animations": "^15.1.1",
34-
"@angular/cdk": "^15.1.1",
35-
"@angular/cdk-experimental": "^15.1.1",
36-
"@angular/common": "^15.1.1",
37-
"@angular/compiler": "^15.1.1",
33+
"@angular/animations": "^16.0.0-next.5",
34+
"@angular/cdk": "^16.0.0-next.4",
35+
"@angular/cdk-experimental": "^16.0.0-next.4",
36+
"@angular/common": "^16.0.0-next.5",
37+
"@angular/compiler": "^16.0.0-next.5",
3838
"@angular/components-examples": "https://github.com/angular/material2-docs-content.git#5f06e33d3aab6a59b1f588cbdf5425dbfdf71663",
39-
"@angular/core": "^15.1.1",
40-
"@angular/forms": "^15.1.1",
41-
"@angular/google-maps": "^15.1.1",
42-
"@angular/localize": "^15.1.1",
43-
"@angular/material": "^15.1.1",
44-
"@angular/material-experimental": "^15.1.1",
45-
"@angular/material-moment-adapter": "^15.1.1",
46-
"@angular/platform-browser": "^15.1.1",
47-
"@angular/platform-browser-dynamic": "^15.1.1",
48-
"@angular/router": "^15.1.1",
49-
"@angular/youtube-player": "^15.1.1",
39+
"@angular/core": "^16.0.0-next.5",
40+
"@angular/forms": "^16.0.0-next.5",
41+
"@angular/google-maps": "^16.0.0-next.4",
42+
"@angular/localize": "^16.0.0-next.5",
43+
"@angular/material": "^16.0.0-next.4",
44+
"@angular/material-experimental": "^16.0.0-next.4",
45+
"@angular/material-moment-adapter": "^16.0.0-next.4",
46+
"@angular/platform-browser": "^16.0.0-next.5",
47+
"@angular/platform-browser-dynamic": "^16.0.0-next.5",
48+
"@angular/router": "^16.0.0-next.5",
49+
"@angular/youtube-player": "^16.0.0-next.4",
5050
"@stackblitz/sdk": "^1.5.2",
5151
"moment": "^2.29.1",
5252
"path-normalize": "^6.0.7",
5353
"rxjs": "^6.6.7",
5454
"tslib": "^2.3.0",
55-
"zone.js": "~0.12.0"
55+
"zone.js": "~0.13.0"
5656
},
5757
"devDependencies": {
58-
"@angular-devkit/architect": "^0.1501.2",
59-
"@angular-devkit/architect-cli": "^0.1500.1",
60-
"@angular-devkit/build-angular": "^15.1.2",
58+
"@angular-devkit/architect": "^0.1600.0-next.6",
59+
"@angular-devkit/architect-cli": "^0.1600.0-next.6",
60+
"@angular-devkit/build-angular": "^16.0.0-next.6",
6161
"@angular-eslint/builder": "^14.0.0",
6262
"@angular-eslint/eslint-plugin": "^14.0.0",
6363
"@angular-eslint/eslint-plugin-template": "^14.0.0",
6464
"@angular-eslint/template-parser": "^14.0.0",
65-
"@angular/cli": "^15.1.2",
66-
"@angular/compiler-cli": "^15.1.1",
65+
"@angular/cli": "^16.0.0-next.6",
66+
"@angular/compiler-cli": "^16.0.0-next.5",
6767
"@bazel/bazelisk": "^1.12.1",
6868
"@types/imagemin": "^7.0.0",
6969
"@types/jasmine": "^3.7.7",
7070
"@types/node": "^16.11.7",
7171
"@types/shelljs": "~0.8.8",
72-
"@typescript-eslint/eslint-plugin": "^5.48.2",
73-
"@typescript-eslint/parser": "^5.48.2",
72+
"@typescript-eslint/eslint-plugin": "^5.57.0",
73+
"@typescript-eslint/parser": "^5.57.0",
7474
"eslint": "^8.23.1",
7575
"eslint-plugin-ban": "^1.5.2",
7676
"eslint-plugin-import": "^2.22.1",
@@ -95,6 +95,6 @@
9595
"puppeteer": "~8.0.0",
9696
"shelljs": "^0.8.4",
9797
"ts-node": "^8.10.2",
98-
"typescript": "~4.9.3"
98+
"typescript": "~5.0.2"
9999
}
100100
}

pnpm-lock.yaml

Lines changed: 10720 additions & 7285 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/pages/component-sidenav/component-sidenav-can-load-guard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {Injectable} from '@angular/core';
2-
import {CanActivate, ActivatedRouteSnapshot, Router} from '@angular/router';
2+
import {ActivatedRouteSnapshot, Router} from '@angular/router';
33
import {SECTIONS} from '../../shared/documentation-items/documentation-items';
44

55
/**
66
* Guard to determine if the sidenav can load, based on whether the section exists in documentation
77
* items.
88
*/
99
@Injectable({providedIn: 'root'})
10-
export class CanActivateComponentSidenav implements CanActivate {
10+
export class CanActivateComponentSidenav {
1111
constructor(private router: Router) {}
1212

1313
canActivate(route: ActivatedRouteSnapshot) {

src/app/shared/table-of-contents/table-of-contents.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ export class TableOfContents implements OnInit, AfterViewInit, OnDestroy {
152152
const scrollOffset = this.getScrollOffset();
153153
let hasChanged = false;
154154

155+
if (scrollOffset == null) {
156+
return;
157+
}
158+
155159
for (let i = 0; i < this._links.length; i++) {
156160
// A link is considered active if the page is scrolled past the
157161
// anchor without also being scrolled passed the next link.

src/assets/stack-blitz/angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,5 @@
117117
}
118118
}
119119
}
120-
},
121-
"defaultProject": "example-app"
120+
}
122121
}

src/assets/stack-blitz/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@
1010
},
1111
"private": true,
1212
"dependencies": {
13-
"@angular/animations": "~15.0.0",
13+
"@angular/animations": "16.0.0-next.4",
1414
"@angular/cdk": "${version}",
15-
"@angular/common": "~15.0.0",
16-
"@angular/compiler": "~15.0.0",
17-
"@angular/core": "~15.0.0",
18-
"@angular/forms": "~15.0.0",
15+
"@angular/common": "16.0.0-next.4",
16+
"@angular/compiler": "16.0.0-next.4",
17+
"@angular/core": "16.0.0-next.4",
18+
"@angular/forms": "16.0.0-next.4",
1919
"@angular/material": "${version}",
2020
"@angular/material-moment-adapter": "${version}",
21-
"@angular/platform-browser": "~15.0.0",
22-
"@angular/platform-browser-dynamic": "~15.0.0",
23-
"@angular/router": "~15.0.0",
21+
"@angular/platform-browser": "16.0.0-next.4",
22+
"@angular/platform-browser-dynamic": "16.0.0-next.4",
23+
"@angular/router": "16.0.0-next.4",
2424
"moment": "^2.18.1",
2525
"rxjs": "~7.4.0",
2626
"tslib": "^2.3.0",
27-
"zone.js": "~0.11.5"
27+
"zone.js": "~0.13.0"
2828
},
2929
"devDependencies": {
30-
"@angular-devkit/build-angular": "~15.0.0",
31-
"@angular/cli": "~15.0.0",
32-
"@angular/compiler-cli": "~15.0.0",
30+
"@angular-devkit/build-angular": "16.0.0-next.4",
31+
"@angular/cli": "16.0.0-next.4",
32+
"@angular/compiler-cli": "16.0.0-next.4",
3333
"@types/jasmine": "~3.10.0",
3434
"@types/node": "^12.11.1",
3535
"jasmine-core": "~3.10.0",
@@ -38,6 +38,6 @@
3838
"karma-coverage": "~2.0.3",
3939
"karma-jasmine": "~4.0.0",
4040
"karma-jasmine-html-reporter": "~1.7.0",
41-
"typescript": "~4.8.2"
41+
"typescript": "~5.0.3"
4242
}
4343
}

0 commit comments

Comments
 (0)