Skip to content

Releases: bazel-contrib/rules_nodejs

4.4.2

28 Oct 19:11
Compare
Choose a tag to compare

Upgrade with

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "3aa6296f453ddc784e1377e0811a59e1e6807da364f44b27856e34f5042043fe",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.2/rules_nodejs-4.4.2.tar.gz"],
)

and update @bazel-scoped npm packages.

if using the new "core" package:

http_archive(
    name = "rules_nodejs",
    sha256 = "0028e76baa55c2c5dad22335293a0e9796f37176bd92ccc499178846b7cf43e3",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.2/rules_nodejs-core-4.4.2.tar.gz"],
)

What's Changed

New Contributors

Full Changelog: 4.4.1...4.4.2

4.4.1

13 Oct 16:17
Compare
Choose a tag to compare

Bugfix release just containing version bumps for node security patch.

Upgrade with

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "4501158976b9da216295ac65d872b1be51e3eeb805273e68c516d2eb36ae1fbb",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.1/rules_nodejs-4.4.1.tar.gz"],
)

note, there are no new npm packages for this release, they are still at 4.4.0

Bug fixes

New Contributors

Full Changelog: 4.4.0...4.4.1

4.4.0

11 Oct 22:29
Compare
Choose a tag to compare

Upgrade with

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "c9c5d60d6234d65b06f86abd5edc60cadd1699f739ee49d33a099d2d67eb1ae8",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.0/rules_nodejs-4.4.0.tar.gz"],
)

and update @bazel-scoped packages.

To try out the new renamed "rules_nodejs" workspace, coming in 5.0:

http_archive(
    name = "rules_nodejs",
    sha256 = "a54a01b883beff66da057a1a9afc3be83de566d8ba78f5139f9b370026af5868",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.4.0/rules_nodejs-core-4.4.0.tar.gz"],
)

(see e2e/core for more usage, documentation will come with 5.0)

