-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(builtin): e2e tests for symlinked node_modules and hide-bazel-files
- Loading branch information
1 parent
e7d2fbd
commit 8cafe43
Showing
24 changed files
with
206 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import %workspace%/../../common.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_test") | ||
|
||
nodejs_test( | ||
name = "test", | ||
data = [ | ||
"@npm//typescript", | ||
], | ||
entry_point = ":main.js", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
workspace( | ||
name = "e2e_symlinked_node_modules_yarn", | ||
managed_directories = {"@npm": ["node_modules"]}, | ||
) | ||
|
||
local_repository( | ||
name = "build_bazel_rules_nodejs", | ||
path = "../../dist/build_bazel_rules_nodejs/release", | ||
) | ||
|
||
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_install") | ||
|
||
npm_install( | ||
name = "npm", | ||
package_json = "//:package.json", | ||
package_lock_json = "//:package-lock.json", | ||
quiet = False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const ts = require('typescript'); | ||
console.log('\nYour typescript version is', ts.version); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"dependencies": { | ||
"typescript": "2.9.1", | ||
"rxjs": "6.4.0" | ||
}, | ||
"devDependencies": { | ||
"@bazel/hide-bazel-files": "file:../../dist/npm_bazel_hide-bazel-files" | ||
}, | ||
"scripts": { | ||
"postinstall": "hide-bazel-files", | ||
"test": "bazel test ... && rm -rf node_modules && bazel test ... && rm -rf node_modules && yarn install && bazel test ..." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@bazel/hide-bazel-files@file:../../dist/npm_bazel_hide-bazel-files": | ||
version "0.31.1-16-g4196fa7" | ||
|
||
[email protected]: | ||
version "6.4.0" | ||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" | ||
integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== | ||
dependencies: | ||
tslib "^1.9.0" | ||
|
||
tslib@^1.9.0: | ||
version "1.10.0" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" | ||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== | ||
|
||
[email protected]: | ||
version "2.9.1" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" | ||
integrity sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import %workspace%/../../common.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_test") | ||
|
||
nodejs_test( | ||
name = "test", | ||
data = [ | ||
"@npm//typescript", | ||
], | ||
entry_point = ":main.js", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
workspace( | ||
name = "e2e_symlinked_node_modules_yarn", | ||
managed_directories = {"@npm": ["node_modules"]}, | ||
) | ||
|
||
local_repository( | ||
name = "build_bazel_rules_nodejs", | ||
path = "../../dist/build_bazel_rules_nodejs/release", | ||
) | ||
|
||
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install") | ||
|
||
yarn_install( | ||
name = "npm", | ||
package_json = "//:package.json", | ||
quiet = False, | ||
yarn_lock = "//:yarn.lock", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const ts = require('typescript'); | ||
console.log('\nYour typescript version is', ts.version); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"dependencies": { | ||
"typescript": "2.9.1", | ||
"rxjs": "6.4.0" | ||
}, | ||
"devDependencies": { | ||
"@bazel/hide-bazel-files": "file:../../dist/npm_bazel_hide-bazel-files" | ||
}, | ||
"scripts": { | ||
"postinstall": "hide-bazel-files", | ||
"test": "bazel test ... && rm -rf node_modules && bazel test ... && rm -rf node_modules && yarn install && bazel test ..." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@bazel/hide-bazel-files@file:../../dist/npm_bazel_hide-bazel-files": | ||
version "0.31.1-16-g4196fa7" | ||
|
||
[email protected]: | ||
version "6.4.0" | ||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504" | ||
integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw== | ||
dependencies: | ||
tslib "^1.9.0" | ||
|
||
tslib@^1.9.0: | ||
version "1.10.0" | ||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" | ||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== | ||
|
||
[email protected]: | ||
version "2.9.1" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" | ||
integrity sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2018 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 = "npm_bazel_hide_bazel_files") | ||
|
||
local_repository( | ||
name = "build_bazel_rules_nodejs", | ||
path = "../..", | ||
) | ||
|
||
# Pull in build_bazel_rules_nodejs dev dependencies which are | ||
# needed for generating documentation | ||
load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dev_dependencies") | ||
|
||
rules_nodejs_dev_dependencies() | ||
|
||
load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") | ||
|
||
node_repositories() |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters