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:
Alex Eagle
2018-03-07 11:26:11 -08:00
committed by Kara Erickson
parent b26a90567c
commit 1e6cc42a01
33 changed files with 207 additions and 237 deletions

View File

@ -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",
],
)

View File

@ -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';

View File

@ -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 = [

View File

@ -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',
};

View File

@ -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';
/**

View File

@ -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"