Skip to content

Commit a0f4829

Browse files
committed
build: update to Angular and CLI v12 next.7 and Components v12 next.5
- fix typing change in `ActivatedRoute.fragment` - fix [breaking change](angular/angular-cli#20361) to no longer allow the styles `bundleName` to include a path in the ng build config
1 parent f3713b7 commit a0f4829

File tree

9 files changed

+450
-306
lines changed

9 files changed

+450
-306
lines changed

angular.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,22 @@
5252
{
5353
"inject": false,
5454
"input": "src/styles/custom-themes/pink-bluegrey.scss",
55-
"bundleName": "assets/pink-bluegrey"
55+
"bundleName": "pink-bluegrey"
5656
},
5757
{
5858
"inject": false,
5959
"input": "src/styles/custom-themes/deeppurple-amber.scss",
60-
"bundleName": "assets/deeppurple-amber"
60+
"bundleName": "deeppurple-amber"
6161
},
6262
{
6363
"inject": false,
6464
"input": "src/styles/custom-themes/indigo-pink.scss",
65-
"bundleName": "assets/indigo-pink"
65+
"bundleName": "indigo-pink"
6666
},
6767
{
6868
"inject": false,
6969
"input": "src/styles/custom-themes/purple-green.scss",
70-
"bundleName": "assets/purple-green"
70+
"bundleName": "purple-green"
7171
}
7272
],
7373
"stylePreprocessorOptions": {
@@ -136,22 +136,22 @@
136136
{
137137
"inject": false,
138138
"input": "src/styles/custom-themes/pink-bluegrey.scss",
139-
"bundleName": "assets/pink-bluegrey"
139+
"bundleName": "pink-bluegrey"
140140
},
141141
{
142142
"inject": false,
143143
"input": "src/styles/custom-themes/deeppurple-amber.scss",
144-
"bundleName": "assets/deeppurple-amber"
144+
"bundleName": "deeppurple-amber"
145145
},
146146
{
147147
"inject": false,
148148
"input": "src/styles/custom-themes/indigo-pink.scss",
149-
"bundleName": "assets/indigo-pink"
149+
"bundleName": "indigo-pink"
150150
},
151151
{
152152
"inject": false,
153153
"input": "src/styles/custom-themes/purple-green.scss",
154-
"bundleName": "assets/purple-green"
154+
"bundleName": "purple-green"
155155
}
156156
],
157157
"stylePreprocessorOptions": {

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,33 @@
3434
},
3535
"private": true,
3636
"dependencies": {
37-
"@angular/animations": "^12.0.0-next.5",
38-
"@angular/cdk": "^12.0.0-next.4",
39-
"@angular/cdk-experimental": "^12.0.0-next.4",
40-
"@angular/common": "^12.0.0-next.5",
41-
"@angular/compiler": "^12.0.0-next.5",
37+
"@angular/animations": "^12.0.0-next.7",
38+
"@angular/cdk": "^12.0.0-next.5",
39+
"@angular/cdk-experimental": "^12.0.0-next.5",
40+
"@angular/common": "^12.0.0-next.7",
41+
"@angular/compiler": "^12.0.0-next.7",
4242
"@angular/components-examples": "angular/material2-docs-content#master",
43-
"@angular/core": "^12.0.0-next.5",
44-
"@angular/forms": "^12.0.0-next.5",
45-
"@angular/google-maps": "^12.0.0-next.4",
46-
"@angular/material": "^12.0.0-next.4",
47-
"@angular/material-experimental": "^12.0.0-next.4",
48-
"@angular/material-moment-adapter": "^12.0.0-next.4",
49-
"@angular/platform-browser": "^12.0.0-next.5",
50-
"@angular/platform-browser-dynamic": "^12.0.0-next.5",
51-
"@angular/router": "^12.0.0-next.5",
52-
"@angular/youtube-player": "^12.0.0-next.4",
43+
"@angular/core": "^12.0.0-next.7",
44+
"@angular/forms": "^12.0.0-next.7",
45+
"@angular/google-maps": "^12.0.0-next.5",
46+
"@angular/material": "^12.0.0-next.5",
47+
"@angular/material-experimental": "^12.0.0-next.5",
48+
"@angular/material-moment-adapter": "^12.0.0-next.5",
49+
"@angular/platform-browser": "^12.0.0-next.7",
50+
"@angular/platform-browser-dynamic": "^12.0.0-next.7",
51+
"@angular/router": "^12.0.0-next.7",
52+
"@angular/youtube-player": "^12.0.0-next.5",
5353
"material-components-web": "10.0.0-canary.2ed2d829b.0",
5454
"moment": "^2.29.1",
5555
"rxjs": "^6.6.6",
5656
"tslib": "^2.1.0",
5757
"zone.js": "~0.11.4"
5858
},
5959
"devDependencies": {
60-
"@angular-devkit/build-angular": "^0.1200.0-next.5",
61-
"@angular/cli": "^12.0.0-next.5",
62-
"@angular/compiler-cli": "^12.0.0-next.5",
63-
"@angular/localize": "^12.0.0-next.5",
60+
"@angular-devkit/build-angular": "^0.1200.0-next.7",
61+
"@angular/cli": "^12.0.0-next.7",
62+
"@angular/compiler-cli": "^12.0.0-next.7",
63+
"@angular/localize": "^12.0.0-next.7",
6464
"@types/imagemin": "^7.0.0",
6565
"@types/jasmine": "^3.6.6",
6666
"@types/node": "^12.20.6",

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ export class TableOfContents implements OnInit, AfterViewInit, OnDestroy {
6060
}));
6161

