Skip to content

Releases: aspect-build/rules_js

v1.1.0

27 Aug 04:22
e0c2462
Compare
Choose a tag to compare

This release includes new features, fixes, performance improvements and memory usage optimizations.

Thanks to @vpanta for helping us debug memory usage issues for this release and to all of our contributors.

Thanks to lots of work from @fmeum in Bazel upstream, this release can now be used with RBE. There's still one change not yet landed in Bazel upstream, so you have to use our fork for right now. https://github.com/aspect-build/rules_js/blob/be053d9980e91dc6303fdb0a040d5c4ea656f74d/.github/workflows/ci.yaml#L56 is our critical line that selects our fork when running RBE builds on CI.

If you're also using one of our downstream rule sets such as rules_ts, you'll also need to update to the latest version of those for compatibility with this release. At time of writing these are,

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "25bcb082d49616ac2da538bf7bdd33a9730c8884edbec787fec83db07e4f7f16",
    strip_prefix = "rules_js-1.1.0",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.1.0.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • docs: stardoc for js_image_layer by @alexeagle in #373
  • feat: always make a @pnpm workspace by @alexeagle in #377
  • refactor: cleanup bzl_library in js_image by @alexeagle in #380
  • feat: add expand_template rule that support stamp var substitutions; not yet part of the public API by @gregmagolan in #384
  • fix: run lifecycle hooks outside of sandbox by default by @gregmagolan in #389
  • fix: provide runfiles of all transitives from npm_link_package_store by @gregmagolan in #392
  • feat: add node_modules/.bin binary files support to npm_translate_lock, npm_import and npm_link_package_store by @gregmagolan in #390
  • fix: fix relative paths of bins in lifecycle hooks for @Scoped packages by @jfirebaugh in #388
  • fix: write lifecycle hook enable flag & custom postinstall to aspect_rules_js.json instead of overwriting package.json by @gregmagolan in #393
  • fix: fix node_modules/.bin script pathing when pnpm workspace is not at the root of the WORKSPACE by @gregmagolan in #395
  • fix: add error handling for failure of pnpm import by @alexeagle in #398
  • fix: handle nested symlinks via relative directory symlinks in sandbox by @gregmagolan in #404
  • fix: add link_workspace to npm_translate_lock to support change in repository_ctx label workspace_name behavior in bazel 5.3.0 by @gregmagolan in #405
  • chore(deps): update dependency @types/node to v16.11.54 by @renovate in #382
  • chore(deps): update dependency bazel to v5.3.0 by @renovate in #403
  • chore: add CI on RBE by @alexeagle in #400
  • feat: demonstrate stamping the version into package.json by @alexeagle in #402
  • fix: use depsets instead of lists in rules_js providers by @gregmagolan in #413
  • feat: add data attribute to npm_package for specifying runtime/linktime directory npm dependencies by @gregmagolan in #414
  • fix(deps): update dependency uvu to v0.5.6 by @renovate in #415

Full Changelog: v1.0.0...v1.1.0

v1.0.0

