Skip to content

Commit

Permalink
Prototype of symlinking user node_modules in yarn_install & npm_install
Browse files Browse the repository at this point in the history
.
  • Loading branch information
gregmagolan committed May 9, 2019
1 parent c00c2a0 commit 917d005
Show file tree
Hide file tree
Showing 45 changed files with 4,531 additions and 452 deletions.
8 changes: 8 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
node_modules
examples/program/node_modules
internal/history-server/node_modules
internal/http-server/node_modules
internal/npm_install/test/package/node_modules
internal/npm_install/node_modules
internal/rollup/node_modules
internal/web_package/node_modules
dist
# Each e2e test is a nested workspace
e2e/
Expand All @@ -11,6 +16,9 @@ packages/
# A subset of legacy e2e tests are nested workspaces
# TODO(gregmagolan): move these to /e2e
internal/e2e/bazel_workspaces_compat
internal/e2e/fine_grained_deps/npm/node_modules
internal/e2e/fine_grained_deps/yarn/node_modules
internal/e2e/fine_grained_no_bin/node_modules
internal/e2e/fine_grained_symlinks
internal/e2e/node_loader_no_preserve_symlinks
internal/e2e/node_loader_preserve_symlinks
Expand Down
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
23 changes: 0 additions & 23 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,6 @@ node_repositories(

yarn_install(
name = "npm",
data = [
"@build_bazel_rules_nodejs//:tools/npm_packages/hello/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/hello/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_2/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_2/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_3/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_3/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_4/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_index_4/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_main/main.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_main/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_main_2/main.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_main_2/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_nested_main/nested/main.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_nested_main/nested/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/node_resolve_nested_main/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/test_workspace/BUILD.bazel",
"@build_bazel_rules_nodejs//:tools/npm_packages/test_workspace/index.js",
"@build_bazel_rules_nodejs//:tools/npm_packages/test_workspace/package.json",
"@build_bazel_rules_nodejs//:tools/npm_packages/test_workspace/subdir/BUILD.bazel",
"@build_bazel_rules_nodejs//:tools/npm_packages/test_workspace/subdir/index.js",
],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
Expand Down
4 changes: 0 additions & 4 deletions e2e/bazel_bin/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

yarn_install(
name = "npm",
data = [
"@e2e_bazel_bin//:npm/testy/index.js",
"@e2e_bazel_bin//:npm/testy/package.json",
],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
5 changes: 5 additions & 0 deletions e2e/karma/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
5 changes: 5 additions & 0 deletions e2e/karma_stack_trace/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
5 changes: 5 additions & 0 deletions e2e/karma_typescript/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
# Turn off legacy external runfiles
run --nolegacy_external_runfiles
test --nolegacy_external_runfiles

# Turn on managed_directories
build --experimental_allow_incremental_repository_updates
test --experimental_allow_incremental_repository_updates
run --experimental_allow_incremental_repository_updates
Loading

0 comments on commit 917d005

Please sign in to comment.