Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Update dependency build_bazel_rules_nodejs to v1 #503

Merged

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
build_bazel_rules_nodejs http_archive major 0.42.3 -> 1.1.0

Release Notes

bazelbuild/rules_nodejs

v1.1.0

Compare Source

Bug Fixes
  • separate nodejs require patches from loader and —require them first (b10d230)
  • karma: pass --node_options to karma (d48f237)
  • protractor: pass --node_options to protractor (a3b39ab)
Features
  • builtin: add support for Predefined variables and Custom variable to npm_package_bin (34176e5)
  • examples: add nestjs test (f448931)
  • examples: add nodejs_binary cluster example (#​1515) (f217519)

1.0.1 (2020-01-03)

Bug Fixes
  • don't bake COMPILATION_MODE into launcher as exported environment var (8a931d8)
  • builtin: make .pack and .publish targets work again (43716d3), closes #​1493
  • create: @​bazel/create should verbose log based on VERBOSE_LOGS instead of COMPILATION_MODE (c1b97d6)
Features
  • builtin: allow patching require in bootstrap scripts (842dfb4)

v1.0.1

Compare Source

Bug Fixes
  • separate nodejs require patches from loader and —require them first (b10d230)
  • karma: pass --node_options to karma (d48f237)
  • protractor: pass --node_options to protractor (a3b39ab)
Features
  • builtin: add support for Predefined variables and Custom variable to npm_package_bin (34176e5)
  • examples: add nestjs test (f448931)
  • examples: add nodejs_binary cluster example (#​1515) (f217519)

1.0.1 (2020-01-03)

Bug Fixes
  • don't bake COMPILATION_MODE into launcher as exported environment var (8a931d8)
  • builtin: make .pack and .publish targets work again (43716d3), closes #​1493
  • create: @​bazel/create should verbose log based on VERBOSE_LOGS instead of COMPILATION_MODE (c1b97d6)
Features
  • builtin: allow patching require in bootstrap scripts (842dfb4)

v1.0.0

Compare Source

Bug Fixes
  • builtin: bin folder was included in runfiles path for tests when link type was 'bin' (f938ab7)
  • builtin: link module_name to directories recursively to avoid directory clashes (#​1432) (0217724), closes #​1411
  • builtin: strip BOM when parsing package.json (#​1453) (c65d9b7), closes #​1448
  • typescript: remove stray references to ts_auto_deps (#​1449) (aacd924)
chore
Code Refactoring
  • pkg_npm attributes renames packages=>nested_packages & replacements=>substitutions (7e1b7df)
  • remove bootstrap attribute & fix $(location) expansions in nodejs_binary templated_args (1860a6a)
  • remove templated_args_file from nodejs_binary & nodejs_test (799acb4)
  • builtin: add args to yarn_install & npm_install (#​1462) (d245d09)
  • builtin: remove legacy jasmine_node_test (6d731cf)
  • builtin: renamed npm_package to pkg_npm to match naming convention (7df4109)
  • pre-1.0 release breaking changes (cc64818)
  • remove unused exclude_packages from npm_install & yarn_install (f50dea3)
Features
Performance Improvements
BREAKING CHANGES
  • 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)"],
)
  • bootstrap attribute in nodejs_binary, nodejs_test & jasmine_node_test removed

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.

    • pkg_npm attribute packages renamed to nested_packages
  • pkg_npm attribute replacements renamed to substitutions
  • builtin: legacy @​build_bazel_rules_nodejs//internal/jasmine_node_test removed; use jasmine_node_test from @​bazel/jasmine npm package instead
  • builtin: args in yarn_install and npm_install can be used to pass arbitrary arguments so we removed the following attributes:
  • prod_only from yarn_install and npm_install; should be replaced by args = ["--prod"] and args = ["--production"] respectively
  • frozen_lockfile from yarn_install; should be replaced by args = ["--frozen-lockfile"]
  • network_timeout from yanr_install; should be replaced by args = ["--network_timeout", ""]
  • builtin: 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.
  • Users must now switch to loading from index.bzl
  • Removed unused exclude_packages from npm_install & yarn_install
  • //:declaration_provider.bzl deleted; load from //:providers.bzl instead
    //internal/common:npm_pacakge_info.bzl removed; load from //:providers.bzl instead
    transitive_js_ecma_script_module_info macro removed; use js_ecma_script_module_info instead
    @​npm_bazel_karma//:browser_repositories.bzl removed; use @​io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl instead
    @​npm_bazel_protractor//:browser_repositories.bzl removed; use @​io_bazel_rules_webtesting//web/versioned:browsers-0.3.2.bzl instead
    ts_web_test & ts_web_test_suite marcos removed; use karma_web_test & karma_web_test_suite instead

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)

Bug Fixes
  • builtin: handle scoped packages in generated npm_umd_bundle targets (#​1425) (e9e2e8e), closes #​1095
  • builtin: only stamp artifacts when --stamp is passed to bazel (#​1441) (cbaab60)
  • docs default values are now documented for rule attributes
Features
  • builtin: wire linker/node-patches to npm-generated index.bzl rules (3321ed5), closes #​1382

0.42.2 (2019-12-04)

Bug Fixes
  • builtin: additional_root_paths in pkg_web should also include paths in genfiles and bin dirs (#​1402) (9ce8c85)
  • typescript: fix for cross platform ts_devserver issue #​1409 (#​1413) (172caff), closes #​1415
  • support realpath.native and fix crash in mkdirp (b9282b9)

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)

New stuff

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.

Bug Fixes
  • @​npm//foobar:foobar__files target no longer includes nested node_modules (#​1390) (a13f2b6)
  • allow files in protractor data attribute (3feb13c)
  • builtin: $(RULEDIR) npm_package_bin expansion should always be the root output directory (b494974)
  • builtin: locations arg of npm_package_bin should result in separate argv (242379f)
  • builtin: use correct genrule-style make vars (77039b1)
  • examples: kotlin example server working (adf6934)
BREAKING CHANGES

Renovate configuration

📅 Schedule: "at 7am on Monday" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

@k8s-ci-robot
Copy link

Hi @renovate-bot. Thanks for your PR.

I'm waiting for a bazelbuild member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nlopezgi
Copy link
Contributor

/ok-to-test

@nlopezgi
Copy link
Contributor

/ok-to-test

@forking-renovate
Copy link

PR has been edited

👷 This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nlopezgi, renovate-bot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nlopezgi nlopezgi merged commit dcbb371 into bazelbuild:master Jan 14, 2020
@renovate-bot renovate-bot deleted the renovate/build_bazel_rules_nodejs-1.x branch January 14, 2020 20:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants