diff --git a/.aspect/bazelrc/.gitignore b/.aspect/bazelrc/.gitignore new file mode 100644 index 000000000..f25e3ebf8 --- /dev/null +++ b/.aspect/bazelrc/.gitignore @@ -0,0 +1 @@ +user.bazelrc \ No newline at end of file diff --git a/.bazelrc b/.bazelrc index 76de0a221..0943b5093 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,7 +6,7 @@ import %workspace%/.aspect/bazelrc/debug.bazelrc import %workspace%/.aspect/bazelrc/javascript.bazelrc import %workspace%/.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### # We have some empty globs in rules_js common --noincompatible_disallow_empty_glob @@ -15,14 +15,6 @@ common --noincompatible_disallow_empty_glob build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build --incompatible_enable_cc_toolchain_resolution -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off - # Mock versioning command to test the --stamp behavior build --workspace_status_command="echo BUILD_SCM_VERSION 1.2.3" diff --git a/.github/workflows/BUILD.bazel b/.github/workflows/BUILD.bazel index fea17ed20..ad948c869 100644 --- a/.github/workflows/BUILD.bazel +++ b/.github/workflows/BUILD.bazel @@ -1,5 +1,3 @@ -"Aspect bazelrc presets; see https://docs.aspect.build/guides/bazelrc" - load("@aspect_bazel_lib//lib:bazelrc_presets.bzl", "write_aspect_bazelrc_presets") write_aspect_bazelrc_presets( diff --git a/.github/workflows/ci.bazelrc b/.github/workflows/ci.bazelrc index 1779978ab..915584e86 100644 --- a/.github/workflows/ci.bazelrc +++ b/.github/workflows/ci.bazelrc @@ -2,8 +2,11 @@ common:local --disk_cache=~/.cache/bazel-disk-cache common --repository_cache=~/.cache/bazel-repository-cache -# Bazel-in-bazel support -test --test_env=XDG_CACHE_HOME +# Debug where options came from +common --announce_rc + +# Allows tests to run bazelisk-in-bazel, since this is the cache folder used +common --test_env=XDG_CACHE_HOME # Remote execution build:rbe --bes_backend=grpcs://remote.buildbuddy.io diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b8df6b780..10419ec26 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -230,7 +230,7 @@ jobs: ~/.cache/xdg-cache key: >- bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.folder }}- - ${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.js', '!e2e') }}- + ${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', '**/*.js', '!e2e') }}- ${{ hashFiles(format('{0}/.bazelrc', matrix.folder), format('{0}/.bazelversion', matrix.folder), format('{0}/.bazeliskrc', matrix.folder), format('{0}/**/BUILD', matrix.folder), format('{0}/**/BUILD.bazel', matrix.folder), format('{0}/**/*.bzl', matrix.folder), format('{0}/WORKSPACE', matrix.folder), format('{0}/WORKSPACE.bazel', matrix.folder), format('{0}/WORKSPACE.bzlmod', matrix.folder), format('{0}/MODULE.bazel', matrix.folder), format('{0}/MODULE.bazel.lock', matrix.folder), format('{0}/**/*.js', matrix.folder)) }} restore-keys: | bazel-cache-${{ matrix.bazel-version.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.folder }}- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c9361576..c09ba3883 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,11 +21,8 @@ jobs: ~/.cache/bazel-disk-cache ~/.cache/bazel-repository-cache ~/.cache/xdg-cache - key: >- - bazel-cache-${{ matrix.bazelversion.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.folder }}- - ${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', 'MODULE.bazel.lock', '**/*.js', '!e2e') }} - restore-keys: | - bazel-cache-${{ matrix.bazelversion.version }}-${{ matrix.bzlmod }}-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.folder }}- + key: bazel-cache-release-${{ hashFiles('.bazelrc', '.bazelversion', '.bazeliskrc', '**/BUILD', '**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', 'WORKSPACE.bazel', 'WORKSPACE.bzlmod', 'MODULE.bazel', '**/*.js', '!e2e') }} + restore-keys: bazel-cache-release- - name: bazel test //... env: XDG_CACHE_HOME: ~/.cache/xdg-cache # bazelisk will download bazel to here diff --git a/.gitignore b/.gitignore index e371e5e4a..a597df8f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,18 @@ bazel-* -**/.terraform/* +.bazelrc.user node_modules/ .pnpm-* + +.idea/ +.ijwb/ +.vscode .DS_Store -.bazelrc.user -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -MODULE.bazel.lock \ No newline at end of file +# Bazel's MODULE lockfile isn't ready to check in yet as of Bazel 7.1. +# Do allow for it to be created, however, since it gives a performance boost for local development. +# [Store resolved repository attributes in the Bzlmod lockfile](https://github.com/bazelbuild/bazel/issues/19026) +# [MODULE.bazel.lock file contains user specific paths](https://github.com/bazelbuild/bazel/issues/19621) +# [Consider skipping bazel_tools@_ from lockfile](https://github.com/bazelbuild/bazel/issues/19971) +# [MODULE.bazel.lock file "reads through" already-locked package manager](https://github.com/bazelbuild/bazel/issues/20272) +# [moduleFileHash in MODULE.bazel.lock causes frequent Git merge conflicts](https://github.com/bazelbuild/bazel/issues/20369) +MODULE.bazel.lock diff --git a/WORKSPACE b/WORKSPACE index 2831132f7..d18d758f2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -215,13 +215,10 @@ buildifier_prebuilt_register_toolchains() load( "@aspect_rules_lint//format:repositories.bzl", "fetch_shfmt", - "fetch_terraform", ) fetch_shfmt() -fetch_terraform() - load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") bazel_toolchain_dependencies() diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 233dc29e7..1472fbe55 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -2,13 +2,10 @@ load( "@aspect_rules_lint//format:repositories.bzl", "fetch_shfmt", - "fetch_terraform", ) fetch_shfmt() -fetch_terraform() - # dev dependency load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") diff --git a/e2e/bzlmod/.bazelrc b/e2e/bzlmod/.bazelrc index a08135e3d..413c99502 100644 --- a/e2e/bzlmod/.bazelrc +++ b/e2e/bzlmod/.bazelrc @@ -6,14 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -common --enable_bzlmod - -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/bzlmod/.npmrc b/e2e/bzlmod/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/bzlmod/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/bzlmod/MODULE.bazel b/e2e/bzlmod/MODULE.bazel index 3432bdb80..da534e8b1 100644 --- a/e2e/bzlmod/MODULE.bazel +++ b/e2e/bzlmod/MODULE.bazel @@ -29,6 +29,7 @@ npm.npm_translate_lock( "less": "npm --version", "jasmine": "tsc --version", }, + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/git_dep_metadata/.bazelrc b/e2e/git_dep_metadata/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/git_dep_metadata/.bazelrc +++ b/e2e/git_dep_metadata/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/gyp_no_install_script/.bazelrc b/e2e/gyp_no_install_script/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/gyp_no_install_script/.bazelrc +++ b/e2e/gyp_no_install_script/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/js_image_docker/.bazelrc b/e2e/js_image_docker/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/js_image_docker/.bazelrc +++ b/e2e/js_image_docker/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/js_image_docker/.npmrc b/e2e/js_image_docker/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/js_image_docker/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/js_image_docker/WORKSPACE b/e2e/js_image_docker/WORKSPACE index 0c87270da..2ea062ced 100644 --- a/e2e/js_image_docker/WORKSPACE +++ b/e2e/js_image_docker/WORKSPACE @@ -23,6 +23,7 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/js_image_oci/.bazelrc b/e2e/js_image_oci/.bazelrc index 4195ecd9a..4a1694d48 100644 --- a/e2e/js_image_oci/.bazelrc +++ b/e2e/js_image_oci/.bazelrc @@ -6,7 +6,7 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### # There are some empty globs in the LLVM toolchain common --noincompatible_disallow_empty_glob @@ -15,10 +15,8 @@ common --noincompatible_disallow_empty_glob build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build --incompatible_enable_cc_toolchain_resolution -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/js_image_oci/.npmrc b/e2e/js_image_oci/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/js_image_oci/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/js_image_oci/MODULE.bazel b/e2e/js_image_oci/MODULE.bazel index e538660ca..08a99ed9d 100644 --- a/e2e/js_image_oci/MODULE.bazel +++ b/e2e/js_image_oci/MODULE.bazel @@ -17,6 +17,7 @@ npm = use_extension( ) npm.npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/js_image_oci/WORKSPACE b/e2e/js_image_oci/WORKSPACE index 39b7950e6..fb38d7fdf 100644 --- a/e2e/js_image_oci/WORKSPACE +++ b/e2e/js_image_oci/WORKSPACE @@ -23,6 +23,7 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/js_run_devserver/.bazelrc b/e2e/js_run_devserver/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/js_run_devserver/.bazelrc +++ b/e2e/js_run_devserver/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_link_package-esm/.bazelrc b/e2e/npm_link_package-esm/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_link_package-esm/.bazelrc +++ b/e2e/npm_link_package-esm/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_link_package-esm/.npmrc b/e2e/npm_link_package-esm/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/npm_link_package-esm/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/npm_link_package-esm/WORKSPACE b/e2e/npm_link_package-esm/WORKSPACE index cfe378efb..dea84e165 100644 --- a/e2e/npm_link_package-esm/WORKSPACE +++ b/e2e/npm_link_package-esm/WORKSPACE @@ -30,6 +30,7 @@ npm_translate_lock( lifecycle_hooks_execution_requirements = { "sharp": ["requires-network"], }, + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/npm_link_package/.bazelrc b/e2e/npm_link_package/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_link_package/.bazelrc +++ b/e2e/npm_link_package/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_link_package/.npmrc b/e2e/npm_link_package/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/npm_link_package/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/npm_link_package/WORKSPACE b/e2e/npm_link_package/WORKSPACE index 4a853a1cf..12b26ccda 100644 --- a/e2e/npm_link_package/WORKSPACE +++ b/e2e/npm_link_package/WORKSPACE @@ -31,6 +31,7 @@ npm_translate_lock( "sharp": ["requires-network"], }, npm_package_target_name = "{dirname}_pkg", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/npm_translate_lock/.bazelrc b/e2e/npm_translate_lock/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock/.bazelrc +++ b/e2e/npm_translate_lock/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_auth/.bazelrc b/e2e/npm_translate_lock_auth/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_auth/.bazelrc +++ b/e2e/npm_translate_lock_auth/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_empty/.bazelrc b/e2e/npm_translate_lock_empty/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_empty/.bazelrc +++ b/e2e/npm_translate_lock_empty/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_git+ssh/.bazelrc b/e2e/npm_translate_lock_git+ssh/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_git+ssh/.bazelrc +++ b/e2e/npm_translate_lock_git+ssh/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_multi/.bazelrc b/e2e/npm_translate_lock_multi/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_multi/.bazelrc +++ b/e2e/npm_translate_lock_multi/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_partial_clone/.bazelrc b/e2e/npm_translate_lock_partial_clone/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_partial_clone/.bazelrc +++ b/e2e/npm_translate_lock_partial_clone/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_subdir_patch/.bazelrc b/e2e/npm_translate_lock_subdir_patch/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_lock_subdir_patch/.bazelrc +++ b/e2e/npm_translate_lock_subdir_patch/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_lock_subdir_patch/.npmrc b/e2e/npm_translate_lock_subdir_patch/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/npm_translate_lock_subdir_patch/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/npm_translate_lock_subdir_patch/MODULE.bazel b/e2e/npm_translate_lock_subdir_patch/MODULE.bazel index 12397fecf..75e2ca156 100644 --- a/e2e/npm_translate_lock_subdir_patch/MODULE.bazel +++ b/e2e/npm_translate_lock_subdir_patch/MODULE.bazel @@ -12,6 +12,7 @@ npm.npm_translate_lock( "//subdir:package.json", "//subdir:patches/debug@4.3.4.patch", ], + npmrc = "//:.npmrc", patch_args = { "*": ["-p1"], }, diff --git a/e2e/npm_translate_lock_subdir_patch/WORKSPACE b/e2e/npm_translate_lock_subdir_patch/WORKSPACE index 5d76c8584..9746888a7 100644 --- a/e2e/npm_translate_lock_subdir_patch/WORKSPACE +++ b/e2e/npm_translate_lock_subdir_patch/WORKSPACE @@ -22,6 +22,7 @@ npm_translate_lock( "//subdir:package.json", "//subdir:patches/debug@4.3.4.patch", ], + npmrc = "//:.npmrc", patch_args = { "*": ["-p1"], }, diff --git a/e2e/npm_translate_package_lock/.bazelrc b/e2e/npm_translate_package_lock/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_package_lock/.bazelrc +++ b/e2e/npm_translate_package_lock/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/npm_translate_yarn_lock/.bazelrc b/e2e/npm_translate_yarn_lock/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/npm_translate_yarn_lock/.bazelrc +++ b/e2e/npm_translate_yarn_lock/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/package_json_module/.bazelrc b/e2e/package_json_module/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/package_json_module/.bazelrc +++ b/e2e/package_json_module/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/package_json_module/.npmrc b/e2e/package_json_module/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/package_json_module/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/package_json_module/MODULE.bazel b/e2e/package_json_module/MODULE.bazel index 81a47157a..6e7d90fe8 100644 --- a/e2e/package_json_module/MODULE.bazel +++ b/e2e/package_json_module/MODULE.bazel @@ -14,6 +14,7 @@ local_path_override( npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/package_json_module/WORKSPACE b/e2e/package_json_module/WORKSPACE index ea3ccba58..da6a67d73 100644 --- a/e2e/package_json_module/WORKSPACE +++ b/e2e/package_json_module/WORKSPACE @@ -18,6 +18,7 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/patch_from_repo/.bazelrc b/e2e/patch_from_repo/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/patch_from_repo/.bazelrc +++ b/e2e/patch_from_repo/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/patch_from_repo/.npmrc b/e2e/patch_from_repo/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/patch_from_repo/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/patch_from_repo/MODULE.bazel b/e2e/patch_from_repo/MODULE.bazel index fae49255b..6e0a7d0ad 100644 --- a/e2e/patch_from_repo/MODULE.bazel +++ b/e2e/patch_from_repo/MODULE.bazel @@ -19,6 +19,7 @@ npm.npm_translate_lock( "//:package.json", "//:pnpm-workspace.yaml", ], + npmrc = "//:.npmrc", patch_args = { "meaning-of-life": ["-p1"], }, @@ -30,5 +31,6 @@ npm.npm_translate_lock( "meaning-of-life@1.0.0": ["@@local_repo~//:meaning-of-life@1.0.0.patch"], }, pnpm_lock = "//:pnpm-lock.yaml", + verify_node_modules_ignored = "//:.bazelignore", ) use_repo(npm, "npm") diff --git a/e2e/patch_from_repo/WORKSPACE b/e2e/patch_from_repo/WORKSPACE index 1ccc9e8d5..f58b6572b 100644 --- a/e2e/patch_from_repo/WORKSPACE +++ b/e2e/patch_from_repo/WORKSPACE @@ -27,6 +27,7 @@ npm_translate_lock( "//:package.json", "//:pnpm-workspace.yaml", ], + npmrc = "//:.npmrc", patch_args = { "meaning-of-life": ["-p1"], }, @@ -34,6 +35,7 @@ npm_translate_lock( "meaning-of-life@1.0.0": ["@local_repo//:meaning-of-life@1.0.0.patch"], }, pnpm_lock = "//:pnpm-lock.yaml", + verify_node_modules_ignored = "//:.bazelignore", ) load("@npm//:repositories.bzl", "npm_repositories") diff --git a/e2e/pnpm_lockfiles/.bazelrc b/e2e/pnpm_lockfiles/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/pnpm_lockfiles/.bazelrc +++ b/e2e/pnpm_lockfiles/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/pnpm_repo_install/.bazelrc b/e2e/pnpm_repo_install/.bazelrc index 9d1cd581b..a883d235c 100644 --- a/e2e/pnpm_repo_install/.bazelrc +++ b/e2e/pnpm_repo_install/.bazelrc @@ -6,14 +6,12 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### build --sandbox_default_allow_network=true -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/pnpm_repo_install/.npmrc b/e2e/pnpm_repo_install/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/pnpm_repo_install/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/pnpm_repo_install/MODULE.bazel b/e2e/pnpm_repo_install/MODULE.bazel index 759db7493..651c0ab22 100644 --- a/e2e/pnpm_repo_install/MODULE.bazel +++ b/e2e/pnpm_repo_install/MODULE.bazel @@ -21,6 +21,7 @@ use_repo(node, "nodejs_linux_arm64") npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/pnpm_repo_install/WORKSPACE b/e2e/pnpm_repo_install/WORKSPACE index ea3ccba58..da6a67d73 100644 --- a/e2e/pnpm_repo_install/WORKSPACE +++ b/e2e/pnpm_repo_install/WORKSPACE @@ -18,6 +18,7 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/pnpm_workspace/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/e2e/pnpm_workspace/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= index 084e2a05c..2a71641e2 100755 --- a/e2e/pnpm_workspace/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= +++ b/e2e/pnpm_workspace/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= @@ -1,6 +1,8 @@ +# @generated # Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. -pnpm-lock.yaml=-768345290 +.npmrc=664934919 +pnpm-lock.yaml=1498964476 package.json=-716078204 pnpm-workspace.yaml=-67685769 app/a/package.json=574382986 diff --git a/e2e/pnpm_workspace/.bazelrc b/e2e/pnpm_workspace/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/pnpm_workspace/.bazelrc +++ b/e2e/pnpm_workspace/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/pnpm_workspace/.npmrc b/e2e/pnpm_workspace/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/pnpm_workspace/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/pnpm_workspace/MODULE.bazel b/e2e/pnpm_workspace/MODULE.bazel index 4066568e9..6d5954021 100644 --- a/e2e/pnpm_workspace/MODULE.bazel +++ b/e2e/pnpm_workspace/MODULE.bazel @@ -42,6 +42,7 @@ npm.npm_translate_lock( "//vendored/a:package.json", "//vendored/b:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace/WORKSPACE b/e2e/pnpm_workspace/WORKSPACE index 90b27fab5..ca46f54d4 100644 --- a/e2e/pnpm_workspace/WORKSPACE +++ b/e2e/pnpm_workspace/WORKSPACE @@ -52,6 +52,7 @@ npm_translate_lock( "//vendored/a:package.json", "//vendored/b:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace/pnpm-lock.yaml b/e2e/pnpm_workspace/pnpm-lock.yaml index 51f7906e4..13f51f6ed 100644 --- a/e2e/pnpm_workspace/pnpm-lock.yaml +++ b/e2e/pnpm_workspace/pnpm-lock.yaml @@ -1,99 +1,115 @@ -lockfileVersion: 5.4 +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: .: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - typescript: 4.9.5 dependencies: - '@aspect-test/a': 5.0.2 - typescript: 4.9.5 + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + typescript: + specifier: 4.9.5 + version: 4.9.5 optionalDependencies: - '@aspect-test/c': 2.0.2 + '@aspect-test/c': + specifier: 2.0.2 + version: 2.0.2 devDependencies: - '@aspect-test/b': 5.0.2 + '@aspect-test/b': + specifier: 5.0.2 + version: 5.0.2 app/a: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/g': 1.0.0 - '@lib/a': workspace:* dependencies: - '@aspect-test/a': 5.0.2 - '@aspect-test/g': 1.0.0 - '@lib/a': link:../../lib/a + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/g': + specifier: 1.0.0 + version: 1.0.0 + '@lib/a': + specifier: workspace:* + version: link:../../lib/a app/b: - specifiers: - '@aspect-test/h': 1.0.0 - '@lib/b': workspace:* - '@lib/b_alias': workspace:@lib/b@* dependencies: - '@aspect-test/h': 1.0.0 - '@lib/b': link:../../lib/b - '@lib/b_alias': link:../../lib/b + '@aspect-test/h': + specifier: 1.0.0 + version: 1.0.0 + '@lib/b': + specifier: workspace:* + version: link:../../lib/b + '@lib/b_alias': + specifier: workspace:@lib/b@* + version: link:../../lib/b app/c: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/g': 1.0.0 - '@lib/c': file:../../lib/c dependencies: - '@aspect-test/a': 5.0.2 - '@aspect-test/g': 1.0.0 - '@lib/c': file:lib/c + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/g': + specifier: 1.0.0 + version: 1.0.0 + '@lib/c': + specifier: file:../../lib/c + version: file:lib/c lib/a: - specifiers: - '@aspect-test/e': 1.0.0 - '@lib/b': workspace:* - vendored-a: file:../../vendored/a - vendored-b: file:../../vendored/b dependencies: - '@aspect-test/e': 1.0.0 - '@lib/b': link:../b - vendored-a: file:vendored/a - vendored-b: file:vendored/b_@lib+b@lib+b + '@aspect-test/e': + specifier: 1.0.0 + version: 1.0.0 + '@lib/b': + specifier: workspace:* + version: link:../b + vendored-a: + specifier: file:../../vendored/a + version: file:vendored/a + vendored-b: + specifier: file:../../vendored/b + version: file:vendored/b(@lib/b@lib+b) lib/b: - specifiers: - '@aspect-test/f': 1.0.0 dependencies: - '@aspect-test/f': 1.0.0 + '@aspect-test/f': + specifier: 1.0.0 + version: 1.0.0 lib/c: - specifiers: - '@aspect-test/f': 1.0.0 dependencies: - '@aspect-test/f': 1.0.0 + '@aspect-test/f': + specifier: 1.0.0 + version: 1.0.0 packages: - /@aspect-test/a/5.0.2: + /@aspect-test/a@5.0.2: resolution: {integrity: sha512-bURS+F0+tS2XPxUPbrqsTZxIre1U5ZglwzDqcOCrU7MbxuRrkO24hesgTMGJldCglwL/tiEGRlvdMndlPgRdNw==} hasBin: true dependencies: '@aspect-test/b': 5.0.2 '@aspect-test/c': 2.0.2 - '@aspect-test/d': 2.0.0_@aspect-test+c@2.0.2 + '@aspect-test/d': 2.0.0(@aspect-test/c@2.0.2) - /@aspect-test/b/5.0.2: + /@aspect-test/b@5.0.2: resolution: {integrity: sha512-I8wnJV5J0h8ui1O3K6XPq1qGHKopTl/OnvkSfor7uJ9yRCm2Qv6Tf2LsTgR2xzkgiwhA4iBwdYFwecwinF244w==} hasBin: true dependencies: '@aspect-test/a': 5.0.2 '@aspect-test/c': 2.0.2 - '@aspect-test/d': 2.0.0_@aspect-test+c@2.0.2 + '@aspect-test/d': 2.0.0(@aspect-test/c@2.0.2) - /@aspect-test/c/2.0.2: + /@aspect-test/c@2.0.2: resolution: {integrity: sha512-rMJmd3YBvY7y0jh+2m72TiAhe6dVKjMMNFFVOXFCbM233m7lsG4cq970H1C8rUsc3AcA5E/cEHlxSVffHlHD2Q==} hasBin: true requiresBuild: true - /@aspect-test/d/2.0.0_@aspect-test+c@2.0.2: + /@aspect-test/d@2.0.0(@aspect-test/c@2.0.2): resolution: {integrity: sha512-jndwr8pLUfn795uApTcXG/yZ5hV2At1aS/wo5BVLxqlVVgLoOETF/Dp4QOjMHE/SXkXFowz6Hao+WpmzVvAO0A==} hasBin: true peerDependencies: @@ -101,27 +117,27 @@ packages: dependencies: '@aspect-test/c': 2.0.2 - /@aspect-test/e/1.0.0: + /@aspect-test/e@1.0.0: resolution: {integrity: sha512-GyAxHYKN650db+xnimHnL2LPz65ilmQsVhCasWA7drDNQn/rfmPiEVMzjRiS7m46scXIERaBmiJMzYDf0bIUbA==} hasBin: true dev: false - /@aspect-test/f/1.0.0: + /@aspect-test/f@1.0.0: resolution: {integrity: sha512-VjuHu/TXdK0dfMeArZoOFaBY0Z/wAjWuCNtEWDTVJftbDcBtcH3IrhLrOy0NdJu+/CjE0qLCEb78eDGniKNUFA==} hasBin: true dev: false - /@aspect-test/g/1.0.0: + /@aspect-test/g@1.0.0: resolution: {integrity: sha512-nYxZCTIw+sHZfuKsqBBL7CW3KOliEoQh0D/ynWyUoB2Vi+DT2+nuvghXqL70/eNegjQ/8hUNTRBDBN2CPgoY8A==} hasBin: true dev: false - /@aspect-test/h/1.0.0: + /@aspect-test/h@1.0.0: resolution: {integrity: sha512-U1LStvh2QPmdQN7rlR0PTZZ1btTTcjiHxVmq5SvTxIRgIaJMCIsxcS5ghrd71H/JIwnJOmhI7BEQN3n6Hq9WSw==} hasBin: true dev: false - /typescript/4.9.5: + /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true @@ -137,16 +153,14 @@ packages: file:vendored/a: resolution: {directory: vendored/a, type: directory} name: vendored-a - version: 1.0.0 dependencies: '@aspect-test/f': 1.0.0 dev: false - file:vendored/b_@lib+b@lib+b: + file:vendored/b(@lib/b@lib+b): resolution: {directory: vendored/b, type: directory} id: file:vendored/b name: vendored-b - version: 1.0.0 peerDependencies: '@lib/b': workspace:* dependencies: diff --git a/e2e/pnpm_workspace_deps/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/e2e/pnpm_workspace_deps/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= index 506cc7d14..d5c2961fc 100755 --- a/e2e/pnpm_workspace_deps/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= +++ b/e2e/pnpm_workspace_deps/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= @@ -1,6 +1,7 @@ # @generated # Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. +.npmrc=664934919 pnpm-lock.yaml=493967008 package.json=959251505 pnpm-workspace.yaml=-2026278039 diff --git a/e2e/pnpm_workspace_deps/.bazelrc b/e2e/pnpm_workspace_deps/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/pnpm_workspace_deps/.bazelrc +++ b/e2e/pnpm_workspace_deps/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/pnpm_workspace_deps/.npmrc b/e2e/pnpm_workspace_deps/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/pnpm_workspace_deps/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/pnpm_workspace_deps/MODULE.bazel b/e2e/pnpm_workspace_deps/MODULE.bazel index 9c214540b..77ed21c4f 100644 --- a/e2e/pnpm_workspace_deps/MODULE.bazel +++ b/e2e/pnpm_workspace_deps/MODULE.bazel @@ -21,6 +21,7 @@ npm.npm_translate_lock( "//lib-dupes:package.json", "//tests:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace_deps/WORKSPACE b/e2e/pnpm_workspace_deps/WORKSPACE index 3396cfa9f..045f9f238 100644 --- a/e2e/pnpm_workspace_deps/WORKSPACE +++ b/e2e/pnpm_workspace_deps/WORKSPACE @@ -40,6 +40,7 @@ npm_translate_lock( "//lib-dupes:package.json", "//tests:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace_rerooted/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE1MzU4OTk= b/e2e/pnpm_workspace_rerooted/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE1MzU4OTk= index fc3a8ada3..e66af3717 100755 --- a/e2e/pnpm_workspace_rerooted/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE1MzU4OTk= +++ b/e2e/pnpm_workspace_rerooted/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE1MzU4OTk= @@ -1,6 +1,8 @@ +# @generated # Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//root:pnpm-lock.yaml"). # This file should be checked into version control along with the pnpm-lock.yaml file. -root/pnpm-lock.yaml=-1197167011 +.npmrc=664934919 +root/pnpm-lock.yaml=1614347268 package.json=282559383 app/a/package.json=1612579590 app/b/package.json=-339939821 diff --git a/e2e/pnpm_workspace_rerooted/.bazelrc b/e2e/pnpm_workspace_rerooted/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/pnpm_workspace_rerooted/.bazelrc +++ b/e2e/pnpm_workspace_rerooted/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/pnpm_workspace_rerooted/.npmrc b/e2e/pnpm_workspace_rerooted/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/pnpm_workspace_rerooted/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/pnpm_workspace_rerooted/MODULE.bazel b/e2e/pnpm_workspace_rerooted/MODULE.bazel index 2e4d21a41..561bf0f07 100644 --- a/e2e/pnpm_workspace_rerooted/MODULE.bazel +++ b/e2e/pnpm_workspace_rerooted/MODULE.bazel @@ -48,6 +48,7 @@ npm.npm_translate_lock( "//root:pnpm-workspace.yaml", "//vendored/a:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//root:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace_rerooted/WORKSPACE b/e2e/pnpm_workspace_rerooted/WORKSPACE index 1245ca46f..eda07ec9e 100644 --- a/e2e/pnpm_workspace_rerooted/WORKSPACE +++ b/e2e/pnpm_workspace_rerooted/WORKSPACE @@ -36,6 +36,7 @@ npm_translate_lock( "//root:pnpm-workspace.yaml", "//vendored/a:package.json", ], + npmrc = "//:.npmrc", pnpm_lock = "//root:pnpm-lock.yaml", update_pnpm_lock = True, verify_node_modules_ignored = "//:.bazelignore", diff --git a/e2e/pnpm_workspace_rerooted/root/pnpm-lock.yaml b/e2e/pnpm_workspace_rerooted/root/pnpm-lock.yaml index bdd687c72..fa213cb3f 100644 --- a/e2e/pnpm_workspace_rerooted/root/pnpm-lock.yaml +++ b/e2e/pnpm_workspace_rerooted/root/pnpm-lock.yaml @@ -1,106 +1,125 @@ -lockfileVersion: 5.4 +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false importers: ..: - specifiers: - typescript: 4.9.5 dependencies: - typescript: 4.9.5 + typescript: + specifier: 4.9.5 + version: 4.9.5 ../app/a: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/g': 1.0.0 - '@lib/a': workspace:* dependencies: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/g': 1.0.0 - '@lib/a': link:../../lib/a + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/b': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/c': + specifier: 2.0.2 + version: 2.0.2 + '@aspect-test/g': + specifier: 1.0.0 + version: 1.0.0 + '@lib/a': + specifier: workspace:* + version: link:../../lib/a ../app/b: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/h': 1.0.0 - '@lib/b': workspace:* - '@lib/b_alias': workspace:@lib/b@* dependencies: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/h': 1.0.0 - '@lib/b': link:../../lib/b - '@lib/b_alias': link:../../lib/b + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/b': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/c': + specifier: 2.0.2 + version: 2.0.2 + '@aspect-test/h': + specifier: 1.0.0 + version: 1.0.0 + '@lib/b': + specifier: workspace:* + version: link:../../lib/b + '@lib/b_alias': + specifier: workspace:@lib/b@* + version: link:../../lib/b ../app/c: - specifiers: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/g': 1.0.0 - '@lib/c': file:../../lib/c dependencies: - '@aspect-test/a': 5.0.2 - '@aspect-test/b': 5.0.2 - '@aspect-test/c': 2.0.2 - '@aspect-test/g': 1.0.0 - '@lib/c': file:../lib/c + '@aspect-test/a': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/b': + specifier: 5.0.2 + version: 5.0.2 + '@aspect-test/c': + specifier: 2.0.2 + version: 2.0.2 + '@aspect-test/g': + specifier: 1.0.0 + version: 1.0.0 + '@lib/c': + specifier: file:../../lib/c + version: file:../lib/c ../lib/a: - specifiers: - '@aspect-test/e': 1.0.0 - '@lib/b': workspace:* - vendored-a: file:../../vendored/a dependencies: - '@aspect-test/e': 1.0.0 - '@lib/b': link:../b - vendored-a: file:../vendored/a + '@aspect-test/e': + specifier: 1.0.0 + version: 1.0.0 + '@lib/b': + specifier: workspace:* + version: link:../b + vendored-a: + specifier: file:../../vendored/a + version: file:../vendored/a ../lib/b: - specifiers: - '@aspect-test/f': 1.0.0 dependencies: - '@aspect-test/f': 1.0.0 + '@aspect-test/f': + specifier: 1.0.0 + version: 1.0.0 ../lib/c: - specifiers: - '@aspect-test/f': 1.0.0 dependencies: - '@aspect-test/f': 1.0.0 + '@aspect-test/f': + specifier: 1.0.0 + version: 1.0.0 packages: - /@aspect-test/a/5.0.2: + /@aspect-test/a@5.0.2: resolution: {integrity: sha512-bURS+F0+tS2XPxUPbrqsTZxIre1U5ZglwzDqcOCrU7MbxuRrkO24hesgTMGJldCglwL/tiEGRlvdMndlPgRdNw==} hasBin: true dependencies: '@aspect-test/b': 5.0.2 '@aspect-test/c': 2.0.2 - '@aspect-test/d': 2.0.0_@aspect-test+c@2.0.2 + '@aspect-test/d': 2.0.0(@aspect-test/c@2.0.2) dev: false - /@aspect-test/b/5.0.2: + /@aspect-test/b@5.0.2: resolution: {integrity: sha512-I8wnJV5J0h8ui1O3K6XPq1qGHKopTl/OnvkSfor7uJ9yRCm2Qv6Tf2LsTgR2xzkgiwhA4iBwdYFwecwinF244w==} hasBin: true dependencies: '@aspect-test/a': 5.0.2 '@aspect-test/c': 2.0.2 - '@aspect-test/d': 2.0.0_@aspect-test+c@2.0.2 + '@aspect-test/d': 2.0.0(@aspect-test/c@2.0.2) dev: false - /@aspect-test/c/2.0.2: + /@aspect-test/c@2.0.2: resolution: {integrity: sha512-rMJmd3YBvY7y0jh+2m72TiAhe6dVKjMMNFFVOXFCbM233m7lsG4cq970H1C8rUsc3AcA5E/cEHlxSVffHlHD2Q==} hasBin: true requiresBuild: true dev: false - /@aspect-test/d/2.0.0_@aspect-test+c@2.0.2: + /@aspect-test/d@2.0.0(@aspect-test/c@2.0.2): resolution: {integrity: sha512-jndwr8pLUfn795uApTcXG/yZ5hV2At1aS/wo5BVLxqlVVgLoOETF/Dp4QOjMHE/SXkXFowz6Hao+WpmzVvAO0A==} hasBin: true peerDependencies: @@ -109,27 +128,27 @@ packages: '@aspect-test/c': 2.0.2 dev: false - /@aspect-test/e/1.0.0: + /@aspect-test/e@1.0.0: resolution: {integrity: sha512-GyAxHYKN650db+xnimHnL2LPz65ilmQsVhCasWA7drDNQn/rfmPiEVMzjRiS7m46scXIERaBmiJMzYDf0bIUbA==} hasBin: true dev: false - /@aspect-test/f/1.0.0: + /@aspect-test/f@1.0.0: resolution: {integrity: sha512-VjuHu/TXdK0dfMeArZoOFaBY0Z/wAjWuCNtEWDTVJftbDcBtcH3IrhLrOy0NdJu+/CjE0qLCEb78eDGniKNUFA==} hasBin: true dev: false - /@aspect-test/g/1.0.0: + /@aspect-test/g@1.0.0: resolution: {integrity: sha512-nYxZCTIw+sHZfuKsqBBL7CW3KOliEoQh0D/ynWyUoB2Vi+DT2+nuvghXqL70/eNegjQ/8hUNTRBDBN2CPgoY8A==} hasBin: true dev: false - /@aspect-test/h/1.0.0: + /@aspect-test/h@1.0.0: resolution: {integrity: sha512-U1LStvh2QPmdQN7rlR0PTZZ1btTTcjiHxVmq5SvTxIRgIaJMCIsxcS5ghrd71H/JIwnJOmhI7BEQN3n6Hq9WSw==} hasBin: true dev: false - /typescript/4.9.5: + /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true @@ -145,7 +164,6 @@ packages: file:../vendored/a: resolution: {directory: ../vendored/a, type: directory} name: vendored-a - version: 1.0.0 dependencies: '@aspect-test/f': 1.0.0 dev: false diff --git a/e2e/repo_mapping/.bazelrc b/e2e/repo_mapping/.bazelrc index a08135e3d..413c99502 100644 --- a/e2e/repo_mapping/.bazelrc +++ b/e2e/repo_mapping/.bazelrc @@ -6,14 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -common --enable_bzlmod - -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/repo_mapping/.npmrc b/e2e/repo_mapping/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/repo_mapping/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/repo_mapping/MODULE.bazel b/e2e/repo_mapping/MODULE.bazel index 24bd57d64..38129d4cb 100644 --- a/e2e/repo_mapping/MODULE.bazel +++ b/e2e/repo_mapping/MODULE.bazel @@ -20,6 +20,7 @@ npm = use_extension( ) npm.npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/e2e/rules_foo/.bazelrc b/e2e/rules_foo/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/rules_foo/.bazelrc +++ b/e2e/rules_foo/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/stamped_package_json/.bazelrc b/e2e/stamped_package_json/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/stamped_package_json/.bazelrc +++ b/e2e/stamped_package_json/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/update_pnpm_lock/.bazelrc b/e2e/update_pnpm_lock/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/update_pnpm_lock/.bazelrc +++ b/e2e/update_pnpm_lock/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/update_pnpm_lock_with_import/.bazelrc b/e2e/update_pnpm_lock_with_import/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/update_pnpm_lock_with_import/.bazelrc +++ b/e2e/update_pnpm_lock_with_import/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/vendored_node/.bazelrc b/e2e/vendored_node/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/vendored_node/.bazelrc +++ b/e2e/vendored_node/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/vendored_tarfile/.bazelrc b/e2e/vendored_tarfile/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/vendored_tarfile/.bazelrc +++ b/e2e/vendored_tarfile/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/verify_patches/.bazelrc b/e2e/verify_patches/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/verify_patches/.bazelrc +++ b/e2e/verify_patches/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/verify_patches/MODULE.bazel b/e2e/verify_patches/MODULE.bazel index 96bdfb111..b09121a21 100644 --- a/e2e/verify_patches/MODULE.bazel +++ b/e2e/verify_patches/MODULE.bazel @@ -31,6 +31,7 @@ npm.npm_translate_lock( }, pnpm_lock = "//:pnpm-lock.yaml", update_pnpm_lock = True, + verify_node_modules_ignored = "//:.bazelignore", verify_patches = "//patches:patches.list", ) use_repo(npm, "npm") diff --git a/e2e/webpack_devserver/.bazelrc b/e2e/webpack_devserver/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/webpack_devserver/.bazelrc +++ b/e2e/webpack_devserver/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/webpack_devserver_esm/.bazelrc b/e2e/webpack_devserver_esm/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/webpack_devserver_esm/.bazelrc +++ b/e2e/webpack_devserver_esm/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/worker/.bazelrc b/e2e/worker/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/worker/.bazelrc +++ b/e2e/worker/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/workspace/.bazelrc b/e2e/workspace/.bazelrc index 936cb5128..413c99502 100644 --- a/e2e/workspace/.bazelrc +++ b/e2e/workspace/.bazelrc @@ -6,12 +6,10 @@ import %workspace%/../../.aspect/bazelrc/debug.bazelrc import %workspace%/../../.aspect/bazelrc/javascript.bazelrc import %workspace%/../../.aspect/bazelrc/performance.bazelrc -### YOUR PROJECT SPECIFIC SETTINGS GO HERE ### +### YOUR PROJECT SPECIFIC OPTIONS GO HERE ### -# Disable lockfile for now. It is unstable. -# https://github.com/bazelbuild/bazel/issues/19026 -# https://github.com/bazelbuild/bazel/issues/19621 -# https://github.com/bazelbuild/bazel/issues/19971 -# https://github.com/bazelbuild/bazel/issues/20272 -# https://github.com/bazelbuild/bazel/issues/20369 -common --lockfile_mode=off +# Load any settings & overrides specific to the current user from `.aspect/bazelrc/user.bazelrc`. +# This file should appear in `.gitignore` so that settings are not shared with team members. This +# should be last statement in this config so the user configuration is able to overwrite flags from +# this file. See https://bazel.build/configure/best-practices#bazelrc-file. +try-import %workspace%/../../.aspect/bazelrc/user.bazelrc diff --git a/e2e/workspace/.npmrc b/e2e/workspace/.npmrc new file mode 100644 index 000000000..5de6efae1 --- /dev/null +++ b/e2e/workspace/.npmrc @@ -0,0 +1,4 @@ +# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on +# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what +# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules) +hoist=false diff --git a/e2e/workspace/WORKSPACE b/e2e/workspace/WORKSPACE index 6b21dcbc0..53e244a7c 100644 --- a/e2e/workspace/WORKSPACE +++ b/e2e/workspace/WORKSPACE @@ -25,6 +25,7 @@ load("@aspect_rules_js//npm:repositories.bzl", "npm_translate_lock") npm_translate_lock( name = "npm", + npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index b1a678e52..a3f5555c8 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -14,15 +14,7 @@ alias( "@bazel_tools//src/conditions:darwin_x86_64": "@shfmt_darwin_x86_64//file:shfmt", "@bazel_tools//src/conditions:linux_aarch64": "@shfmt_linux_aarch64//file:shfmt", "@bazel_tools//src/conditions:linux_x86_64": "@shfmt_linux_x86_64//file:shfmt", - }), -) - -alias( - name = "terraform", - actual = select({ - "@bazel_tools//src/conditions:darwin_arm64": "@terraform_macos_aarch64//:terraform", - "@bazel_tools//src/conditions:darwin_x86_64": "@terraform_macos_x86_64//:terraform", - "@bazel_tools//src/conditions:linux": "@terraform_linux_x86_64//:terraform", + "//conditions:default": ":noop", }), ) @@ -30,5 +22,4 @@ multi_formatter_binary( name = "format", sh = ":shfmt", starlark = "@buildifier_prebuilt//:buildifier", - terraform = ":terraform", )