@bazel/protractor
Advanced tools
Changelog
1.2.2 (2020-01-31)
Changelog
1.2.0 (2020-01-24)
Changelog
1.0.1 (2020-01-03)
Changelog
1.0.0 (2019-12-20)
bootstrap
attribute & fix $(location) expansions in nodejs_binary templated_args (1860a6a)args
to yarn_install & npm_install (#1462) (d245d09)templated_args_file
removed from nodejs_binary, nodejs_test & jasmine_node_test. This was a separation of concerns and complicated node.bzl more than necessary while also being rigid in how the params file is formatted. It is more flexible to expose this functionality as another simple rule named params_file.To match standard $(location) and $(locations) expansion, params_file args location expansions are also in the standard short_path form (this differs from the old templated_args behavior which was not Bazel idiomatic) Usage example:
load("@build_bazel_rules_nodejs//:index.bzl", "params_file", "nodejs_binary")
params_file(
name = "params_file",
args = [
"--some_param",
"$(location //path/to/some:file)",
"--some_other_param",
"$(location //path/to/some/other:file)",
],
data = [
"//path/to/some:file",
"//path/to/some/other:file",
],
)
nodejs_binary(
name = "my_binary",
data = [":params_file"],
entry_point = ":my_binary.js",
templated_args = ["$(location :params_file)"],
)
This can be replaced with the --node_options=--require=$(location label)
argument such as,
nodejs_test(
name = "bootstrap_test",
templated_args = ["--node_options=--require=$(rlocation $(location :bootstrap.js))"],
entry_point = ":bootstrap.spec.js",
data = ["bootstrap.js"],
)
or
jasmine_node_test(
name = "bootstrap_test",
srcs = ["bootstrap.spec.js"],
templated_args = ["--node_options=--require=$(rlocation $(location :bootstrap.js))"],
data = ["bootstrap.js"],
)
templated_args
$(location)
and $(locations)
are now correctly expanded when there is no space before $(location
such as templated_args = ["--node_options=--require=$(rlocation $(location :bootstrap.js))"]
.
Path is returned in runfiles manifest path format such as repo/path/to/file
. This differs from how $(location)
and $(locations) expansion behaves in expansion the args
attribute of a *_binary or *_test which returns
the runfiles short path of the format ./path/to/file
for user repo and ../external_repo/path/to/file
for external
repositories. We may change this behavior in the future with $(mlocation) and $(mlocations) used to expand
to the runfiles manifest path.
See https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-binaries.
args
in yarn_install and npm_install can be used to pass arbitrary arguments so we removed the following attributes:npm_package
renamed to pkg_npm
. This is to match the naming convention for package rules https://docs.bazel.build/versions/master/be/pkg.html.Changelog
0.42.3 (2019-12-10)
To upgrade:
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "a54b2511d6dae42c1f7cdaeb08144ee2808193a088004fc3b464a04583d5aa2e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.42.3/rules_nodejs-0.42.3.tar.gz"],
)
and run yarn upgrade --scope @bazel
to update all your @bazel
-scoped npm packages to the latest versions.
(or manually do the npm equivalent - they don't have a way to update a scope)
Changelog
0.42.1 (2019-11-27)
To upgrade:
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "c612d6b76eaa17540e8b8c806e02701ed38891460f9ba3303f4424615437887a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.42.1/rules_nodejs-0.42.1.tar.gz"],
)
and run yarn upgrade --scope @bazel
to update all your @bazel
-scoped npm packages to the latest versions.
(or manually do the npm equivalent - they don't have a way to update a scope)
In 0.41.0 we noted that a feature for inserting <script>
and <link>
tags was dropped from ts_devserver
and pkg_web
but the replacement wasn't available. Now it is thanks to @jbedard who published a standalone npm package html-insert-assets
. You can see how it's wired in the examples.
If you waited to upgrade before, now you should.
npm_package_bin
and all rules generated by it, to match genrule behavior as documented at https://docs.bazel.build/versions/master/be/make-variables.html#predefined_genrule_variables
This means that usage of the $@
shortcut to refer to the output directory should now be $(@D)
when output_dir=True
and you can now use $@
to refer to the location of a single output