test: migrate remaining public-api tests to Bazel (#22639)
We now create npm packages to cover all the public api assertions in tools/public_api_guard. We no longer depend on ts-api-guardian from npm - it is now stale since the repository was archived. There is no longer a gulp task to enforce or accept the public API, this is in CircleCI as part of running all bazel test targets. PR Close #22639
This commit is contained in:
parent
b26a90567c
commit
1e6cc42a01
|
@ -43,7 +43,7 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
|||
readTypeScriptModules.ignoreExportsMatching = [/^[_ɵ]|^VERSION$/];
|
||||
readTypeScriptModules.hidePrivateMembers = true;
|
||||
|
||||
// NOTE: This list shold be in sync with tools/gulp-tasks/public-api.js
|
||||
// NOTE: This list shold be in sync with tools/public_api_guard/BUILD.bazel
|
||||
readTypeScriptModules.sourceFiles = [
|
||||
'animations/index.ts',
|
||||
'animations/browser/index.ts',
|
||||
|
|
|
@ -31,8 +31,6 @@ gulp.task('format:enforce', loadTask('format', 'enforce'));
|
|||
gulp.task('format', loadTask('format', 'format'));
|
||||
gulp.task('build.sh', loadTask('build', 'all'));
|
||||
gulp.task('build.sh:no-bundle', loadTask('build', 'no-bundle'));
|
||||
gulp.task('public-api:enforce', loadTask('public-api', 'enforce'));
|
||||
gulp.task('public-api:update', ['build.sh'], loadTask('public-api', 'update'));
|
||||
gulp.task('lint', ['format:enforce', 'validate-commit-messages', 'tslint']);
|
||||
gulp.task('tslint', ['tools:build'], loadTask('lint'));
|
||||
gulp.task('validate-commit-messages', loadTask('validate-commit-message'));
|
||||
|
|
|
@ -100,7 +100,6 @@
|
|||
"source-map": "0.5.7",
|
||||
"source-map-support": "0.4.18",
|
||||
"systemjs": "0.18.10",
|
||||
"ts-api-guardian": "^0.3.0",
|
||||
"tsickle": "0.26.0",
|
||||
"tslint": "5.7.0",
|
||||
"tslint-eslint-rules": "4.1.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "animations",
|
||||
|
@ -15,3 +15,18 @@ ng_module(
|
|||
"//packages/core",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/animations/index.js",
|
||||
secondary_entry_points = [
|
||||
"browser",
|
||||
"browser/testing",
|
||||
],
|
||||
deps = [
|
||||
":animations",
|
||||
"//packages/animations/browser",
|
||||
"//packages/animations/browser/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
export {Animation as ɵAnimation} from './dsl/animation';
|
||||
export {AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer} from './dsl/style_normalization/animation_style_normalizer';
|
||||
export {WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer} from './dsl/style_normalization/web_animations_style_normalizer';
|
||||
export {NoopAnimationDriver as ɵNoopAnimationDriver} from './render/animation_driver';
|
||||
export {AnimationDriver as ɵAnimationDriver, NoopAnimationDriver as ɵNoopAnimationDriver} from './render/animation_driver';
|
||||
export {AnimationEngine as ɵAnimationEngine} from './render/animation_engine_next';
|
||||
export {CssKeyframesDriver as ɵCssKeyframesDriver} from './render/css_keyframes/css_keyframes_driver';
|
||||
export {CssKeyframesPlayer as ɵCssKeyframesPlayer} from './render/css_keyframes/css_keyframes_player';
|
||||
export {containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, matchesElement as ɵmatchesElement, validateStyleProperty as ɵvalidateStyleProperty} from './render/shared';
|
||||
export {WebAnimationsDriver as ɵWebAnimationsDriver, supportsWebAnimations as ɵsupportsWebAnimations} from './render/web_animations/web_animations_driver';
|
||||
export {WebAnimationsPlayer as ɵWebAnimationsPlayer} from './render/web_animations/web_animations_player';
|
||||
export {allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge} from './util';
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/animations/browser/testing",
|
||||
deps = [
|
||||
|
|
|
@ -12,6 +12,7 @@ const sourcemaps = require('rollup-plugin-sourcemaps');
|
|||
const globals = {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/animations': 'ng.animations',
|
||||
'@angular/animations/browser': 'ng.animations.browser',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
};
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {AUTO_STYLE, AnimationPlayer, NoopAnimationPlayer, ɵStyleData} from '@angular/animations';
|
||||
|
||||
import {AnimationDriver} from '../../src/render/animation_driver';
|
||||
import {containsElement, invokeQuery, matchesElement, validateStyleProperty} from '../../src/render/shared';
|
||||
import {allowPreviousPlayerStylesMerge} from '../../src/util';
|
||||
import {ɵAnimationDriver as AnimationDriver, ɵallowPreviousPlayerStylesMerge as allowPreviousPlayerStylesMerge, ɵcontainsElement as containsElement, ɵinvokeQuery as invokeQuery, ɵmatchesElement as matchesElement, ɵvalidateStyleProperty as validateStyleProperty} from '@angular/animations/browser';
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"rootDir": "../../",
|
||||
"paths": {
|
||||
"@angular/animations": ["../../../../dist/packages/animations"],
|
||||
"@angular/animations/browser": ["../../../../dist/packages/animations/browser"],
|
||||
"@angular/core": ["../../../../dist/packages/core"]
|
||||
},
|
||||
"outDir": "../../../../dist/packages/animations"
|
||||
|
|
|
@ -16,28 +16,41 @@ load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "ESM5Info")
|
|||
# TODO(alexeagle): this list is incomplete, add more as material ramps up
|
||||
WELL_KNOWN_GLOBALS = {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/core/testing": "ng.core.testing",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/compiler/testing": "ng.compiler.testing",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/platform-browser/testing": "ng.platformBrowser.testing",
|
||||
"@angular/platform-browser-dynamic": "ng.platformBrowserDynamic",
|
||||
}
|
||||
WELL_KNOWN_GLOBALS.update({"rxjs/%s" % s: "Rx" for s in [
|
||||
"BehaviorSubject",
|
||||
"ConnectableObservable",
|
||||
"Observable",
|
||||
"Observer",
|
||||
"Subject",
|
||||
"Subscription",
|
||||
"ReplaySubject",
|
||||
"util/EmptyError",
|
||||
]})
|
||||
WELL_KNOWN_GLOBALS.update({"rxjs/observable/%s" % s: "Rx.Observable" for s in [
|
||||
"concat",
|
||||
"defer",
|
||||
"from",
|
||||
"fromEvent",
|
||||
"fromPromise",
|
||||
"forkJoin",
|
||||
"merge",
|
||||
"never",
|
||||
"of",
|
||||
"throw",
|
||||
]})
|
||||
WELL_KNOWN_GLOBALS.update({"rxjs/operator/%s" % s: "Rx.Observable.prototype" for s in [
|
||||
"catch",
|
||||
"concatAll",
|
||||
"concatMap",
|
||||
"do",
|
||||
"every",
|
||||
"first",
|
||||
"filter",
|
||||
|
@ -45,8 +58,12 @@ WELL_KNOWN_GLOBALS.update({"rxjs/operator/%s" % s: "Rx.Observable.prototype" for
|
|||
"map",
|
||||
"mergeAll",
|
||||
"mergeMap",
|
||||
"publish",
|
||||
"reduce",
|
||||
"share",
|
||||
"startWith",
|
||||
"switchMap",
|
||||
"take",
|
||||
"toPromise",
|
||||
]})
|
||||
|
||||
|
@ -238,7 +255,7 @@ def ng_package_outputs(name, entry_point):
|
|||
# we assume the files should be named "package.*.js"
|
||||
basename = entry_point.split("/")[-2] if entry_point.find("/") >=0 else name
|
||||
return {
|
||||
"fesm5": "%s.js" % basename,
|
||||
"fesm5": "fesm5/%s.js" % basename,
|
||||
"fesm2015": "fesm2015/%s.js" % basename,
|
||||
"umd": "%s.umd.js" % basename,
|
||||
"umd_min": "%s.umd.min.js" % basename,
|
||||
|
|
|
@ -19,6 +19,7 @@ ng_module(
|
|||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/common/index.js",
|
||||
secondary_entry_points = [
|
||||
"testing",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ts_library")
|
||||
load("//tools:defaults.bzl", "ts_library", "ng_package")
|
||||
|
||||
ts_library(
|
||||
name = "compiler",
|
||||
|
@ -12,3 +12,16 @@ ts_library(
|
|||
),
|
||||
module_name = "@angular/compiler",
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/compiler/compiler.js",
|
||||
secondary_entry_points = [
|
||||
"testing",
|
||||
],
|
||||
deps = [
|
||||
":compiler",
|
||||
"//packages/compiler/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ts_library")
|
|||
|
||||
ts_library(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/compiler/testing",
|
||||
deps = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "forms",
|
||||
|
@ -17,3 +17,12 @@ ng_module(
|
|||
"@rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/forms/index.js",
|
||||
deps = [
|
||||
":forms",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "http",
|
||||
|
@ -17,3 +17,16 @@ ng_module(
|
|||
"@rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/http/index.js",
|
||||
secondary_entry_points = [
|
||||
"testing",
|
||||
],
|
||||
deps = [
|
||||
":http",
|
||||
"//packages/http/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/http/testing",
|
||||
deps = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "platform-browser-dynamic",
|
||||
|
@ -19,3 +19,16 @@ ng_module(
|
|||
"//packages/platform-browser",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/platform-browser-dynamic/index.js",
|
||||
secondary_entry_points = [
|
||||
"testing",
|
||||
],
|
||||
deps = [
|
||||
":platform-browser-dynamic",
|
||||
"//packages/platform-browser-dynamic/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-browser-dynamic/testing",
|
||||
deps = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "platform-browser",
|
||||
|
@ -17,3 +17,18 @@ ng_module(
|
|||
"//packages/core",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/platform-browser/index.js",
|
||||
secondary_entry_points = [
|
||||
"animations",
|
||||
"testing",
|
||||
],
|
||||
deps = [
|
||||
":platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/platform-browser/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-browser/testing",
|
||||
deps = [
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "platform-server",
|
||||
|
@ -24,3 +24,16 @@ ng_module(
|
|||
"@rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/platform-server/index.js",
|
||||
secondary_entry_points = [
|
||||
"testing",
|
||||
],
|
||||
deps = [
|
||||
":platform-server",
|
||||
"//packages/platform-server/testing",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ load("//tools:defaults.bzl", "ng_module")
|
|||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
testonly = 1,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/platform-server/testing",
|
||||
deps = [
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ts_library")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ts_library(
|
||||
ng_module(
|
||||
name = "platform-webworker-dynamic",
|
||||
srcs = glob(
|
||||
[
|
||||
|
@ -19,3 +19,10 @@ ts_library(
|
|||
"//packages/platform-browser-dynamic",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/platform-webworker-dynamic/index.js",
|
||||
deps = [":platform-webworker-dynamic"],
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "platform-webworker",
|
||||
|
@ -19,3 +19,12 @@ ng_module(
|
|||
"//packages/platform-browser",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/platform-webworker/index.js",
|
||||
deps = [
|
||||
":platform-webworker",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "service-worker",
|
||||
|
@ -17,3 +17,14 @@ ng_module(
|
|||
"@rxjs",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/service-worker/index.js",
|
||||
secondary_entry_points = ["config"],
|
||||
deps = [
|
||||
":service-worker",
|
||||
"//packages/service-worker/config",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
|
||||
ng_module(
|
||||
name = "config",
|
||||
srcs = glob([
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
]),
|
||||
deps = ["//packages/core"],
|
||||
)
|
|
@ -1,6 +1,6 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
load("//tools:defaults.bzl", "ng_module", "ng_package")
|
||||
|
||||
ng_module(
|
||||
name = "upgrade",
|
||||
|
@ -17,3 +17,16 @@ ng_module(
|
|||
"//packages/platform-browser-dynamic",
|
||||
],
|
||||
)
|
||||
|
||||
ng_package(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
entry_point = "packages/upgrade/index.js",
|
||||
secondary_entry_points = [
|
||||
"static",
|
||||
],
|
||||
deps = [
|
||||
":upgrade",
|
||||
"//packages/upgrade/static",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load("//tools:defaults.bzl", "ts_library")
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
|
||||
ts_library(
|
||||
ng_module(
|
||||
name = "static",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
module_name = "@angular/upgrade/static",
|
||||
|
|
|
@ -13,12 +13,6 @@ travisFoldStart "test.e2e.buildPackages"
|
|||
./build.sh
|
||||
travisFoldEnd "test.e2e.buildPackages"
|
||||
|
||||
|
||||
travisFoldStart "test.e2e.publicApi"
|
||||
$(npm bin)/gulp public-api:enforce
|
||||
travisFoldEnd "test.e2e.publicApi"
|
||||
|
||||
|
||||
travisFoldStart "test.e2e.check-cycle"
|
||||
$(npm bin)/gulp check-cycle
|
||||
travisFoldEnd "test.e2e.check-cycle"
|
||||
|
|
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// NOTE: This list shold be in sync with aio/tools/transforms/angular-api-package/index.js
|
||||
// NOTE: Some packages have moved to Bazel; these are tested in tools/public_api_guard/BUILD.bazel
|
||||
const entrypoints = [
|
||||
'dist/packages-dist/animations/animations.d.ts',
|
||||
'dist/packages-dist/animations/browser.d.ts',
|
||||
'dist/packages-dist/animations/browser/testing.d.ts',
|
||||
// The API surface of the compiler is currently unstable - all of the important APIs are exposed
|
||||
// via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead.
|
||||
//'dist/packages-dist/compiler/index.d.ts',
|
||||
//'dist/packages-dist/compiler/testing.d.ts',
|
||||
'dist/packages-dist/forms/forms.d.ts',
|
||||
'dist/packages-dist/http/http.d.ts',
|
||||
'dist/packages-dist/http/testing.d.ts',
|
||||
'dist/packages-dist/platform-browser/platform-browser.d.ts',
|
||||
'dist/packages-dist/platform-browser/animations.d.ts',
|
||||
'dist/packages-dist/platform-browser/testing.d.ts',
|
||||
'dist/packages-dist/platform-browser-dynamic/platform-browser-dynamic.d.ts',
|
||||
'dist/packages-dist/platform-browser-dynamic/testing.d.ts',
|
||||
'dist/packages-dist/platform-webworker/platform-webworker.d.ts',
|
||||
'dist/packages-dist/platform-webworker-dynamic/platform-webworker-dynamic.d.ts',
|
||||
'dist/packages-dist/platform-server/platform-server.d.ts',
|
||||
'dist/packages-dist/platform-server/testing.d.ts',
|
||||
'dist/packages-dist/service-worker/service-worker.d.ts',
|
||||
'dist/packages-dist/service-worker/config.d.ts',
|
||||
'dist/packages-dist/upgrade/upgrade.d.ts',
|
||||
'dist/packages-dist/upgrade/static.d.ts',
|
||||
];
|
||||
|
||||
const publicApiDir = 'tools/public_api_guard';
|
||||
const publicApiArgs = [
|
||||
'--rootDir',
|
||||
'dist/packages-dist',
|
||||
'--stripExportPattern',
|
||||
'^(__|ɵ)',
|
||||
'--allowModuleIdentifiers',
|
||||
'jasmine',
|
||||
'--allowModuleIdentifiers',
|
||||
'protractor',
|
||||
'--allowModuleIdentifiers',
|
||||
'angular',
|
||||
'--onStabilityMissing',
|
||||
'error',
|
||||
].concat(entrypoints);
|
||||
|
||||
module.exports = {
|
||||
|
||||
// Enforce that the public API matches the golden files
|
||||
// Note that these two commands work on built d.ts files instead of the source
|
||||
enforce: (gulp) => (done) => {
|
||||
const platformScriptPath = require('./platform-script-path');
|
||||
const childProcess = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
childProcess
|
||||
.spawn(
|
||||
path.join(__dirname, platformScriptPath(`../../node_modules/.bin/ts-api-guardian`)),
|
||||
['--verifyDir', path.normalize(publicApiDir)].concat(publicApiArgs), {stdio: 'inherit'})
|
||||
.on('close', (errorCode) => {
|
||||
if (errorCode !== 0) {
|
||||
done(new Error(
|
||||
'Public API differs from golden file. Please run `gulp public-api:update`.'));
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// Generate the public API golden files
|
||||
update: (gulp) => (done) => {
|
||||
const platformScriptPath = require('./platform-script-path');
|
||||
const childProcess = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
childProcess
|
||||
.spawn(
|
||||
path.join(__dirname, platformScriptPath(`../../node_modules/.bin/ts-api-guardian`)),
|
||||
['--outDir', path.normalize(publicApiDir)].concat(publicApiArgs), {stdio: 'inherit'})
|
||||
.on('close', done);
|
||||
}
|
||||
};
|
|
@ -1,7 +1,6 @@
|
|||
load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
||||
|
||||
[
|
||||
ts_api_guardian_test(
|
||||
[ts_api_guardian_test(
|
||||
name = "%s_%s_api" % (
|
||||
bundle[0],
|
||||
bundle[1].replace("/", "_"),
|
||||
|
@ -19,44 +18,9 @@ load("//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
|
|||
bundle[0],
|
||||
bundle[1],
|
||||
),
|
||||
)
|
||||
for bundle in [
|
||||
[
|
||||
"core",
|
||||
"core",
|
||||
],
|
||||
[
|
||||
"core",
|
||||
"testing",
|
||||
],
|
||||
[
|
||||
"common",
|
||||
"http/testing",
|
||||
],
|
||||
[
|
||||
"common",
|
||||
"common",
|
||||
],
|
||||
[
|
||||
"common",
|
||||
"http",
|
||||
],
|
||||
[
|
||||
"common",
|
||||
"testing",
|
||||
],
|
||||
[
|
||||
"router",
|
||||
"router",
|
||||
],
|
||||
[
|
||||
"router",
|
||||
"testing",
|
||||
],
|
||||
[
|
||||
"router",
|
||||
"upgrade",
|
||||
],
|
||||
# TODO(alexeagle): add remaining packages here once they have ng_package's
|
||||
]
|
||||
]
|
||||
) for bundle in [b[:-len(".d.ts")].split("/", 1) for b in glob(
|
||||
["**/*.d.ts"],
|
||||
# The API surface of the compiler is currently unstable - all of the important APIs are exposed
|
||||
# via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead.
|
||||
exclude = ["compiler/*"],
|
||||
)]]
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
/** @experimental */
|
||||
export declare class BrowserAnimationsTestingModule {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NoopAnimationsTestingModule {
|
||||
}
|
46
yarn.lock
46
yarn.lock
|
@ -288,12 +288,6 @@ ansi-styles@^2.2.1:
|
|||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
|
||||
|
||||
ansi-styles@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||
dependencies:
|
||||
color-convert "^1.9.0"
|
||||
|
||||
any-promise@^1.0.0, any-promise@^1.1.0, any-promise@~1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
|
||||
|
@ -1007,14 +1001,6 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
|
|||
strip-ansi "^3.0.0"
|
||||
supports-color "^2.0.0"
|
||||
|
||||
chalk@^2.3.1:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65"
|
||||
dependencies:
|
||||
ansi-styles "^3.2.1"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
char-spinner@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/char-spinner/-/char-spinner-1.0.1.tgz#e6ea67bd247e107112983b7ab0479ed362800081"
|
||||
|
@ -1175,16 +1161,6 @@ coffee-script@1.3.3:
|
|||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/coffee-script/-/coffee-script-1.3.3.tgz#150d6b4cb522894369efed6a2101c20bc7f4a4f4"
|
||||
|
||||
color-convert@^1.9.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
|
||||
dependencies:
|
||||
color-name "^1.1.1"
|
||||
|
||||
color-name@^1.1.1:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||
|
||||
colors@0.6.0-1:
|
||||
version "0.6.0-1"
|
||||
resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.0-1.tgz#6dbb68ceb8bc60f2b313dcc5ce1599f06d19e67a"
|
||||
|
@ -1975,10 +1951,6 @@ diff@^3.2.0:
|
|||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
|
||||
|
||||
diff@^3.4.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c"
|
||||
|
||||
doctrine@^0.7.2:
|
||||
version "0.7.2"
|
||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523"
|
||||
|
@ -3392,10 +3364,6 @@ has-flag@^1.0.0:
|
|||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
|
||||
|
||||
has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
|
||||
has-gulplog@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
|
||||
|
@ -6871,12 +6839,6 @@ supports-color@^3.1.0:
|
|||
dependencies:
|
||||
has-flag "^1.0.0"
|
||||
|
||||
supports-color@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
|
||||
dependencies:
|
||||
has-flag "^3.0.0"
|
||||
|
||||
symbol-observable@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
|
||||
|
@ -7139,14 +7101,6 @@ try-require@^1.0.0:
|
|||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/try-require/-/try-require-1.2.1.tgz#34489a2cac0c09c1cc10ed91ba011594d4333be2"
|
||||
|
||||
ts-api-guardian@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-api-guardian/-/ts-api-guardian-0.3.0.tgz#c5fbba9991840328f5ed0c89765a23e707645aa3"
|
||||
dependencies:
|
||||
chalk "^2.3.1"
|
||||
diff "^3.4.0"
|
||||
minimist "^1.2.0"
|
||||
|
||||
tsickle@0.26.0:
|
||||
version "0.26.0"
|
||||
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.26.0.tgz#40b30a2dd6abcb33b182e37596674bd1cfe4039c"
|
||||
|
|
Loading…
Reference in New Issue