Skip to content

Releases: Canva/rules_nodejs

v3.8.0-20240716

18 Jul 00:31
d74ba96
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.8.0-20240702...v3.8.0-20240716

v3.8.0-20240702

01 Jul 23:55
954a6b5
Compare
Choose a tag to compare

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

24 Apr 05:29
2890851
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.8.0-20240301...v3.8.0-20240424

v3.8.0: 2024-03-01 Edition

01 Mar 04:54
22be0dc
Compare
Choose a tag to compare

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 by yarn_install. (#50)
  • Removed pkg_web rule. (#51)

Fixed

  • Fixed preinstall_cmd running in the wrong directory. (#46)

v3.8.0: 2024-01-24 Edition

24 Jan 02:58
e5b4cce
Compare
Choose a tag to compare

Added

  • Add preinstall_cmd attribute to npm_install and yarn_install as a Bazel-only equivalent to the preinstall hook. (#46)

Fixed

  • Removed hardcoded dependency on @nodejs//:node_bin and @nodejs//:bin/node_repo_args.sh in nodejs_binary. (#44)
  • Detect missing node_modules after running yarn install in case of malfunction so yarn_install repos are not left in an invalid state. (#47)

v3.8.0: 2023-12-08 Edition

08 Dec 03:22
9bc6f08
Compare
Choose a tag to compare

Changed

  • Allow pkg_npm outputs to be cached. (#43)

Fixed

  • Changed how pkg_npm references package contents to improve reliability. (#43)

v3.8.0: 2023-12-06 Edition

06 Dec 07:42
4af5b4b
Compare
Choose a tag to compare

Changed

  • Optimised declaration of npm_install and yarn_install dependencies. (#42)

Fixed

  • Optimised copy failing on platforms which use a strict POSIX shell for /bin/sh. (#42)

v3.8.0: 2023-12-05 Edition

04 Dec 23:49
f26a72c
Compare
Choose a tag to compare

Changed

  • Optimised copying of data dependencies in npm_install and yarn_install. (#41 )

v3.8.0: 2023-12-04 Edition

04 Dec 02:39
107fd74
Compare
Choose a tag to compare

Added

  • WORKAROUND CUSTOM_NODE_ENTRY and NM_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 for nodejs_binary executables. Causes the entry point to be resolved to the actual file via rlocation. (#28)
  • WORKAROUND Flag --bazel_use_legacy_execroot_paths__variant_execroot_main for nodejs_binary executables. Causes the entry point to be resolved to the file directly under execroot. (#28)
  • Ensure proxy environment variables (e.g. HTTPS_PROXY) are propagated to npm in npm_install and yarn in yarn_install. (#31)
  • Updated NodeJS versions list. (#32)
  • Updated Yarn Classic versions list. (#33)

Changed

  • .pyc files from node_module included with NodeJS are now deleted, as they were unnecessary (an optimisation for CPython) and non-deterministic. (#24)
  • .node files from node_modules included with NodeJS are now run through the strip 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 and yarn_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 to yarn install invocation in yarn_install for a more deterministic node_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 and yarn_install now mark all their inputs by passing them to repository_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

16 Nov 06:12
Compare
Choose a tag to compare
v00dd61b Pre-release
Pre-release

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",
    ]),
)