5.0.0-rc.0 (2022-01-14)
Bug Fixes
- allow cypress to run on m1 macs (#3088) (ac96783)
- create a bazel-out node_modules tree using copy_file in the external repo when exports_directories_only is True (#3241) (f5eed08)
- filter out .d.ts before passing srcs to transpiler (#3238) (11460e8)
- typescript: better error when transpiler is used and no declarations are emitted (72c3662), closes #3209
- add arm64 as a platform to //packages/concatjs:docs_scrub_platform (#3089) (8161dcc)
- bump jasmine-reporters to 2.5.0 (#3180) (efbc33b)
- change all cfg=host and cfg=target executable attributes to cfg=exec (9fd3fb9)
- don't symlink execroot node_modules when under bazel run (d19e20b)
- merge conflict on 5.x branch (c91f5b6)
- normalize module path passed to runfiles helper for robustness (#3094) (20e121b)
- remove _repository_args from nodejs_binary (90c7fe0)
- remove node and use toolchain (#3144) (cb83746)
- remove trailing forward slash when resolving workspace root link in runfiles MANIFEST (#3093) (bcff217)
- turn off preserve_symlinks in e2e/node_loader_no_preserve_symlinks test (5410ab2)
- update linker to be tolerant to linking to different output trees (0d93719)
- builtin: detect yarn 2+ berry and adjust CLI args (#3195) (9b2c08b), closes #3071 #1599
- builtin: don't use local:1 spawn (#3084) (f77e9fd)
- builtin: fixed missing dist targets (#3068) (6c13dac)
- builtin: handle external repository file paths in js_library strip_prefix check (08c75a2)
- builtin: js_library: propagate all default_runfiles (#3183) (d07b104), closes #3182
- builtin: pkg_npm shouldn't assume the name of the nodejs toolchain (#3129) (552178e)
- builtin: provide a DeclarationInfo from js_library is any input files are directories (TreeArtifacts) (a1d49ae)
- builtin: retrieve yarn shasums from Github releases, rather than npm registry (88ce34d)
- builtin: support mjs/cjs files as javascript files in
js_library
(9e9bf01) - create: relocate help argument evaluation (441e3b8)
- esbuild: allow passing additional args to the npm install for esbuild (#3063) (fb2165c)
- esbuild: allow whitespace within args (#2998) (181b55d), closes #2997
- esbuild: do not ignore annotations when the
minify
shorthand attribute is disabled (#3106) (b1275c5) - esbuild: format attribute not working with multiple entry points (#3103) (1000e2b)
- examples: run jest updateSnapshot in the workspace (#3041) (e005d82)
- typescript: add build_test to ensure typecheck is run under --build_tests_only (#3196) (9622443)
- typescript: don't set resolveJsonModule in generated tsconfig if tsconfig is dict and resolve_json_module is unset (19cd74e)
- typescript: ts_project transpiler produces js_library (#3187) (c9a66e0)
- #3054 regression in linker behavior in 4.4.2 (#3059) (92965b2)
- correct bzl_library target graph (#3049) (07df333)
- don't link runfiles node_modules to execroot node_modules if there is an external workspace node_modules (#3060) (1d5defa)
- terser semver compatibility range (da7399e)
- unset INIT_CWD and npm_config_registry before calling yarn in yarn_install (b62e1e8)
- update tsconfigs to include darwin_arm64-fastbuild in rootDirs (#3087) (1f75f40)
- typescript: don't declare outputs that collide with inputs (#3046) (9b47df1)
- typescript: give better error when noEmit is set (#3047) (74dd86e)
- simplify portion of linker and fix case where runfiles node_modules symlinks are missing under bazel run (8c1f26c)
chore
Code Refactoring
- depend on bazel-skylib at runtime (#3056) (e5d4803)
- move yarn fetch to a separate external repo (975ae9b)
- builtin: npm_umd_bundle no longer allows directory sources (c87ec6b)
Features
- add bzlmod extension (#3146) (878ece2)
- add src patch being copied to progress message of vendored copy_file (7aafe15)
- add src patch being copied to progress message of vendored copy_file (#3206) (ddc985c)
- default package_path to the directory of the package.json file in yarn_install and npm_install (#3233) (dcbad88)
- macros nodejs_binary_toolchains nodejs_test_toolchains input multiple toolchains nodejs_binary or nodejs_test (#3132) (55a7521)
- set exports_directories_only default to True in yarn_install & npm_install repository rules (ee0e507)
- use tree artifacts via copy_directory with exports_directories_only (91fa0ae)
- builtin: npm_install/yarn_install node repo (#3164) (8e277e4)
- esbuild: add option to disable metafile generation (#3066) (837cb23)
- esbuild: make Starlark build settings usable as defines (#3122) (f22502d)
- typescript: allow alternative transpilers (#3134) (507ec3d), closes #3133
- support --stamp env vars in npm_package_bin (#3162) (38fee32)
- node: use multiple versions of node, can run old and new toolchains and default behaviour is not broken (#3125) (12a521d)
BREAKING CHANGES
- vendored_yarn attribute is removed
- The default nodejs version is now 16.12.0.
To go back to the previous default, put this in your WORKSPACE:
load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")
node_repositories(
node_version = "14.17.5",
)
- build_bazel_rules_nodejs now depends on bazel_skylib.
You can install it in your WORKSPACE directly, or use our helper macro like so:
- builtin: npm_umd_bundle users cannot use exports_directories_only