fix(schematics): do not publish testing utilities to npm (#13633)

This commit is contained in:
Paul Gschwendtner
2018-10-16 21:40:53 +02:00
committed by Joey Perrott
parent 240acf6a57
commit ef429c44a8
15 changed files with 35 additions and 17 deletions
+4 -5
View File
@@ -19,7 +19,8 @@ ts_library(
srcs = glob(["**/*.ts"], exclude=[
"**/files/**/*.ts",
"**/*.spec.ts",
"ng-update/test-cases/**/*",
"ng-update/test-cases/**/*.ts",
"testing/**/*.ts"
]),
tsconfig = ":tsconfig.json",
deps = [
@@ -28,11 +29,8 @@ ts_library(
# TODO(devversion): Only include jasmine for test sources (See: tsconfig types).
"@npm//@types/jasmine",
"@npm//@types/node",
# TODO(devversion): Similarly to "jasmine", we need to extract these into testing only.
"@npm//fs-extra",
"@npm//glob",
"@npm//parse5",
"@npm//rxjs",
"@npm//tslint",
"@npm//typescript"
],
@@ -58,7 +56,7 @@ ts_library(
name = "schematics_test_sources",
srcs = glob(["**/*.spec.ts"], exclude = ["**/files/**/*.spec.ts"]),
deps = [
":schematics",
"//src/cdk/schematics/testing",
"@npm//@schematics/angular",
"@npm//@angular-devkit/schematics",
"@npm//@types/jasmine",
@@ -66,6 +64,7 @@ ts_library(
"@npm//mock-fs",
"@npm//tslint",
"@npm//typescript",
":schematics",
],
tsconfig = ":tsconfig.json",
testonly = True,
-1
View File
@@ -7,5 +7,4 @@
*/
export * from './utils';
export * from './testing';
export * from './ng-update/public-api';
+18
View File
@@ -0,0 +1,18 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "testing",
module_name = "@angular/cdk/schematics/testing",
srcs = glob(["**/*.ts"]),
deps = [
"@npm//@angular-devkit/core",
"@npm//@angular-devkit/schematics",
"@npm//@schematics/angular",
"@npm//@types/node",
"@npm//@types/fs-extra",
"@npm//fs-extra",
"@npm//rxjs",
],
)
+2 -1
View File
@@ -20,7 +20,8 @@
"exclude": [
"**/files/**/*",
"**/*.spec.ts",
"ng-update/test-cases/**/*"
"ng-update/test-cases/**/*",
"testing/**/*.ts"
],
"bazelOptions": {
"suppressTsconfigOverrideWarnings": true
+1
View File
@@ -53,6 +53,7 @@ ts_library(
deps = [
":schematics",
"//src/cdk/schematics",
"//src/cdk/schematics/testing",
"@npm//@schematics/angular",
"@npm//@angular-devkit/schematics",
"@npm//@types/jasmine",
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';
+1 -1
View File
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';
+1 -1
View File
@@ -1,7 +1,7 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {Schema} from './schema';
import {getFileContent} from '@schematics/angular/utility/test';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
describe('material-nav-schematic', () => {
let runner: SchematicTestRunner;
+1 -1
View File
@@ -4,11 +4,11 @@ import {Tree} from '@angular-devkit/schematics';
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {
addModuleImportToRootModule,
createTestApp,
getProjectFromWorkspace,
getProjectStyleFile,
getProjectTargetOptions,
} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getWorkspace} from '@schematics/angular/utility/config';
import {getFileContent} from '@schematics/angular/utility/test';
import {getIndexHtmlPath} from './fonts/project-index-html';
@@ -1,5 +1,5 @@
import {migrationCollection} from '../index.spec';
import {runTestCases} from '@angular/cdk/schematics';
import {runTestCases} from '@angular/cdk/schematics/testing';
describe('constructor checks', () => {
@@ -1,4 +1,4 @@
import {runTestCases} from '@angular/cdk/schematics';
import {runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from '../index.spec';
describe('v6 import misc checks', () => {
@@ -1,5 +1,5 @@
import {join} from 'path';
import {readFileContent, runTestCases} from '@angular/cdk/schematics';
import {readFileContent, runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from './index.spec';
describe('v6 upgrade test cases', () => {
@@ -1,5 +1,5 @@
import {join} from 'path';
import {readFileContent, runTestCases} from '@angular/cdk/schematics';
import {readFileContent, runTestCases} from '@angular/cdk/schematics/testing';
import {migrationCollection} from './index.spec';
describe('v7 upgrade test cases', () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';
+1 -1
View File
@@ -1,5 +1,5 @@
import {SchematicTestRunner} from '@angular-devkit/schematics/testing';
import {createTestApp} from '@angular/cdk/schematics';
import {createTestApp} from '@angular/cdk/schematics/testing';
import {getFileContent} from '@schematics/angular/utility/test';
import {Schema} from './schema';