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

File tree

19 files changed

+321
-186
lines changed

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

0 commit comments

Comments
 (0)