07 Aug 23:43
28bb664
Compare
Choose a tag to compare

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "538049993bec3ee1ae9b1c3cd669156bca04eb67027b222883e47b0a2aed2e67",
    strip_prefix = "rules_js-1.0.0",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • chore: update to aspect_bazel_lib 1.2.0 by @gregmagolan in #209
  • fix: broken tests caused by platform incompatible postinstall scripts by @kormide in #210
  • docs: improve our recommended pattern for amending the npm depgraph by @alexeagle in #212
  • fix: fix a broken diff_test on Windows requiring legacy external runfiles by @kormide in #213
  • fix: keep lockfile up to date example windows regression by @kormide in #215
  • feat: add out_dirs, mnemonic, progress_message and execution_requirements to js_run_binary rule and remote output_dir by @gregmagolan in #216
  • fix: add bin name as default mnemonic to generated bins by @thesayyn in #218
  • chore(deps): update dependency @aspect-test/c to v2.0.2 by @renovate in #211
  • temporary workaround for fasterci by @apesternikov in #204
  • chore: mocha example doesn't need copy_to_bin by @alexeagle in #223
  • feat: add public_hoist_packages attribute to npm_translate_lock to emulate .npmrc public-hoist-pattern[] by @gregmagolan in #222
  • Use pnpm workspace dep on a 1p package by @alexeagle in #170
  • fix: improve error handling if there are conflicting public hoisted packages by @gregmagolan in #224
  • chore: simplify 1p dep example by @gregmagolan in #230
  • refactor: tweak ':' separator locations in package_json.bzl load paths by @gregmagolan in #241
  • fix: use camel case in generated bin mnemonics by @alex-torok in #242
  • fix(deps): update dependency @pnpm/lifecycle to v13.1.0 by @renovate in #240
  • ci: auto-publish to bcr on release by @kormide in #243
  • chore: add suggestion when js_run_binary has no outs by @alexeagle in #253
  • chore(deps): update dependency bazel to v5.2.0 by @renovate in #233
  • refactor: expose bzl_library targets for generated bins by @alexeagle in #250
  • util: add basic ini parser by @jbedard in #246
  • fix: improved symlink guards for sandbox, runfiles & execroot by @gregmagolan in #237
  • fix: remove DefaultInfo.files from js_library by @mrmeku in #252
  • refactor: ask the runfiles API to create our symlinks by @alexeagle in #256
  • feat: add coverage support by @thesayyn in #238
  • fix: don't use orig fs.realpath from patched lstat by @gregmagolan in #258
  • docs: add usage guide by @alexeagle in #255
  • fix: include direct DeclarationInfo files from srcs in npm_package by @gregmagolan in #259
  • feat: support file: links in package.json & pnpm lockfile by @gregmagolan in #262
  • util: add package glob util by @jbedard in #260
  • chore: add an example of using out_dirs with js_run_binary by @gregmagolan in #264
  • bug: js_library with 'deps' no longer pulls deps into sandbox output tree by @alex-torok in #265
  • docs: remove stale reference to non-linked 3p targets by @alexeagle in #275
  • feat: add patch_node_fs attribute to js_binary and js_run_binary for easy opt-out by @gregmagolan in #281
  • feat: parse literal mulitline yaml strings by @kormide in #284
  • fix: determine the RUNFILES directory when running a js_binary in an sh_binary by @gregmagolan in #286
  • feat: add stamp attribute and docstring to js_run_binary by @gregmagolan in #290
  • chore: rename pnpm_workspace_dot_dot => pnpm_workspace_rerooted by @gregmagolan in #291
  • chore: refactor duplicate code info helper function in npm_translate_lock by @gregmagolan in #293
  • fix: small typo in e2e code by @gregmagolan in #294
  • fix: fix relative symlinks handing in node fs patches by @gregmagolan in #292
  • chore: cleanup bzlmod e2e loose inconsistencies by @gregmagolan in #295
  • fix: handle transitive file: dependencies by @gregmagolan in #288
  • feat: allow lifecycle hooks environment variables for the npm_import rule by @JiaLiPassion in #280
  • fix: only include direct DeclarationInfo dependencies in js_library DeclarationInfo by @jbedard in #300
  • fix: make //js/private:enable_runfiles explicitly have //visibility:public by @dgp1130 in #301
  • test: add node process spawning tests by @jbedard in #299
  • fix(deps): pin dependency sharp to 0.30.7 by @renovate in #297
  • chore: add reminder to clean up bazelrc once skylib fix is released by @kormide in #303
  • feat: add an example for js_image_layer by @thesayyn in #249
  • fix: only run tests cases that depend on realpath on linux by @gregmagolan in #307
  • feat: use declare_symlink in npm_link_package when --experimental_allow_unresolved_symlinks is set by @gregmagolan in #283
  • docs: fix js_image fs tree by @thesayyn in #312
  • fix: fix typo in make_symlink helper for the declare_symlink path that is not load bearing yet by @gregmagolan in #314
  • fix: apply node fs patched symlink guards in spawned child node processes by @gregmagolan in #310
  • docs: fix squished file tree by @thesayyn in #315
  • fix: bcr actions not triggering by @kormide in #319
  • fix: generate package_json.bzl only when pkg has bins by @thesayyn in #320
  • chore: update to aspect_bazel_lib 1.8.0 by @gregmagolan in #322
  • fix: ensure RUNFILES environment variable is always absolute by @gregmagolan in #323
  • fix: pick up DeclarationInfo from srcs in js_libary by @gregmagolan in #324
  • chore: update to aspect_bazel_lib 1.8.1 by @gregmagolan in #325
  • chore: update to aspect_bazel_lib 1.9.0 by @gregmagolan in #326
  • chore: update to aspect_bazel_lib 1.9.1 by @gregmagolan in #327
  • chore: update to aspect_bazel_lib_1.9.2 by @gregmagolan in #329
  • refactor: pre-factors for introducing JsInfo and related fixes and features by @gregmagolan in #330
  • feat: add lifecycle_hooks_execution_requirements attribute by @JiaLiPassion in #331
  • refactor: rename allow_unresolved_symlinks attribute on npm_package_store to use_declare_symlink by @gregmagolan in #332
  • chore: rename some dangling 'direct link' references to just 'link' by @gregmagolan in #333
  • fix(deps): update dependency chalk to v5 by @renovate in #306
  • chore(deps): update...
