Releases: bazel-contrib/rules_nodejs
4.4.2
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
- Update esbuild versions by @mattem in #3017
- Update esbuild versions by @mattem in #3019
- Update yarn versions by @mattem in #3020
- Add darwin_arm64 outdir to tsconfig by @Jakob-em in #3022
- Update esbuild versions by @mattem in #3023
- fix: simplify portion of linker and fix case where runfiles node_modules symlinks are missing under bazel run by @gregmagolan in #3024
- docs(esbuild): explain how to configure bazel downloader by @alexeagle in #3021
- chore: remove Angular view engine example by @alexeagle in #3027
- Update NodeJS Versions by @mattem in #3029
- fix(create): relocate help argument evaluation by @mgred in #3031
- Update esbuild versions by @mattem in #3032
- Remove --incompatible_restrict_string_escapes by @Wyverald in #3033
- docs(typescript): avoid duplicate headers in markdown by @alexeagle in #3034
- fix(builtin): retrieve yarn shasums from Github releases, rather than… by @mattem in #3037
- Update NodeJS Versions by @mattem in #3038
- fix(examples): run jest updateSnapshot in the workspace by @alexeagle in #3041
- fix(typescript): don't declare outputs that collide with inputs by @alexeagle in #3046
- docs(angular): the @bazel/angular package is moving out of rules_nodejs by @alexeagle in #3044
- fix(esbuild): allow whitespace within args by @jbedard in #2998
New Contributors
- @Jakob-em made their first contribution in #3022
- @mgred made their first contribution in #3031
- @Wyverald made their first contribution in #3033
Full Changelog: 4.4.1...4.4.2
4.4.1
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
- fix: terser semver compatibility range by @Aghassi in #3013
- fix: #2921 by @jakegut in #3011
- Update NodeJS Versions by @mattem in #3016
- Update esbuild versions by @mattem in #3015
New Contributors
Full Changelog: 4.4.0...4.4.1
4.4.0
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
4.3.0
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
4.2.0
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
4.1.0
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
- builtin: add support for using a local .nvmrc file for providing a node version (#2911) (44740df) Thanks @josephperrott !
- decouple @bazel/worker from rules_typescript (#2918) (bda0472)
Bug Fixes
- typescript: write json srcs to generated tsconfig for resolveJsonModule+composite projects (c70a07b)
- readme (52ee4ef)
- remove dependency on shelljs in esbuild-update script (0f17126)
- update
tsutils
to version3.21.0
(bba5494), closes /github.com/bazelbuild/rules_nodejs/blob/9b454e38f7e2bbc64f75ee9a7dcb6ff45f1c7a12/third_party/github.com/bazelbuild/rules_typescript/internal/tsetse/rules/check_return_value_rule.ts#L60-L62 - use execSync to call npm (acc64f9)
4.0.0
📣 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 yourWORKSPACE
-
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 yourWORKSPACE
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 theresolve
method instead -
esbuild: Add toolchain support for esbuild, removing the need for the tool attribute. Load the
esbuild_repositories
macro and call it within theWORKSPACE
, 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 adict
(wasstring_list
), where the keys are the arg names from the JS API for esbuild.
define
now takes adict
(wasstring_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 thets_library
target; insteadpackage_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...
4.0.0-rc.1
Please use the 4.0.0 release instead.
4.0.0-rc.0
Please use rc.1 instead
3.8.0
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)