Skip to content

Commit

Permalink
Update to bazel 0.26.0-rc5 and new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmagolan committed May 9, 2019
1 parent 917d005 commit f8d062b
Show file tree
Hide file tree
Showing 61 changed files with 428 additions and 113 deletions.
15 changes: 14 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "build_bazel_rules_nodejs")
workspace(
name = "build_bazel_rules_nodejs",
managed_directories = {
"@build_bazel_rules_nodejs_npm_install_deps": ["internal/npm_install/node_modules"],
"@build_bazel_rules_nodejs_rollup_deps": ["internal/rollup/node_modules"],
"@build_bazel_rules_nodejs_web_package_deps": ["internal/web_package/node_modules"],
"@fine_grained_deps_npm": ["internal/e2e/fine_grained_deps/npm/node_modules"],
"@fine_grained_deps_yarn": ["internal/e2e/fine_grained_deps/yarn/node_modules"],
"@fine_grained_no_bin": ["internal/e2e/fine_grained_no_bin/node_modules"],
"@history-server_runtime_deps": ["internal/history-server/node_modules"],
"@http-server_runtime_deps": ["internal/http-server/node_modules"],
"@npm": ["node_modules"],
},
)

load("//:package.bzl", "rules_nodejs_dev_dependencies")

Expand Down
5 changes: 5 additions & 0 deletions e2e/bazel_bin/.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: 4 additions & 1 deletion e2e/bazel_bin/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_bazel_bin")
workspace(
name = "e2e_bazel_bin",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/define_var/.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: 4 additions & 1 deletion e2e/define_var/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_define_var")
workspace(
name = "e2e_define_var",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/jasmine/.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: 4 additions & 1 deletion e2e/jasmine/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_jasmine")
workspace(
name = "e2e_jasmine",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 4 additions & 1 deletion e2e/karma/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_karma")
workspace(
name = "e2e_karma",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 4 additions & 1 deletion e2e/karma_stack_trace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_karma_stack_trace")
workspace(
name = "e2e_karma_stack_trace",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 4 additions & 1 deletion e2e/karma_typescript/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_karma_typescript")
workspace(
name = "e2e_karma_typescript",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/ts_auto_deps/.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
13 changes: 5 additions & 8 deletions e2e/ts_auto_deps/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_ts_auto_deps")
workspace(
name = "e2e_ts_auto_deps",
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", "node_repositories", "yarn_install")

# This test depend on there being a user node_modules folder
# TODO(gregmagolan): remove this once yarn_install sets up the user's node_modules folder
node_repositories(
package_json = ["//:package.json"],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

yarn_install(
name = "npm",
Expand Down
5 changes: 5 additions & 0 deletions e2e/ts_devserver/.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
13 changes: 5 additions & 8 deletions e2e/ts_devserver/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_ts_devserver")
workspace(
name = "e2e_ts_devserver",
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", "node_repositories", "yarn_install")

# This test depend on there being a user node_modules folder
# TODO(gregmagolan): remove this once yarn_install sets up the user's node_modules folder
node_repositories(
package_json = ["//:package.json"],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

yarn_install(
name = "npm",
Expand Down
5 changes: 5 additions & 0 deletions e2e/ts_library/.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
34 changes: 19 additions & 15 deletions e2e/ts_library/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
workspace(name = "e2e_ts_library")
# 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.

workspace(
name = "e2e_ts_library",
managed_directories = {"@npm": ["node_modules"]},
)

# In your code, you'd fetch this repository with an `http_archive` call.
# We do this local repository only because this example lives in the same
# repository with the rules_nodejs code and we want to test them together.
local_repository(
name = "build_bazel_rules_nodejs",
path = "../../dist/build_bazel_rules_nodejs/release",
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")

# This test depend on there being a user node_modules folder
# TODO(gregmagolan): remove this once yarn_install sets up the user's node_modules folder
node_repositories(
package_json = ["//:package.json"],
)
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

# This runs yarn install, then our generate_build_file.js to create BUILD files
# inside the resulting node_modules directory.
# The name "npm" here means the resulting modules are referenced like
# @npm//jasmine
yarn_install(
name = "npm",
package_json = "//:package.json",
Expand Down
5 changes: 4 additions & 1 deletion e2e/tsconfig_extends/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_tsconfig_extends")
workspace(
name = "e2e_tsconfig_extends",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/typescript_2.7/.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: 4 additions & 1 deletion e2e/typescript_2.7/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_typescript_2_7")
workspace(
name = "e2e_typescript_2_7",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/typescript_2.8/.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: 4 additions & 1 deletion e2e/typescript_2.8/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_typescript_2_8")
workspace(
name = "e2e_typescript_2_8",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/typescript_2.9/.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: 4 additions & 1 deletion e2e/typescript_2.9/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_typescript_2_9")
workspace(
name = "e2e_typescript_2_9",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/typescript_3.0/.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: 4 additions & 1 deletion e2e/typescript_3.0/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_typescript_3_0")
workspace(
name = "e2e_typescript_3_0",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions e2e/typescript_3.1/.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: 4 additions & 1 deletion e2e/typescript_3.1/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_typescript_3_1")
workspace(
name = "e2e_typescript_3_1",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 4 additions & 1 deletion e2e/webpack/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "e2e_webpack")
workspace(
name = "e2e_webpack",
managed_directories = {"@npm": ["node_modules"]},
)

local_repository(
name = "build_bazel_rules_nodejs",
Expand Down
5 changes: 5 additions & 0 deletions examples/app/.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 f8d062b

Please sign in to comment.