Read more

v1.0.0-rc.4

02 Aug 22:15
a0fe8ef
Compare
Choose a tag to compare
v1.0.0-rc.4 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "f2b36aac9d3368e402c9083c884ad9b26ca6fa21e83b53c12482d6cb2e949451",
    strip_prefix = "rules_js-1.0.0-rc.4",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-rc.4.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • chore: update to aspect_bazel_lib_1.9.2 by @gregmagolan in #329
  • refactor: pre-factors for introducing JsInfo and related fixes and features by @gregmagolan in #330
  • feat: add lifecycle_hooks_execution_requirements attribute by @JiaLiPassion in #331
  • refactor: rename allow_unresolved_symlinks attribute on npm_package_store to use_declare_symlink by @gregmagolan in #332
  • chore: rename some dangling 'direct link' references to just 'link' by @gregmagolan in #333
  • fix(deps): update dependency chalk to v5 by @renovate in #306
  • chore(deps): update yarn to v3.2.2 by @renovate in #302
  • chore: rename some dangling 'direct link' references to just 'link' by @gregmagolan in #335
  • fix: js_binary doesn't need to copy files to bin for runfiles inputs by @gregmagolan in #334
  • chore: update out-of-date js_library docs by @gregmagolan in #336
  • npm_translate_lock: accept package-lock.json and run pnpm import by @jfirebaugh in #276
  • feat: introduce JsInfo provider that encapsulates information provided by rules in rules_js and derivative rule sets by @gregmagolan in #318
  • refactor: follow up fixes and optimizations after JsInfo introduction by @gregmagolan in #339
  • refactor: add JS_LIBRARY_DEPS_ATTR and JS_LIBRARY_DATA_ATTR helper attributes to //js:libs.bzl for downstream build/library rules to use by @gregmagolan in #340
  • chore: improve js_library docstrings by @gregmagolan in #342
  • fix: add missing file needed for gh actions bcr workflow by @kormide in #343
  • refactor: rollback JS_LIBRARY_DATA_ATTR from the public API since it is not useful in any downstream rules at this time by @gregmagolan in #344

Full Changelog: v1.0.0-rc.3...v1.0.0-rc.4

v0.14.0

