Releases: bazel-contrib/rules_nodejs
3.0.0-rc.0
Please update to 3.0.0-rc.1 instead
2.3.1
To upgrade,
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "121f17d8b421ce72f3376431c3461cd66bfe14de49059edc7bb008d5aebd16be",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.3.1/rules_nodejs-2.3.1.tar.gz"],
)
and remember to update your @bazel
-scoped npm dependencies.
Bug Fixes
- builtin: make linker deterministic when resolving from manifest & fix link_workspace_root with no runfiles (8adebda)
- npm_package.pack on Windows should not generate undefined.tgz (76c3f51)
Performance Improvements
- cypress: pack cypress runfiles into a single tar (185c632)
2.3.0
To upgrade,
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "452bef42c4b2fbe0f509a2699ffeb3ae2c914087736b16314dbd356f3641d7e5",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.3.0/rules_nodejs-2.3.0.tar.gz"],
)
and update your @bazel
-scoped npm dependencies.
Bug Fixes
- typescript: specify rootDir as absolute path (86bef24)
- npm_package.pack should work in windows os (bc36519)
- builtin: give a longer timeout for _create_build_files (e72c145), closes #2231
- exmaples/nestjs: add module_name field in ts_library (700374a)
- typescript: don't include _valid_options marker file in outs (6305db3), closes #2078
Features
- cypress: remove browiserify preprocessor (1eeabbe)
- examples: adds example for running jest with typescript (#2245) (3c11800)
- node_repositories: Added auth option for downloading nodejs and yarn (51de4e0)
- typescript: add allow_js support to ts_project (12571ee)
- typescript: worker mode for ts_project (#2136) (9663b85)
Thanks to all the contributors in this release especially @mrmeku for adding persistent workers to ts_project
2.2.2
To upgrade,
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "f2194102720e662dbf193546585d705e645314319554c6ce7e47d8b59f459e9c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz"],
)
and update @bazel
-scoped npm packages.
Bug Fixes
- builtin: js_library supports --output_groups=types (c060a22)
- example: remove compression dependencies (75bf720)
- example: remove index.html from prodapp srcs (c7be89b)
- example: remove server side compression (6d5aafb)
- exmaple: add docstring to ngsw_config rule (481fa21)
Features
2.2.1
To upgrade,
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "64a71a64ac58b8969bb19b1c9258a973b6433913e958964da698943fb5521d98",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.1/rules_nodejs-2.2.1.tar.gz"],
)
and update your @bazel
-scoped npm packages.
Bug Fixes
- builtin: js_library: correctly propagate DeclarationInfos (41f8719)
- examples: prevent ibazel EOF (96aea69), closes #2143
- karma: allow custom browsers to specify args (fixes #595) (5a58030)
- don't glob yarn or node files when using vendored_node or vendored_yarn (f5ef64f)
Features
2.2.0
Upgrade with
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "4952ef879704ab4ad6729a29007e7094aef213ea79e9f2e94cbe1c9a753e63ef",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.0/rules_nodejs-2.2.0.tar.gz"],
)
and remember to update your @bazel
-scoped npm dependencies.
Features
- new public API:
js_library
which finally fixes our story for local dependencies with package names - see the new documentation (1e357fd), closes #149 #1771 - thanks to @mistic for contributing the needed logic changes - To fix the hardest migration problem with the 2.0 release, we added back a way to link the workspace root into your node_modules, and added it to nodejs_binary, npm_package_bin, rollup_bundle, ts_project & ts_library (4dcb37f)
Bug Fixes
2.1.0
Upgrade with:
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "b16a03bf63952ae436185c74a5c63bec03c010ed422e230db526af55441a02dd",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.1.0/rules_nodejs-2.1.0.tar.gz"],
)
and update your @bazel
-scoped npm packages!
New features
Brand-new docsite
Thanks to our core maintainer @mattem for finding time to rewrite the templates and generation process for our documentation site, bazelbuild.github.io/rules_nodejs
It's now got
- a search feature, hooray
- a right-nav to find your way through the table-of-contents of long pages
- a more broken-down introductory section with things like debugging and stamping in their own page
- it's much nicer on your eyes, by borrowing from the Bazel website
- many pages (those not generated from stardoc) have an "edit this page" link to quickly suggest your fixes in the GitHub editor
Since this is freshly redone, there may be a bunch of formatting issues. And since the site is nice, we're also more keen on improving the text for clarity, correctness, and comprehension. Please file issues on the docs if you see problems.
tsconfig.json generation in ts_project rule
One problem we've heard from users migrating from ts_library
to ts_project
is that the latter requires adding a bunch of tsconfig.json
files in their repository. If you have hundreds of ts_library
rules this is a big obstacle to migration and to keeping your repo maintainable.
You can now pass a dictionary to the tsconfig
attribute of ts_project
ts_project(
tsconfig = {
"compilerOptions": {
"declaration": True,
},
},
)
it works for generated .ts
source files, the TypeScript extends
feature, and React-style projects that use emitDeclarationOnly
.
Also you can mix-and-match properties in the tsconfig
dictionary with attributes on the ts_project
rule. Check out the tests folder for more examples of how this is used.
Consistent stamping with arbitrary variables
The documentation for stamping is updated with better handling of status variables. Now instead of hardcoding the BUILD_SCM_VERSION
variable, you can use any status variable you like. This is important because variables starting with STABLE_
are special to Bazel, and guarantee a re-build will pick up changed values. You no longer need to perform a clean build to reliably get stamped artifacts!
Thanks to @thesayyn the pkg_web
rule now does stamping as well, using the same substitutions
dictionary as pkg_npm
.
Bug Fixes
- use golden_file_test instead (1ef6704)
- typescript: add the tsBuildInfoFile option to ts_project (#2138) (16def64), closes #2137
Features
2.0.3
Upgrade with:
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "10fffa29f687aa4d8eb6dfe8731ab5beb63811ab00981fc84a93899641fd4af1",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.0.3/rules_nodejs-2.0.3.tar.gz"],
)
and update your @bazel
-scoped packages
Bug Fixes
- examples: use ./ prefix on babel config file (374f56f)
- typescript: only expect .js outs for .tsx? srcs (#2118) (83688a1), closes #2115
- typescript: produce .d.ts as default output rather than empty (#2117) (3d885e8), closes #2116
Features
2.0.2
Upgrade with
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "6a67a8a1bf6fddc9113f73471029b819eef4575c3a936a4a01d57e411894d692",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.0.2/rules_nodejs-2.0.2.tar.gz"],
)
and update @bazel
-scoped packages
Bug Fixes
2.0.1
Upgrade with
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "0f2de53628e848c1691e5729b515022f5a77369c76a09fbe55611e12731c90e3",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.0.1/rules_nodejs-2.0.1.tar.gz"],
)
and update @bazel
-scoped packages