6262
this.subscriptions.add(this._route.fragment.subscribe(fragment => {
63-
this._urlFragment = fragment;
63+
if (fragment != null) {
64+
this._urlFragment = fragment;
6465

65-
const target = document.getElementById(this._urlFragment);
66-
if (target) {
67-
target.scrollIntoView();
66+
const target = document.getElementById(this._urlFragment);
67+
if (target) {
68+
target.scrollIntoView();
69+
}
6870
}
6971
}));
7072
}

src/app/shared/theme-picker/theme-picker.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {waitForAsync, TestBed} from '@angular/core/testing';
22
import {ThemePicker, ThemePickerModule} from './theme-picker';
33
import {DocsAppTestingModule} from '../../testing/testing-module';
44

5-
65
describe('ThemePicker', () => {
76
beforeEach(waitForAsync(() => {
87
TestBed.configureTestingModule({
@@ -17,6 +16,6 @@ describe('ThemePicker', () => {
1716
spyOn(component.styleManager, 'setStyle');
1817
component.selectTheme(name);
1918
expect(component.styleManager.setStyle).toHaveBeenCalled();
20-
expect(component.styleManager.setStyle).toHaveBeenCalledWith('theme', `assets/${name}.css`);
19+
expect(component.styleManager.setStyle).toHaveBeenCalledWith('theme', `${name}.css`);
2120
});
2221
});

src/app/shared/theme-picker/theme-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class ThemePicker implements OnInit, OnDestroy {
104104
if (theme.isDefault) {
105105
this.styleManager.removeStyle('theme');
106106
} else {
107-
this.styleManager.setStyle('theme', `assets/${theme.name}.css`);
107+
this.styleManager.setStyle('theme', `${theme.name}.css`);
108108
}
109109

110110
if (this.currentTheme) {

src/assets/stack-blitz-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"zone.js": "^0.11.4"
3030
},
3131
"devDependencies": {
32-
"@angular-devkit/build-angular": "0.1200.0-next.5",
33-
"@angular/cli": "^12.0.0-next.5",
32+
"@angular-devkit/build-angular": "0.1200.0-next.7",
33+
"@angular/cli": "^12.0.0-next.7",
3434
"@angular/compiler-cli": "^12.0.0-next.0",
3535
"@angular/language-service": "^12.0.0-next.0",
3636
"@angular/localize": "^12.0.0-next.0",

src/assets/stack-blitz/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"zone.js": "^0.11.4"
3030
},
3131
"devDependencies": {
32-
"@angular-devkit/build-angular": "^0.1200.0-next.5",
33-
"@angular/cli": "^12.0.0-next.5",
32+
"@angular-devkit/build-angular": "^0.1200.0-next.7",
33+
"@angular/cli": "^12.0.0-next.7",
3434
"@angular/compiler-cli": "^12.0.0-next.0",
3535
"@angular/language-service": "^12.0.0-next.0",
3636
"@angular/localize": "^12.0.0-next.0",

src/assets/versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@
2929
},
3030
{
3131
"url": "https://next.material.angular.io/",
32-
"title": "12.0.0-next.4"
32+
"title": "12.0.0-next.5"
3333
}
3434
]

0 commit comments

Comments
 (0)