blob: 3c0d910a16026084acf4360ce00635c36832e895 [file] [log] [blame]
# Copyright 2019 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.
workspace(
name = "examples_cypress",
managed_directories = {"@yarn": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "b011d6206e4e76696eda8287618a2b6375ff862317847cdbe38f8d0cd206e9ce",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.6.0/rules_nodejs-5.6.0.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
build_bazel_rules_nodejs_dependencies()
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")
node_repositories(
# Demonstrate that we can avoid using the "yarn" name if it's already in use
yarn_repository_name = "yarnpkg",
)
yarn_install(
name = "yarn",
# TODO(danmuller): figure out why this fails:
# ERROR: /private/tmp/tmp-96111FZPjEFtem0Q1/BUILD.bazel:38:17:
# no such target '@yarn//:node_modules/cypress/bin/cypress':
# target 'node_modules/cypress/bin/cypress' not declared in package '';
# however, a source file of this name exists.
# (Perhaps add 'exports_files(["node_modules/cypress/bin/cypress"])' to /BUILD?)
# defined by /private/var/tmp/_bazel_buildkite/123/external/yarn/BUILD.bazel and referenced by '//:test'
exports_directories_only = False,
package_json = "//:package.json",
# TODO(danmuller): figure out why this failes when symlink_node_modules = False
# Error: Cannot find module 'express'
# Require stack:
# - /home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/execroot/examples_cypress/bazel-out/k8-fastbuild/bin/plugin.js
# - /home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/execroot/examples_cypress/bazel-out/k8-fastbuild/bin/test_cypress_plugin_wrapper.js
# - /home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/external/cypress_linux/Cypress/resources/app/packages/server/lib/plugins/child/run_plugins.js
# - /home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/external/cypress_linux/Cypress/resources/app/packages/server/lib/plugins/child/index.js
# at Function.Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
# at Module._load (internal/modules/cjs/loader.js:732:27)
# at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
# at Module.require (internal/modules/cjs/loader.js:959:19)
# at require (internal/modules/cjs/helpers.js:88:18)
# at Object.<anonymous> (/home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/execroot/examples_cypress/bazel-out/k8-fastbuild/bin/plugin.js:3:15)
# at Module._compile (internal/modules/cjs/loader.js:1078:30)
# at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
# at Module.load (internal/modules/cjs/loader.js:935:32)
# at Module._load (internal/modules/cjs/loader.js:776:14)
# at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
# at Module.require (internal/modules/cjs/loader.js:959:19)
# at require (internal/modules/cjs/helpers.js:88:18)
# at Object.<anonymous> (/home/circleci/.cache/bazel/_bazel_circleci/8c1060db33a2856d02a15a3b1eefa1bb/execroot/examples_cypress/bazel-out/k8-fastbuild/bin/test_cypress_plugin_wrapper.js:10:20)
# at Module._compile (internal/modules/cjs/loader.js:1078:30)
# at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
symlink_node_modules = True,
yarn = "@yarnpkg//:bin/yarn",
yarn_lock = "//:yarn.lock",
)
load("@build_bazel_rules_nodejs//toolchains/cypress:cypress_repositories.bzl", "cypress_repositories")
cypress_repositories(
name = "cypress",
darwin_arm64_sha256 = "101a0ced77fb74b356800cb3a3919f5288d23cc63fdd39a0c500673159e954fc",
darwin_sha256 = "101a0ced77fb74b356800cb3a3919f5288d23cc63fdd39a0c500673159e954fc",
linux_sha256 = "d8ea8d16fed33fdae8f17178bcae076aaf532fa7ccb48f377df1f143e60abd59",
version = "7.3.0",
windows_sha256 = "8a8809e4fd22fe7bfc3103c39df3f4fce9db0964450ce927558e9a09558cb26c",
)