Skip to content

Commit 8ed0129

Browse files
authored
chore: bump versions of Angular and devkit betas (#13359)
We can't bump to Angular 7 RC because it requires TypeScript 3.1, and devkit/schematics hasn't published a version w/ TypeScript 3.1 yet. Since it's a full dependency there (and not a peer dependency), the version mismatch breaks our schematics. For going to Angular 7 beta.7, we need to now explicitly unset some of the `angularCompilerOptions` in the `tsconfig-test` because they're now inherited. For going to devkit/schematics v6 beta 4, we need to update some imports around the `WorkspaceProject` class. There seem to now be two incompatible versions of this class in the devkit, so we'll need to sort that out soon.
1 parent 04234f0 commit 8ed0129

19 files changed

+321
-186
lines changed

package-lock.json

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

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"breaking-changes": "gulp breaking-changes"
2626
},
2727
"version": "7.0.0-beta.2",
28-
"requiredAngularVersion": ">=7.0.0-beta.5",
28+
"requiredAngularVersion": ">=7.0.0-beta.7",
2929
"dependencies": {
30-
"@angular/animations": "7.0.0-beta.5",
31-
"@angular/common": "7.0.0-beta.5",
32-
"@angular/compiler": "7.0.0-beta.5",
33-
"@angular/core": "7.0.0-beta.5",
34-
"@angular/elements": "7.0.0-beta.5",
35-
"@angular/forms": "7.0.0-beta.5",
36-
"@angular/platform-browser": "7.0.0-beta.5",
30+
"@angular/animations": "7.0.0-beta.7",
31+
"@angular/common": "7.0.0-beta.7",
32+
"@angular/compiler": "7.0.0-beta.7",
33+
"@angular/core": "7.0.0-beta.7",
34+
"@angular/elements": "7.0.0-beta.7",
35+
"@angular/forms": "7.0.0-beta.7",
36+
"@angular/platform-browser": "7.0.0-beta.7",
3737
"@webcomponents/custom-elements": "^1.1.0",
3838
"core-js": "^2.4.1",
3939
"rxjs": "^6.3.2",
@@ -43,20 +43,20 @@
4343
"zone.js": "^0.8.26"
4444
},
4545
"devDependencies": {
46-
"@angular-devkit/core": "^0.9.0-beta.3",
47-
"@angular-devkit/schematics": "^0.9.0-beta.3",
48-
"@angular/bazel": "7.0.0-beta.5",
49-
"@angular/compiler-cli": "7.0.0-beta.5",
50-
"@angular/http": "7.0.0-beta.5",
51-
"@angular/platform-browser-dynamic": "7.0.0-beta.5",
52-
"@angular/platform-server": "7.0.0-beta.5",
53-
"@angular/router": "7.0.0-beta.5",
54-
"@angular/upgrade": "7.0.0-beta.5",
46+
"@angular-devkit/core": "7.0.0-beta.4",
47+
"@angular-devkit/schematics": "7.0.0-beta.4",
48+
"@angular/bazel": "7.0.0-beta.7",
49+
"@angular/compiler-cli": "7.0.0-beta.7",
50+
"@angular/http": "7.0.0-beta.7",
51+
"@angular/platform-browser-dynamic": "7.0.0-beta.7",
52+
"@angular/platform-server": "7.0.0-beta.7",
53+
"@angular/router": "7.0.0-beta.7",
54+
"@angular/upgrade": "7.0.0-beta.7",
5555
"@bazel/ibazel": "0.3.1",
5656
"@bazel/typescript": "^0.18.0",
5757
"@google-cloud/storage": "^1.1.1",
5858
"@octokit/rest": "^15.9.4",
59-
"@schematics/angular": "^0.9.0-beta.2",
59+
"@schematics/angular": "7.0.0-beta.4",
6060
"@types/chalk": "^0.4.31",
6161
"@types/fs-extra": "^4.0.3",
6262
"@types/glob": "^5.0.33",

src/cdk-experimental/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@
1616
"angularCompilerOptions": {
1717
"strictMetadataEmit": true,
1818
"skipTemplateCodegen": true,
19-
"emitDecoratorMetadata": true
19+
"emitDecoratorMetadata": true,
20+
21+
// Unset options inherited from tsconfig-build
22+
"annotateForClosureCompiler": false,
23+
"flatModuleOutFile": null,
24+
"flatModuleId": null,
2025
},
2126
"include": [
2227
// Include the index.ts for each secondary entry-point

src/cdk/schematics/utils/ast.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
910
import {SchematicsException, Tree} from '@angular-devkit/schematics';
1011
import {Schema as ComponentOptions} from '@schematics/angular/component/schema';
1112
import {addImportToModule} from '@schematics/angular/utility/ast-utils';
1213
import {InsertChange} from '@schematics/angular/utility/change';
13-
import {getWorkspace, WorkspaceProject} from '@schematics/angular/utility/config';
14+
import {getWorkspace} from '@schematics/angular/utility/config';
1415
import {findModuleFromOptions as internalFindModule} from '@schematics/angular/utility/find-module';
1516
import {getAppModulePath} from '@schematics/angular/utility/ng-ast-utils';
1617
import {getProjectMainFile} from './project-main-file';
1718
import {ts} from './version-agnostic-typescript';
1819

20+
1921
/** Reads file given path and returns TypeScript source file. */
2022
export function getSourceFile(host: Tree, path: string) {
2123
const buffer = host.read(path);

src/cdk/schematics/utils/build-component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ export function buildComponent(options: ComponentOptions,
181181
.forEach(optionName => options[optionName] = defaultComponentOptions[optionName]);
182182

183183
if (options.path === undefined) {
184-
options.path = buildDefaultPath(project);
184+
// TODO(jelbourn): figure out if the need for this `as any` is a bug due to two different
185+
// incompatible `WorkspaceProject` classes in @angular-devkit
186+
options.path = buildDefaultPath(project as any);
185187
}
186188

187189
options.module = findModuleFromOptions(host, options);

src/cdk/schematics/utils/get-project.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {WorkspaceProject, WorkspaceSchema} from '@schematics/angular/utility/config';
9+
import {WorkspaceSchema, WorkspaceProject} from '@angular-devkit/core/src/workspace';
1010

1111
/**
1212
* Finds the specified project configuration in the workspace. Throws an error if the project
1313
* couldn't be found.
1414
*/
15-
export function getProjectFromWorkspace(workspace: WorkspaceSchema,
16-
projectName?: string): WorkspaceProject {
15+
export function getProjectFromWorkspace(
16+
workspace: WorkspaceSchema,
17+
projectName?: string): WorkspaceProject {
1718

1819
const project = workspace.projects[projectName || workspace.defaultProject!];
1920

@@ -22,5 +23,4 @@ export function getProjectFromWorkspace(workspace: WorkspaceSchema,
2223
}
2324

2425
return project;
25-
2626
}

src/cdk/schematics/utils/project-main-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
910
import {SchematicsException} from '@angular-devkit/schematics';
10-
import {WorkspaceProject} from '@schematics/angular/utility/config';
1111
import {getProjectTargetOptions} from './project-targets';
1212

1313
/** Looks for the main TypeScript file in the given project and returns its path. */

src/cdk/schematics/utils/project-style-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import {normalize} from '@angular-devkit/core';
10-
import {WorkspaceProject} from '@schematics/angular/utility/config';
10+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
1111
import {getProjectTargetOptions} from './project-targets';
1212

1313
/** Regular expression that matches all possible Angular CLI default style files. */

src/cdk/schematics/utils/project-targets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {WorkspaceProject} from '@schematics/angular/utility/config';
9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
1010

1111
/** Resolves the architect options for the build target of the given project. */
1212
export function getProjectTargetOptions(project: WorkspaceProject, buildTarget: string) {

src/cdk/schematics/utils/schematic-options.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {WorkspaceProject} from '@schematics/angular/utility/config';
9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
10+
1011

1112
/**
1213
* Returns the default options for the `@schematics/angular:component` schematic which would

src/cdk/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
"strictMetadataEmit": true,
2222
"skipTemplateCodegen": true,
2323
"emitDecoratorMetadata": true,
24-
"fullTemplateTypeCheck": true
24+
"fullTemplateTypeCheck": true,
25+
26+
// Unset options inherited from tsconfig-build
27+
"annotateForClosureCompiler": false,
28+
"flatModuleOutFile": null,
29+
"flatModuleId": null,
2530
},
2631
"include": [
2732
// Include the index.ts for each secondary entry-point

src/lib/schematics/ng-add/fonts/head-element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
910
import {SchematicsException, Tree} from '@angular-devkit/schematics';
1011
import {getChildElementIndentation} from '@angular/cdk/schematics';
11-
import {WorkspaceProject} from '@schematics/angular/utility/config';
1212
import {DefaultTreeDocument, DefaultTreeElement, parse as parseHtml} from 'parse5';
1313
import {getIndexHtmlPath} from './project-index-html';
1414

15+
1516
/** Appends the given element HTML fragment to the index.html head tag. */
1617
export function appendElementToHead(host: Tree, project: WorkspaceProject, elementHtml: string) {
1718
const indexPath = getIndexHtmlPath(project);

src/lib/schematics/ng-add/fonts/project-index-html.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
910
import {SchematicsException} from '@angular-devkit/schematics';
1011
import {getProjectTargetOptions} from '@angular/cdk/schematics';
11-
import {WorkspaceProject} from '@schematics/angular/utility/config';
12+
1213

1314
/** Looks for the index HTML file in the given project and returns its path. */
1415
export function getIndexHtmlPath(project: WorkspaceProject): string {

src/lib/schematics/ng-add/index.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {normalize} from '@angular-devkit/core';
2+
import {WorkspaceProject} from '@angular-devkit/core/src/workspace';
23
import {Tree} from '@angular-devkit/schematics';
34
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
45
import {
@@ -7,7 +8,7 @@ import {
78
getProjectStyleFile,
89
getProjectTargetOptions,
910
} from '@angular/cdk/schematics';
10-
import {getWorkspace, WorkspaceProject} from '@schematics/angular/utility/config';
11+
import {getWorkspace} from '@schematics/angular/utility/config';
1112
import {getFileContent} from '@schematics/angular/utility/test';
1213
import {getIndexHtmlPath} from './fonts/project-index-html';
1314

src/lib/schematics/ng-add/theming/theming.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
*/
88

99
import {normalize} from '@angular-devkit/core';
10+
import {WorkspaceProject, WorkspaceSchema} from '@angular-devkit/core/src/workspace';
1011
import {SchematicsException, Tree} from '@angular-devkit/schematics';
1112
import {
1213
getProjectFromWorkspace,
1314
getProjectStyleFile,
1415
getProjectTargetOptions,
1516
} from '@angular/cdk/schematics';
1617
import {InsertChange} from '@schematics/angular/utility/change';
17-
import {getWorkspace, WorkspaceProject, WorkspaceSchema} from '@schematics/angular/utility/config';
18+
import {getWorkspace} from '@schematics/angular/utility/config';
1819
import {join} from 'path';
1920
import {Schema} from '../schema';
2021
import {createCustomTheme} from './custom-theme';

src/lib/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
"strictMetadataEmit": true,
1818
"skipTemplateCodegen": true,
1919
"emitDecoratorMetadata": true,
20-
"fullTemplateTypeCheck": true
20+
"fullTemplateTypeCheck": true,
21+
22+
// Unset options inherited from tsconfig-build
23+
"annotateForClosureCompiler": false,
24+
"flatModuleOutFile": null,
25+
"flatModuleId": null,
2126
},
2227
"include": [
2328
"**/*.spec.ts",

src/material-examples/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
"strictMetadataEmit": true,
1414
"skipTemplateCodegen": true,
1515
"emitDecoratorMetadata": true,
16-
"fullTemplateTypeCheck": true
16+
"fullTemplateTypeCheck": true,
17+
18+
// Unset options inherited from tsconfig-build
19+
"annotateForClosureCompiler": false,
20+
"flatModuleOutFile": null,
21+
"flatModuleId": null,
1722
},
1823
"include": [
1924
"**/*.spec.ts",

src/material-experimental/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
"strictMetadataEmit": true,
1414
"skipTemplateCodegen": true,
1515
"emitDecoratorMetadata": true,
16-
"fullTemplateTypeCheck": true
16+
"fullTemplateTypeCheck": true,
17+
18+
// Unset options inherited from tsconfig-build
19+
"annotateForClosureCompiler": false,
20+
"flatModuleOutFile": null,
21+
"flatModuleId": null,
1722
},
1823
"include": [
1924
"**/*.spec.ts",

src/material-moment-adapter/tsconfig-tests.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
"strictMetadataEmit": true,
1414
"skipTemplateCodegen": true,
1515
"emitDecoratorMetadata": true,
16-
"fullTemplateTypeCheck": true
16+
"fullTemplateTypeCheck": true,
17+
18+
// Unset options inherited from tsconfig-build
19+
"annotateForClosureCompiler": false,
20+
"flatModuleOutFile": null,
21+
"flatModuleId": null,
1722
},
1823
"include": [
1924
"**/*.spec.ts",

0 commit comments

Comments
 (0)