02 Aug 21:59
a0fe8ef
Compare
Choose a tag to compare
v0.14.0 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "a0153f68b8b91aaf316a21de8ca3d641bd923a05d92f59ecdb3e3f819b65f957",
    strip_prefix = "rules_js-0.14.0",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v0.14.0.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • chore: update to aspect_bazel_lib 1.2.0 by @gregmagolan in #209
  • fix: broken tests caused by platform incompatible postinstall scripts by @kormide in #210
  • docs: improve our recommended pattern for amending the npm depgraph by @alexeagle in #212
  • fix: fix a broken diff_test on Windows requiring legacy external runfiles by @kormide in #213
  • fix: keep lockfile up to date example windows regression by @kormide in #215
  • feat: add out_dirs, mnemonic, progress_message and execution_requirements to js_run_binary rule and remote output_dir by @gregmagolan in #216
  • fix: add bin name as default mnemonic to generated bins by @thesayyn in #218
  • chore(deps): update dependency @aspect-test/c to v2.0.2 by @renovate in #211
  • temporary workaround for fasterci by @apesternikov in #204
  • chore: mocha example doesn't need copy_to_bin by @alexeagle in #223
  • feat: add public_hoist_packages attribute to npm_translate_lock to emulate .npmrc public-hoist-pattern[] by @gregmagolan in #222
  • Use pnpm workspace dep on a 1p package by @alexeagle in #170
  • fix: improve error handling if there are conflicting public hoisted packages by @gregmagolan in #224
  • chore: simplify 1p dep example by @gregmagolan in #230
  • refactor: tweak ':' separator locations in package_json.bzl load paths by @gregmagolan in #241
  • fix: use camel case in generated bin mnemonics by @alex-torok in #242
  • fix(deps): update dependency @pnpm/lifecycle to v13.1.0 by @renovate in #240
  • ci: auto-publish to bcr on release by @kormide in #243
  • chore: add suggestion when js_run_binary has no outs by @alexeagle in #253
  • chore(deps): update dependency bazel to v5.2.0 by @renovate in #233
  • refactor: expose bzl_library targets for generated bins by @alexeagle in #250
  • util: add basic ini parser by @jbedard in #246
  • fix: improved symlink guards for sandbox, runfiles & execroot by @gregmagolan in #237
  • fix: remove DefaultInfo.files from js_library by @mrmeku in #252
  • refactor: ask the runfiles API to create our symlinks by @alexeagle in #256
  • feat: add coverage support by @thesayyn in #238
  • fix: don't use orig fs.realpath from patched lstat by @gregmagolan in #258
  • docs: add usage guide by @alexeagle in #255
  • fix: include direct DeclarationInfo files from srcs in npm_package by @gregmagolan in #259
  • feat: support file: links in package.json & pnpm lockfile by @gregmagolan in #262
  • util: add package glob util by @jbedard in #260
  • chore: add an example of using out_dirs with js_run_binary by @gregmagolan in #264
  • bug: js_library with 'deps' no longer pulls deps into sandbox output tree by @alex-torok in #265
  • docs: remove stale reference to non-linked 3p targets by @alexeagle in #275
  • feat: add patch_node_fs attribute to js_binary and js_run_binary for easy opt-out by @gregmagolan in #281
  • feat: parse literal mulitline yaml strings by @kormide in #284
  • fix: determine the RUNFILES directory when running a js_binary in an sh_binary by @gregmagolan in #286
  • feat: add stamp attribute and docstring to js_run_binary by @gregmagolan in #290
  • chore: rename pnpm_workspace_dot_dot => pnpm_workspace_rerooted by @gregmagolan in #291
  • chore: refactor duplicate code info helper function in npm_translate_lock by @gregmagolan in #293
  • fix: small typo in e2e code by @gregmagolan in #294
  • fix: fix relative symlinks handing in node fs patches by @gregmagolan in #292
  • chore: cleanup bzlmod e2e loose inconsistencies by @gregmagolan in #295
  • fix: handle transitive file: dependencies by @gregmagolan in #288
  • feat: allow lifecycle hooks environment variables for the npm_import rule by @JiaLiPassion in #280
  • fix: only include direct DeclarationInfo dependencies in js_library DeclarationInfo by @jbedard in #300
  • fix: make //js/private:enable_runfiles explicitly have //visibility:public by @dgp1130 in #301
  • test: add node process spawning tests by @jbedard in #299
  • fix(deps): pin dependency sharp to 0.30.7 by @renovate in #297
  • chore: add reminder to clean up bazelrc once skylib fix is released by @kormide in #303
  • feat: add an example for js_image_layer by @thesayyn in #249
  • fix: only run tests cases that depend on realpath on linux by @gregmagolan in #307
  • feat: use declare_symlink in npm_link_package when --experimental_allow_unresolved_symlinks is set by @gregmagolan in #283
  • docs: fix js_image fs tree by @thesayyn in #312
  • fix: fix typo in make_symlink helper for the declare_symlink path that is not load bearing yet by @gregmagolan in #314
  • fix: apply node fs patched symlink guards in spawned child node processes by @gregmagolan in #310
  • docs: fix squished file tree by @thesayyn in #315
  • fix: bcr actions not triggering by @kormide in #319
  • fix: generate package_json.bzl only when pkg has bins by @thesayyn in #320
  • chore: update to aspect_bazel_lib 1.8.0 by @gregmagolan in #322
  • fix: ensure RUNFILES environment variable is always absolute by @gregmagolan in #323
  • fix: pick up DeclarationInfo from srcs in js_libary by @gregmagolan in #324
  • chore: update to aspect_bazel_lib 1.8.1 by @gregmagolan in #325
  • chore: update to aspect_bazel_lib 1.9.0 by @gregmagolan in #326
  • chore: update to aspect_bazel_lib 1.9.1 by @gregmagolan in #327
  • chore: update to aspect_bazel_lib_1.9.2 by @gregmagolan in #329
  • refactor: pre-factors for introducing JsInfo and related fixes and features by @gregmagolan in #330
  • feat: add lifecycle_hooks_execution_requirements attribute by @JiaLiPassion in #331
  • refactor: rename allow_unresolved_symlinks attribute on npm_package_store to use_declare_symlink by @gregmagolan in #332
  • chore: rename some dangling 'direct link' references to just 'link' by @gregmagolan in #333
  • fix(deps): update dependency chalk to v5 by @renovate in #306
  • chore(deps): update yarn to v3.2.2 by @renovate in #302
  • chore: rename some dangl...
