build: g3 sync for packages/schematics and packages/angular

Fix all build errors in g3
This commit is contained in:
Keen Yee Liau 2019-10-01 13:16:33 -07:00 committed by vikerman
parent 1bddf8b48c
commit 0662a8d774
5 changed files with 17 additions and 14 deletions

View File

@ -35,7 +35,6 @@ ts_library(
"//packages/angular_devkit/schematics:tools",
# @typings: es2017.object
"@npm//@types/debug",
"@npm//debug",
"@npm//@types/node",
"@npm//@types/inquirer",
"@npm//@types/semver",

View File

@ -91,8 +91,8 @@ export class AddCommand extends SchematicCommand<AddCommandSchema> {
} else if (!latestManifest || (await this.hasMismatchedPeer(latestManifest))) {
// 'latest' is invalid so search for most recent matching package
const versionManifests = Object.values(packageMetadata.versions).filter(
value => !prerelease(value.version),
);
(value: PackageManifest) => !prerelease(value.version),
) as PackageManifest[];
versionManifests.sort((a, b) => rcompare(a.version, b.version, true));

View File

@ -33,11 +33,11 @@ ts_library(
# The attribute below is needed in g3 to turn off strict typechecking
# strict_checks = False,
deps = [
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/fast-json-stable-stringify",
"@npm//@types/node",
"@npm//ajv",
"@npm//magic-string",
"@npm//rxjs",
"@npm//source-map",
# @typings: es2015.core
# @typings: es2015.proxy
@ -80,8 +80,10 @@ jasmine_node_test(
# TODO: Audit tests to determine if tests can be run in RBE environments
local = True,
deps = [
"@npm//jasmine",
"@npm//source-map",
# @node_module: ajv
# @node_module: fast_json_stable_stringify
# @node_module: magic_string
# @node_module: source_map
],
)
@ -137,11 +139,12 @@ jasmine_node_test(
# TODO: Audit tests to determine if tests can be run in RBE environments
local = True,
deps = [
"@npm//chokidar",
"@npm//jasmine",
"@npm//source-map",
"@npm//temp",
"@npm//tslint",
"@npm//chokidar",
# @node_module: ajv
# @node_module: fast_json_stable_stringify
# @node_module: magic_string
# @node_module: temp
],
)

View File

@ -131,7 +131,7 @@ export default function (options: ServiceWorkerOptions): Rule {
let buildConfiguration;
if (options.configuration && buildTarget.configurations) {
buildConfiguration =
buildTarget.configurations[options.configuration] as BrowserBuilderOptions | undefined;
buildTarget.configurations[options.configuration] as unknown as BrowserBuilderOptions | undefined;
}
const config = buildConfiguration || buildOptions;

View File

@ -6,6 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {
JsonAstArray,
JsonParseMode,
dirname,
join,
@ -46,9 +47,9 @@ function addConfig(options: WebWorkerOptions, root: string, tsConfigPath: string
throw new SchematicsException('Invalid tsconfig "exclude" property; expected an array.');
}
if (filesAstNode && !filesAstNode.value.includes(workerGlob)) {
if (filesAstNode && !(filesAstNode as JsonAstArray).value.includes(workerGlob)) {
const recorder = host.beginUpdate(tsConfigPath);
appendValueInAstArray(recorder, filesAstNode, workerGlob);
appendValueInAstArray(recorder, filesAstNode as JsonAstArray, workerGlob);
host.commitUpdate(recorder);
}
}