angular/integration/bazel/WORKSPACE
Paul Gschwendtner 831ede8bf4 build: update bazel setup to latest dev-infra package and rules_nodejs v4.2.0 (#43431)
Updates the Bazel setup to the latest shared dev-infra package. Also the
rules_nodejs version is updated to v4.2.0. We have landed various
changes that prepare us for the APF v13 implementation. e.g.

* Ability to control the linker mappings for the `ng_package` rule. This
will become important for using a transition that could accidentally
cause linker mappings that would otheriwse conflict.
* Use of latest version of rollup & terser in the Bazel rules the
  dev-infra package exposes. This is necessary for ES2020 support.

PR Close #43431
2021-10-01 18:28:41 +00:00

66 lines
2.1 KiB
Text

workspace(name = "bazel_integration_test")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)
# Fetch sass rules for compiling sass files
http_archive(
name = "io_bazel_rules_sass",
sha256 = "b17f129f0bec33b6ebefe53d51f0b7b80963835ad940b388eea4628e9d5835e7",
strip_prefix = "rules_sass-1.41.1",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/1.41.1.zip",
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.41.1.zip",
],
)
# Check the bazel version and download npm dependencies
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
# Setup the Node.js toolchain
node_repositories(
# Use same node version as root angular WORKSPACE since
node_version = "14.16.1",
yarn_version = "1.12.1",
)
# Install our npm dependencies into @npm
yarn_install(
name = "npm",
frozen_lockfile = False,
package_json = "//:package.json",
# Turn off symlink_node_modules here as it causes flakiness with missing
# files in node_modules.
# TODO: track down the root cause of the flakiness; current suspect is that
# it is an issue with managed_directories when resources are limited
symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)
# Load protractor dependencies
load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
npm_bazel_protractor_dependencies()
# Setup the rules_webtesting toolchain
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
web_test_repositories()
load("@io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl", "browser_repositories")
browser_repositories(
chromium = True,
firefox = True,
)
# Setup the rules_sass toolchain
load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")
sass_repositories()