Releases: Canva/rules_nodejs
Releases · Canva/rules_nodejs
v3.8.0-20240716
What's Changed
- Hook to run command after
node_modules
installed by @Silic0nS0ldier in #55
Full Changelog: v3.8.0-20240702...v3.8.0-20240716
v3.8.0-20240702
What's Changed
- Support
--incompatible_struct_has_no_methods
for Bazel 8 preview by @Silic0nS0ldier in #54
Full Changelog: v3.8.0-20240424...v3.8.0-20240702
v3.8.0-20240424
What's Changed
- Match Bazel
env
attribute behaviour by @Silic0nS0ldier in #52 - fix node patches in node 20.12 by @bradzacher in #53
New Contributors
- @bradzacher made their first contribution in #53
Full Changelog: v3.8.0-20240301...v3.8.0-20240424
v3.8.0: 2024-03-01 Edition
Changed
- Some environment variable mutations and additions are no longer leaked into the environment of
nodejs_binary
executables. (#45)
The following environment variables no longer leak in.PWD
(bash)RUNFILES_MANIFEST_FILE
(bash runfiles library)BAZEL_NODE_RUNFILES_HELPER
(rules nodejs)BAZEL_NODE_PATCH_REQUIRE
(rules nodejs)BAZEL_TARGET
(rules nodejs)SHLVL
(bash)BAZEL_NODE_MODULES_ROOTS
(rules nodejs)_RLOCATION_ISABS_PATTERN
(bash runfiles library)BAZEL_WORKSPACE
(rules nodejs)BASH_FUNC_rlocation%%
(bash runfiles library)BASH_FUNC_runfiles_export_envvars%%
(bash runfiles library)_
(bash)
Removed
- Removed
npm_umd_bundle
rule and related targets generated byyarn_install
. (#50) - Removed
pkg_web
rule. (#51)
Fixed
- Fixed
preinstall_cmd
running in the wrong directory. (#46)
v3.8.0: 2024-01-24 Edition
Added
- Add
preinstall_cmd
attribute tonpm_install
andyarn_install
as a Bazel-only equivalent to thepreinstall
hook. (#46)
Fixed
v3.8.0: 2023-12-08 Edition
v3.8.0: 2023-12-06 Edition
v3.8.0: 2023-12-05 Edition
Changed
- Optimised copying of
data
dependencies innpm_install
andyarn_install
. (#41 )
v3.8.0: 2023-12-04 Edition
Added
- WORKAROUND
CUSTOM_NODE_ENTRY
andNM_SYMLINKS
environment variables so persistent workers can recreate side effects in stricter environments (e.g. remote persistent workers in EngFlow). (#26) (#27) - WORKAROUND Flag
--bazel_use_legacy_execroot_paths__variant_rlocation_main
fornodejs_binary
executables. Causes the entry point to be resolved to the actual file viarlocation
. (#28) - WORKAROUND Flag
--bazel_use_legacy_execroot_paths__variant_execroot_main
fornodejs_binary
executables. Causes the entry point to be resolved to the file directly underexecroot
. (#28) - Ensure proxy environment variables (e.g.
HTTPS_PROXY
) are propagated tonpm
innpm_install
andyarn
inyarn_install
. (#31) - Updated NodeJS versions list. (#32)
- Updated Yarn Classic versions list. (#33)
Changed
.pyc
files fromnode_module
included with NodeJS are now deleted, as they were unnecessary (an optimisation for CPython) and non-deterministic. (#24).node
files fromnode_modules
included with NodeJS are now run through thestrip
tool to remove non-deterministic debug symbols. (#24)- BREAKING
node_modules
runtime linker rewritten to only create symlinks inside[name].sh.runfiles/
. Symlinks will no longer be created in the "top-level"execroot
directory. (#26) node
bin stub (used to ensure child processes inherit Rules NodeJS patches) is now written inside[name].sh.runfiles/
. (#27)- BREAKING Normalised entry point selection for
nodejs_binary
executables to always be under[name].sh.runfiles/
. Previously this changed depending on how the executable was started. (#28) - Refactored
npm_install
andyarn_install
data
copy logic to be slightly faster, though it is still quite slow overall. (#29) - Yarn is now run with
YARN_IGNORE_PATH=1
to prevent overrides in.yarnrc
from kicking in. (#34) - Added
--ignore-platform
toyarn install
invocation inyarn_install
for a more deterministicnode_modules
. (#39)
Deprecated
NA
Removed
- Entry point for
nodejs_binary
must be a file,DirectoryFilePathInfo
provider is no longer supported. (#28)
Fixed
- Remote execution and sandboxing support. (#26) (#27)
- Races between
nodejs_binary
defined processes due to writing executable-specific data to shared locations. (#26) (#27) npm_install
andyarn_install
now mark all their inputs by passing them torepository_ctx.path(...)
ASAP so the resulting restarts are cheaper. (#29)- Updated
DeclarationInfo
provider inclusions for new TypeScript files (.cts
and.mts
outputs). (#30) - Cross platform builds involving
nodejs_binary
no longer includes the NodeJS for the host (machine running Bazel client) unnecessarily. (#35) (#37) - Increase Yarn Classic network mutex timeout to account for timeout logic changes in NodeJS 18. (#36)
- Removed platform-specific paths from
nodejs_binary
which reduced cache hit rates. (#38)
Security
NA
v00dd61b
pre-release of #21
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "6314d22755e10f7abd961a18f69c4b7e485db88182f07accf63ebe28558149ff",
urls = add_canva_mirrors([
"https://github.com/Canva/rules_nodejs/releases/download/v00dd61b/rules_nodejs-v00dd61b.tar.gz",
]),
)