Bug Fixes

  • ts_proto_library: use correct output path for external protos (#3002) (b48176f)
  • typescript: typescript downleveling breaking ESM variant of Angular v13 compiler (#2987) (5e4d17d)
  • update jasmine-reporters to v2.5.0 to fix xmldom vulnerability (#2994) (8ca234b)

Features

  • core: patch bazel-skylib; core can use npm (#3008) (e6ead39)
  • examples: change angular example to ts_project (#2209) (73e625a)

4.3.0

28 Sep 17:41
Compare
Choose a tag to compare

Upgrade with WORKSPACE:

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)

and update @bazel-scoped npm packages.

Bug Fixes

  • cypress: use correct label to reference plugins/base.js (#2977) (6acec9d), closes #2976
  • esbuild: fix depending on testonly targets (#2984) (4278ef1)
  • runfiles: don't use false as a no-error value (#2974) (de1eaf6)

Features

  • builtin: expose a concrete toolchain for rules that don't under… (#2960) (64ad805)
  • esbuild: bump version of esbuild to 0.13.2 (#2985) (4bb25bf)
  • typescript: support for ESM variant of the Angular compiler plugin (#2982) (6f97a7c)

4.2.0

17 Sep 18:37
Compare
Choose a tag to compare

To upgrade:

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "4e1a5633267a0ca1d550cced2919dd4148575c0bafd47608b88aea79c41b5ca3",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.2.0/rules_nodejs-4.2.0.tar.gz"],
)

and update @bazel-scoped npm packages

Bug Fixes

  • builtin: pkg_npm unable to copy files from transitioned actions (#2942) (4291e20)
  • typescript: exclude package(-lock).json from default ts_project srcs (0245b6d)
  • worker: check if the input digest present (b43c594)

Features

  • builtin: add a toolchain to new core that exposes the node for any platform (20f4a8f)
  • builtin: add support for stopping propagation of link_node_modules aspect (dedc982)
  • introduce "core" package at /nodejs (a32cf5c)

4.1.0

10 Sep 03:29
Compare
Choose a tag to compare

Note, the @bazel/worker package changed in this release and now uses google-protobuf rather than protobufjs, however this change shouldn't be user-visible. Thanks @thesayyn !

To upgrade:

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "b32a4713b45095e9e1921a7fcb1adf584bc05959f3336e7351bcf77f015a2d7c",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.1.0/rules_nodejs-4.1.0.tar.gz"],
)

and update @bazel-scoped npm packages.

Features

Bug Fixes

4.0.0

24 Aug 20:44
Compare
Choose a tag to compare

📣 This is our twice-yearly major release with some breaking changes.

To upgrade, use this WORKSPACE snippet:

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
)

and upgrade your @bazel-scoped npm packages to latest

Updated dependency versions

  • rules_nodejs only supports the current LTS of Bazel, 4.0.0 or later. This is a policy restriction to save us time tracking down support issues on older versions of Bazel, not a technical one. You can patch this check out locally if you really need to continue using older Bazel, but this puts you on unsupported track since we only test against LTS. (a9c5966)

  • We updated the default nodejs version to the current LTS (14.17.5). If you want to keep the same nodejs version as the default in 3.x, use node_repositories(node_version="12.13.0") in your WORKSPACE

  • We updated the default yarn version to current latest (1.22.11). If you want to keep the same yarn version as the default in 3.x, use node_repositories(yarn_version="1.19.1") in your WORKSPACE

BREAKING CHANGES

  • typescript: ts_project tsconfig attribute now defaults to just 'tsconfig.json' rather than '[name].json'

  • builtin: flipped default for pkg_npm#validate to True (16a099e) Just follow the printed instructions to either set the right package_name or disable the validation

  • builtin: The @bazel/runfiles lookupDirectory method has been removed. Use the resolve method instead

  • esbuild: Add toolchain support for esbuild, removing the need for the tool attribute. Load the esbuild_repositories macro and call it within the WORKSPACE, this will by default define esbuild binaries for Windows, MacOS and Linux (all amd64).

  • esbuild: Refactor esbuild rule to use esbuild's API:
    args now takes a dict (was string_list), where the keys are the arg names from the JS API for esbuild.
    define now takes a dict (was string_list), following the format of the define esbuild JS API.

  • esbuild: Only enable code splitting when setting splitting = True Previously there was no way to produce an output directory without also enabling code splitting.

  • typescript: module_name will no longer turn on linking for the ts_library target; instead package_name must now be specified to enable linking. package_path may also be specified to control the link location (#2799)

  • docs: We used to maintain a GitHub Pages based documentation site at https://bazelbuild.github.io/rules_nodejs/ - however this was too much maintenance burden for our small team of OSS contributors, and we never found a way to properly version documentation on GitHub Pages hosting. We now suggest you use the markdown files in the docs/ folder of this repo, which are always up-to-date with respect to the branch you're viewing. For example, https://github.com/bazelbuild/rules_nodejs/blob/4.0.0/docs/index.md is the entry point for the 4.0.0 release. If you'd like to have features like versioning, search, sidenavs, copy-paste code snippets, and more, we recommend using a third-party site: https://docs.aspect.dev/rules_nodejs

Code Refactoring

  • typescript: tsconfig default to tsconfig.json (c6ae95c)

Features

  • esbuild: allow for .ts, .tsx and .jsx entry points (e3edb28)
  • esbuild: add support for plugins via supplying a configuration file (5551bff)
  • esbuild: add support for plugins via supplying a configuration file (#2840) (c95d9ca)
  • esbuild: support stamping via config file (413f73d)
  • labs: ts_proto_library directly exports commonjs (5f26d0f)
  • add package_name to ts_library (d2d4d16)
  • builtin: document how nodejs_binary#entry_point can use a direc… (#2579) (fcdcf63)
  • cypress: cypress executable toolchain (#2668) (f1f5ee6)
  • esbuild: add support for toolchains (#2704) (ae011bf)
  • esbuild: filter ts declaration files by default (f83cf48)
  • add opt-in exports_directories_only mode to yarn_install and npm_install (defaults to False) (a7200aa)
  • support dict style directory_file_path entry_point in nodejs_binary, nodejs_test & jasmine_node_test (5fafe19)
  • support directory_file_path entry_point in npm_umd_bundle (8bee1b3)
  • builtin: add package_json_remove and package_json_replace attributes to yarn_install & npm_install (b68be36)

Performance Improvements

  • cypress: export cypress as a directory symlink (8ea7ff4)

Bug Fixes

  • add missing SHA for rules_proto (#2830) (e822b95)
  • esbuild: generate correct path mappings as mappings aspect no longer produces an array (#2834) (b79e3f4)
  • typescript: fix bug in ts_project (write_tsconfig_rule) when extending from a generated tsconfig in same folder (4e396eb)
  • builtin: generated nodejs repository for windows references non-existent file (4487698)
  • builtin: propogate tags to both generated targets in generated_file_test (e980107)
  • builtin: runfile resolution incorrect if entry starts similarly (3be2902)
  • builtin: write stdout/stderr to correct path under chdir (#2681) (99760a5), closes #2680
  • esbuild: prefer finding entry_point files in deps rather than srcs (#2692) (5f4bb15)
  • esbuild: provide JSModuleInfo of output bundle (#2685) (82ef1a1)
  • esbuild: update update script file paths after removal of _README.md (#2695) (f320ef0)
  • jasmine: don't assume entry_point is a label as it may now be a dict (3fa2e5f)
  • jasmine: unhanded promise rejection causes tests suit to pass (a511f3d), closes 3.7.0/lib/jasmine.js#L267 #2688
  • terser: make terser resolve more robust by not assuming a single /terser/ segment in the path (95fc9ba)
  • allow for only stderr to be set on npm_package_bin (a04a7ef)
  • builtin: add two missing locations where Mac M1 support needs to be declared (ad20275), closes #2733
  • builtin: support directory_file_path entry_point in nodejs_binary & nodejs_test when --bazel_patch_module_resolver is set (50e6d1d)
  • typescript: fixed "output was not created" error for ts_project with supports_workers (9a3e5c9)
  • typescript: repair error reporting when a ts_project is missing declaration=True (5f0be65)
  • make generated_file_test .update's visibility same as test rule (#2677) (1ce9dce)
  • remove current directory prefix when running from execroot (9771b74)
  • builtin: correctly calculate pkg._directDependency when a mapped node_module is used (32551a5)
  • typescript: do not re-declare .json output files in src...
Read more

4.0.0-rc.1

19 Aug 19:32
Compare
Choose a tag to compare
4.0.0-rc.1 Pre-release
Pre-release

Please use the 4.0.0 release instead.

4.0.0-rc.0

13 Aug 02:10
Compare
Choose a tag to compare
4.0.0-rc.0 Pre-release
Pre-release

Please use rc.1 instead

3.8.0

12 Aug 23:34
Compare
Choose a tag to compare

Upgrade with

http_archive(
    name = "build_bazel_rules_nodejs",
    sha256 = "e79c08a488cc5ac40981987d862c7320cee8741122a2649e9b08e850b6f20442",
    urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.8.0/rules_nodejs-3.8.0.tar.gz"],
)

and update @bazel-scoped npm packages

Features

@bazel/worker package no longer checks whether the major version of rules_nodejs matches what it was built against.
Needed for our 4.0.0 release so that dependencies like the worker mode of rules_sass doesn't throw.

Bug Fixes

  • remove current directory prefix when running from execroot (6be5186)
  • builtin: correctly calculate pkg._directDependency when a mapped node_module is used (9e23f8a)
  • labs: fix ts_proto_library handling of external proto_library (57c6576)
  • runfiles: don't use false as a no-error value (#2837) (be8b27c)
  • typescript: do not re-declare .json output files in srcs if they are already generated files (6508c6a)
  • typescript: document tsc_test for typecheck-only (bc4d34a)
  • typescript: fix bug in ts_project (write_tsconfig_rule) when extending from a generated tsconfig in same folder (10cca5c)