From 6d731cf9ca377b61661795e120b172eb1e2187f7 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 18 Dec 2019 22:21:04 -0800 Subject: [PATCH] refactor(builtin): remove legacy jasmine_node_test BREAKING CHANGE: legacy @build_bazel_rules_nodejs//internal/jasmine_node_test removed; use jasmine_node_test from @bazel/jasmine npm package instead --- BUILD.bazel | 2 - index.bzl | 2 - internal/jasmine_node_test/BUILD.bazel | 34 ------------- .../jasmine_node_test/jasmine_node_test.bzl | 48 ------------------- 4 files changed, 86 deletions(-) delete mode 100644 internal/jasmine_node_test/BUILD.bazel delete mode 100644 internal/jasmine_node_test/jasmine_node_test.bzl diff --git a/BUILD.bazel b/BUILD.bazel index 63f354e9e9..49388b5952 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -45,7 +45,6 @@ bzl_library( visibility = ["//visibility:public"], deps = [ "//internal/common:bzl", - "//internal/jasmine_node_test:bzl", "//internal/linker:bzl", "//internal/pkg_npm:bzl", "//internal/pkg_web:bzl", @@ -80,7 +79,6 @@ pkg_npm( "//internal/common:package_contents", "//internal/copy_repository:package_contents", "//internal/golden_file_test:package_contents", - "//internal/jasmine_node_test:package_contents", "//internal/js_library:package_contents", "//internal/linker:package_contents", "//internal/node:package_contents", diff --git a/index.bzl b/index.bzl index 1097836363..94526cc38f 100644 --- a/index.bzl +++ b/index.bzl @@ -20,7 +20,6 @@ Users should not load files under "/internal" load("//internal/common:check_bazel_version.bzl", _check_bazel_version = "check_bazel_version") load("//internal/common:check_version.bzl", "check_version") load("//internal/common:copy_to_bin.bzl", _copy_to_bin = "copy_to_bin") -load("//internal/jasmine_node_test:jasmine_node_test.bzl", _jasmine_node_test = "jasmine_node_test") load( "//internal/node:node.bzl", _nodejs_binary = "nodejs_binary", @@ -36,7 +35,6 @@ check_bazel_version = _check_bazel_version nodejs_binary = _nodejs_binary nodejs_test = _nodejs_test node_repositories = _node_repositories -jasmine_node_test = _jasmine_node_test pkg_npm = _pkg_npm npm_package_bin = _npm_bin pkg_web = _pkg_web diff --git a/internal/jasmine_node_test/BUILD.bazel b/internal/jasmine_node_test/BUILD.bazel deleted file mode 100644 index b86b11d208..0000000000 --- a/internal/jasmine_node_test/BUILD.bazel +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") - -package(default_visibility = ["//visibility:public"]) - -bzl_library( - name = "bzl", - srcs = glob(["*.bzl"]), - visibility = ["//visibility:public"], -) - -exports_files([ - # Exported to be consumed for generating skydoc. - "jasmine_node_test.bzl", -]) - -filegroup( - name = "package_contents", - srcs = glob(["*"]), - visibility = ["//:__pkg__"], -) diff --git a/internal/jasmine_node_test/jasmine_node_test.bzl b/internal/jasmine_node_test/jasmine_node_test.bzl deleted file mode 100644 index c7edd71642..0000000000 --- a/internal/jasmine_node_test/jasmine_node_test.bzl +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2017 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""NodeJS testing - -These rules let you run tests outside of a browser. This is typically faster -than launching a test in Karma, for example. -""" - -def jasmine_node_test( - name, - srcs = [], - data = [], - deps = [], - expected_exit_code = 0, - tags = [], - **kwargs): - """Runs tests in NodeJS using the Jasmine test runner. - - To debug the test, see debugging notes in `nodejs_test`. - - Args: - name: name of the resulting label - srcs: JavaScript source files containing Jasmine specs - data: Runtime dependencies which will be loaded while the test executes - deps: Other targets which produce JavaScript, such as ts_library - expected_exit_code: The expected exit code for the test. - tags: bazel tags applied to test - **kwargs: remaining arguments are passed to the test rule - """ - - fail(""" - ERROR: @build_bazel_rules_nodejs no longer provides jasmine_node_test - Instead, add a devDependency on @bazel/jasmine - and change the load statement to - load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test") - """)