Read more

v1.0.0-rc.3

30 Jul 03:50
07f31d4
Compare
Choose a tag to compare
v1.0.0-rc.3 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "b82da82edf64ba7e07e568193d645fc09b0a4ec92e0d82bd4e53d1a0e28ff681",
    strip_prefix = "rules_js-1.0.0-rc.3",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-rc.3.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • fix: only include direct DeclarationInfo dependencies in js_library DeclarationInfo by @jbedard in #300
  • fix: make //js/private:enable_runfiles explicitly have //visibility:public by @dgp1130 in #301
  • test: add node process spawning tests by @jbedard in #299
  • fix(deps): pin dependency sharp to 0.30.7 by @renovate in #297
  • chore: add reminder to clean up bazelrc once skylib fix is released by @kormide in #303
  • feat: add an example for js_image_layer by @thesayyn in #249
  • fix: only run tests cases that depend on realpath on linux by @gregmagolan in #307
  • feat: use declare_symlink in npm_link_package when --experimental_allow_unresolved_symlinks is set by @gregmagolan in #283
  • docs: fix js_image fs tree by @thesayyn in #312
  • fix: fix typo in make_symlink helper for the declare_symlink path that is not load bearing yet by @gregmagolan in #314
  • fix: apply node fs patched symlink guards in spawned child node processes by @gregmagolan in #310
  • docs: fix squished file tree by @thesayyn in #315
  • fix: bcr actions not triggering by @kormide in #319
  • fix: generate package_json.bzl only when pkg has bins by @thesayyn in #320
  • chore: update to aspect_bazel_lib 1.8.0 by @gregmagolan in #322
  • fix: ensure RUNFILES environment variable is always absolute by @gregmagolan in #323
  • fix: pick up DeclarationInfo from srcs in js_libary by @gregmagolan in #324
  • chore: update to aspect_bazel_lib 1.8.1 by @gregmagolan in #325
  • chore: update to aspect_bazel_lib 1.9.0 by @gregmagolan in #326
  • chore: update to aspect_bazel_lib 1.9.1 by @gregmagolan in #327

New Contributors

Full Changelog: v1.0.0-rc.2...v1.0.0-rc.3

v1.0.0-rc.2

19 Jul 18:25
a58c838
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "a6d31c98f30eb503e836201d723b3164c5e07ba34553d260f71720a819d8ba4c",
    strip_prefix = "rules_js-1.0.0-rc.2",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-rc.2.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • bug: js_library with 'deps' no longer pulls deps into sandbox output tree by @alex-torok in #265
  • docs: remove stale reference to non-linked 3p targets by @alexeagle in #275
  • feat: add patch_node_fs attribute to js_binary and js_run_binary for easy opt-out by @gregmagolan in #281
  • feat: parse literal mulitline yaml strings by @kormide in #284
  • fix: determine the RUNFILES directory when running a js_binary in an sh_binary by @gregmagolan in #286
  • feat: add stamp attribute and docstring to js_run_binary by @gregmagolan in #290
  • chore: rename pnpm_workspace_dot_dot => pnpm_workspace_rerooted by @gregmagolan in #291
  • chore: refactor duplicate code info helper function in npm_translate_lock by @gregmagolan in #293
  • fix: small typo in e2e code by @gregmagolan in #294
  • fix: fix relative symlinks handing in node fs patches by @gregmagolan in #292
  • chore: cleanup bzlmod e2e loose inconsistencies by @gregmagolan in #295
  • fix: handle transitive file: dependencies by @gregmagolan in #288
  • feat: allow lifecycle hooks environment variables for the npm_import rule by @JiaLiPassion in #280

New Contributors

Full Changelog: v1.0.0-rc.1...v1.0.0-rc.2

