Skip to content

Commit 0662a8d

Browse files
Keen Yee Liauvikerman
Keen Yee Liau
authored andcommitted
build: g3 sync for packages/schematics and packages/angular
Fix all build errors in g3
1 parent 1bddf8b commit 0662a8d

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

packages/angular/cli/BUILD

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ ts_library(
3535
"//packages/angular_devkit/schematics:tools",
3636
# @typings: es2017.object
3737
"@npm//@types/debug",
38-
"@npm//debug",
3938
"@npm//@types/node",
4039
"@npm//@types/inquirer",
4140
"@npm//@types/semver",

packages/angular/cli/commands/add-impl.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export class AddCommand extends SchematicCommand<AddCommandSchema> {
9191
} else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) {
9292
// 'latest' is invalid so search for most recent matching package
9393
const versionManifests = Object.values(packageMetadata.versions).filter(
94-
value => !prerelease(value.version),
95-
);
94+
(value: PackageManifest) => !prerelease(value.version),
95+
) as PackageManifest[];
9696

9797
versionManifests.sort((a, b) => rcompare(a.version, b.version, true));
9898

packages/angular_devkit/core/BUILD

+11-8
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ ts_library(
3333
# The attribute below is needed in g3 to turn off strict typechecking
3434
# strict_checks = False,
3535
deps = [
36-
"@npm//rxjs",
37-
"@npm//@types/node",
3836
"@npm//@types/fast-json-stable-stringify",
37+
"@npm//@types/node",
3938
"@npm//ajv",
4039
"@npm//magic-string",
40+
"@npm//rxjs",
4141
"@npm//source-map",
4242
# @typings: es2015.core
4343
# @typings: es2015.proxy
@@ -80,8 +80,10 @@ jasmine_node_test(
8080
# TODO: Audit tests to determine if tests can be run in RBE environments
8181
local = True,
8282
deps = [
83-
"@npm//jasmine",
84-
"@npm//source-map",
83+
# @node_module: ajv
84+
# @node_module: fast_json_stable_stringify
85+
# @node_module: magic_string
86+
# @node_module: source_map
8587
],
8688
)
8789

@@ -137,11 +139,12 @@ jasmine_node_test(
137139
# TODO: Audit tests to determine if tests can be run in RBE environments
138140
local = True,
139141
deps = [
140-
"@npm//chokidar",
141-
"@npm//jasmine",
142-
"@npm//source-map",
143142
"@npm//temp",
144-
"@npm//tslint",
143+
"@npm//chokidar",
144+
# @node_module: ajv
145+
# @node_module: fast_json_stable_stringify
146+
# @node_module: magic_string
147+
# @node_module: temp
145148
],
146149
)
147150

packages/schematics/angular/service-worker/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default function (options: ServiceWorkerOptions): Rule {
131131
let buildConfiguration;
132132
if (options.configuration && buildTarget.configurations) {
133133
buildConfiguration =
134-
buildTarget.configurations[options.configuration] as BrowserBuilderOptions | undefined;
134+
buildTarget.configurations[options.configuration] as unknown as BrowserBuilderOptions | undefined;
135135
}
136136

137137
const config = buildConfiguration || buildOptions;

packages/schematics/angular/web-worker/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import {
9+
JsonAstArray,
910
JsonParseMode,
1011
dirname,
1112
join,
@@ -46,9 +47,9 @@ function addConfig(options: WebWorkerOptions, root: string, tsConfigPath: string
4647
throw new SchematicsException('Invalid tsconfig "exclude" property; expected an array.');
4748
}
4849

49-
if (filesAstNode && !filesAstNode.value.includes(workerGlob)) {
50+
if (filesAstNode && !(filesAstNode as JsonAstArray).value.includes(workerGlob)) {
5051
const recorder = host.beginUpdate(tsConfigPath);
51-
appendValueInAstArray(recorder, filesAstNode, workerGlob);
52+
appendValueInAstArray(recorder, filesAstNode as JsonAstArray, workerGlob);
5253
host.commitUpdate(recorder);
5354
}
5455
}

0 commit comments

Comments
 (0)