From ee1a09351899c7b45a779edc49cc8ba1e1643ed5 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 15 Apr 2019 14:39:10 -0700 Subject: [PATCH] build: update jasmine_node_test rules to come from npm --- .circleci/config.yml | 13 ++++++++++--- package.json | 3 +-- packages/angular_devkit/benchmark/BUILD | 3 ++- packages/angular_devkit/build_optimizer/BUILD | 3 ++- packages/angular_devkit/core/BUILD | 3 ++- packages/angular_devkit/schematics/BUILD | 3 ++- packages/schematics/angular/BUILD | 2 +- packages/schematics/schematics/BUILD | 2 -- packages/schematics/update/BUILD | 3 ++- scripts/validate-licenses.ts | 1 + yarn.lock | 9 ++++++++- 11 files changed, 31 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bb1bdea29fca..79d6808dc248 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,14 +13,15 @@ # If you change the cache key prefix, also sync the restore_cache fallback to match. # Keep the static part of the cache key as prefix to enable correct fallbacks. # See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI. -var_1: &docker_image circleci/node:10.12 -var_2: &cache_key angular_devkit-0.10.0-{{ checksum "yarn.lock" }} +var_1: &default_docker_image circleci/node:10.12 +var_2: &browsers_docker_image circleci/node:10.12-browsers +var_3: &cache_key angular_devkit-0.10.0-{{ checksum "yarn.lock" }} # Settings common to each job anchor_1: &defaults working_directory: ~/ng docker: - - image: *docker_image + - image: *default_docker_image # After checkout, rebase on top of target branch. anchor_2: &post_checkout @@ -89,6 +90,8 @@ jobs: test-large: <<: *defaults + docker: + - image: *browsers_docker_image resource_class: large parallelism: 4 steps: @@ -98,6 +101,8 @@ jobs: e2e-cli: <<: *defaults + docker: + - image: *browsers_docker_image environment: BASH_ENV: ~/.profile NPM_CONFIG_PREFIX: ~/.npm-global @@ -112,6 +117,8 @@ jobs: e2e-cli-ivy: <<: *defaults + docker: + - image: *browsers_docker_image environment: BASH_ENV: ~/.profile NPM_CONFIG_PREFIX: ~/.npm-global diff --git a/package.json b/package.json index 580c2cdc4716..1b996eb2b8d7 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,6 @@ "build-tsc": "tsc -p tsconfig.json", "fix": "npm run admin -- lint --fix", "lint": "npm run admin -- lint", - "prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier", - "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", "templates": "node ./bin/devkit-admin templates", "test": "node ./bin/devkit-admin test", "test-large": "node ./bin/devkit-admin test --large --spec-reporter", @@ -85,6 +83,7 @@ "@angular/compiler-cli": "^8.0.0-beta.12", "@bazel/bazel": "0.24.1", "@bazel/buildifier": "^0.22.0", + "@bazel/jasmine": "~0.26.0", "@bazel/karma": "~0.26.0", "@bazel/typescript": "~0.26.0", "@ngtools/json-schema": "^1.1.0", diff --git a/packages/angular_devkit/benchmark/BUILD b/packages/angular_devkit/benchmark/BUILD index b1a4160c7e4e..423c6a642125 100644 --- a/packages/angular_devkit/benchmark/BUILD +++ b/packages/angular_devkit/benchmark/BUILD @@ -5,8 +5,9 @@ licenses(["notice"]) # MIT +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/build_optimizer/BUILD b/packages/angular_devkit/build_optimizer/BUILD index 602373f36e8c..03cc8af56aa7 100644 --- a/packages/angular_devkit/build_optimizer/BUILD +++ b/packages/angular_devkit/build_optimizer/BUILD @@ -5,8 +5,9 @@ licenses(["notice"]) # MIT +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") package(default_visibility = ["//visibility:public"]) diff --git a/packages/angular_devkit/core/BUILD b/packages/angular_devkit/core/BUILD index 33930c4bc806..7466504a7b1d 100644 --- a/packages/angular_devkit/core/BUILD +++ b/packages/angular_devkit/core/BUILD @@ -4,8 +4,9 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") licenses(["notice"]) # MIT License diff --git a/packages/angular_devkit/schematics/BUILD b/packages/angular_devkit/schematics/BUILD index 0732766c5afa..41d0462cca05 100644 --- a/packages/angular_devkit/schematics/BUILD +++ b/packages/angular_devkit/schematics/BUILD @@ -4,8 +4,9 @@ # found in the LICENSE file at https://angular.io/license package(default_visibility = ["//visibility:public"]) +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package") +load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package") licenses(["notice"]) # MIT License diff --git a/packages/schematics/angular/BUILD b/packages/schematics/angular/BUILD index 4cde533fc2d0..d019922a14b8 100644 --- a/packages/schematics/angular/BUILD +++ b/packages/schematics/angular/BUILD @@ -5,8 +5,8 @@ licenses(["notice"]) # MIT +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/schematics/schematics/BUILD b/packages/schematics/schematics/BUILD index 2ed5ded5e831..2534b7fbcb9c 100644 --- a/packages/schematics/schematics/BUILD +++ b/packages/schematics/schematics/BUILD @@ -6,8 +6,6 @@ licenses(["notice"]) # MIT load("@npm_bazel_typescript//:defs.bzl", "ts_library") - -# load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) diff --git a/packages/schematics/update/BUILD b/packages/schematics/update/BUILD index a34004461e64..dc2b8c99d7e0 100644 --- a/packages/schematics/update/BUILD +++ b/packages/schematics/update/BUILD @@ -5,8 +5,8 @@ licenses(["notice"]) # MIT +load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") load("@npm_bazel_typescript//:defs.bzl", "ts_library") -load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") load("//tools:ts_json_schema.bzl", "ts_json_schema") package(default_visibility = ["//visibility:public"]) @@ -30,6 +30,7 @@ ts_library( "@npm//@types/node", "@npm//@types/semver", "@npm//rxjs", + "@npm//semver", ], ) diff --git a/scripts/validate-licenses.ts b/scripts/validate-licenses.ts index 40b8f0bce473..c0c7a82ff82c 100644 --- a/scripts/validate-licenses.ts +++ b/scripts/validate-licenses.ts @@ -80,6 +80,7 @@ const ignoredPackages = [ '@bazel/bazel-linux_x64@0.24.1', '@bazel/buildifier@0.22.0', '@bazel/buildifier-linux_x64@0.22.0', + '@bazel/jasmine@0.26.0', // * Other 'font-awesome@4.7.0', // (OFL-1.1 AND MIT) diff --git a/yarn.lock b/yarn.lock index aae035b0edb8..3c15277ffd76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -230,6 +230,13 @@ "@bazel/buildifier-darwin_x64" "0.22.0" "@bazel/buildifier-linux_x64" "0.22.0" +"@bazel/jasmine@~0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@bazel/jasmine/-/jasmine-0.26.0.tgz#f7aed169b057b5af547d2573657b394ecbda0b5d" + integrity sha512-lkvzPHdbSEe1zitnV1hIBwodriXqp/ClHSZQJ5Y486UaLQ6Sm7k7gV2phOwtg7LqLVZnElZDmFLSI0/O1UYYyQ== + dependencies: + jasmine "~3.3.1" + "@bazel/karma@~0.26.0": version "0.26.0" resolved "https://registry.yarnpkg.com/@bazel/karma/-/karma-0.26.0.tgz#6ad796686f5775df33a96fa5ef3df76a66aed3b2" @@ -5247,7 +5254,7 @@ jasmine@2.8.0: glob "^7.0.6" jasmine-core "~2.8.0" -jasmine@^3.3.1: +jasmine@^3.3.1, jasmine@~3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/jasmine/-/jasmine-3.3.1.tgz#d61bb1dd8888859bd11ea83074a78ee13d949905" integrity sha512-/vU3/H7U56XsxIXHwgEuWpCgQ0bRi2iiZeUpx7Nqo8n1TpoDHfZhkPIc7CO8I4pnMzYsi3XaSZEiy8cnTfujng==