v1.0.0-rc.1

30 Jun 02:08
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "80e168f9cd62f3640de429b70b34ff817d0d94ada2abaf2cffeef46e35434e1d",
    strip_prefix = "rules_js-1.0.0-rc.1",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-rc.1.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

Full Changelog: v1.0.0-rc.0...v1.0.0-rc.1

v1.0.0-rc.0

28 Jun 02:56
e22361d
Compare
Choose a tag to compare
v1.0.0-rc.0 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "be39996444ab94de605e21cdcaa9bc4965a96186329d776e400b47fefd540902",
    strip_prefix = "rules_js-1.0.0-rc.0",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-rc.0.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • Use pnpm workspace dep on a 1p package by @alexeagle in #170
  • fix: improve error handling if there are conflicting public hoisted packages by @gregmagolan in #224
  • chore: simplify 1p dep example by @gregmagolan in #230
  • refactor: tweak ':' separator locations in package_json.bzl load paths by @gregmagolan in #241
  • fix: use camel case in generated bin mnemonics by @alex-torok in #242
  • fix(deps): update dependency @pnpm/lifecycle to v13.1.0 by @renovate in #240
  • ci: auto-publish to bcr on release by @kormide in #243
  • chore: add suggestion when js_run_binary has no outs by @alexeagle in #253
  • chore(deps): update dependency bazel to v5.2.0 by @renovate in #233
  • refactor: expose bzl_library targets for generated bins by @alexeagle in #250
  • util: add basic ini parser by @jbedard in #246
  • fix: improved symlink guards for sandbox, runfiles & execroot by @gregmagolan in #237
  • fix: remove DefaultInfo.files from js_library by @mrmeku in #252
  • refactor: ask the runfiles API to create our symlinks by @alexeagle in #256
  • feat: add coverage support by @thesayyn in #238
  • fix: don't use orig fs.realpath from patched lstat by @gregmagolan in #258

New Contributors

Full Changelog: v1.0.0-beta.2...v1.0.0-rc.0

v1.0.0-beta.2

20 Jun 15:09
db88926
Compare
Choose a tag to compare
v1.0.0-beta.2 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "529a7100fd757d1fe6d39901688b0ae4cfe033b7d432e9c4cfc022f33e3ec7fc",
    strip_prefix = "rules_js-1.0.0-beta.2",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-beta.2.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • chore: mocha example doesn't need copy_to_bin by @alexeagle in #223
  • feat: add public_hoist_packages attribute to npm_translate_lock to emulate .npmrc public-hoist-pattern[] by @gregmagolan in #222

Full Changelog: v1.0.0-beta.1...v1.0.0-beta.2

v1.0.0-beta.1

17 Jun 14:43
Compare
Choose a tag to compare
v1.0.0-beta.1 Pre-release
Pre-release

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "aspect_rules_js",
    sha256 = "02486a3b54fab15e6af00a6b79944b9660e43fd91ac56f8e34812a9053dc60bb",
    strip_prefix = "rules_js-1.0.0-beta.1",
    url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.0.0-beta.1.tar.gz",
)

load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")

rules_js_dependencies()

load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains")

nodejs_register_toolchains(
    name = "nodejs",
    node_version = DEFAULT_NODE_VERSION,
)

load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")

npm_translate_lock(
    name = "npm",
    pnpm_lock = "//:pnpm-lock.yaml",
    verify_node_modules_ignored = "//:.bazelignore",
)

load("@npm//:repositories.bzl", "npm_repositories")

npm_repositories()

What's Changed

  • chore: update to aspect_bazel_lib 1.2.0 by @gregmagolan in #209
  • fix: broken tests caused by platform incompatible postinstall scripts by @kormide in #210
  • docs: improve our recommended pattern for amending the npm depgraph by @alexeagle in #212
  • fix: fix a broken diff_test on Windows requiring legacy external runfiles by @kormide in #213
  • fix: keep lockfile up to date example windows regression by @kormide in #215
  • feat: add out_dirs, mnemonic, progress_message and execution_requirements to js_run_binary rule and remote output_dir by @gregmagolan in #216
  • fix: add bin name as default mnemonic to generated bins by @thesayyn in #218
  • chore(deps): update dependency @aspect-test/c to v2.0.2 by @renovate in #211
  • temporary workaround for fasterci by @apesternikov in #204

Full Changelog: v0.13.0...v1.0.0-beta.1