| "aspect-build/rules_js" | |
| module( | |
| name = "aspect_rules_js", | |
| bazel_compatibility = [">=7.6.0"], | |
| compatibility_level = 1, | |
| ) | |
| # Lower-bounds (minimum) versions for direct runtime dependencies. | |
| # Do not bump these unless rules_js requires a newer version to function. | |
| bazel_dep(name = "tar.bzl", version = "0.10.4") | |
| bazel_dep(name = "yq.bzl", version = "0.3.4") | |
| bazel_dep(name = "jq.bzl", version = "0.4.0") | |
| bazel_dep(name = "aspect_tools_telemetry", version = "0.5.2") | |
| bazel_dep(name = "bazel_features", version = "1.41.0") | |
| bazel_dep(name = "bazel_skylib", version = "1.5.0") | |
| bazel_dep(name = "platforms", version = "1.0.0") | |
| bazel_dep(name = "rules_nodejs", version = "6.7.3") | |
| bazel_dep(name = "hermetic_launcher", version = "0.0.16") | |
| # Changes ensured by rules_js: | |
| # 3.2.2: https://github.com/bazel-contrib/bazel-lib/commit/cac2d7855949d1b222fa26888892fbbe1d31015d | |
| # 3.5.0: support for stdout/stderr/exit_code_out/silent_on_success in run_binary | |
| # 3.7.0: https://github.com/bazel-contrib/bazel-lib/commit/e5c0630270f70dd2c7b50471bb9c872781a55282 | |
| bazel_dep(name = "bazel_lib", version = "3.7.0") | |
| # NB: LOWER BOUND on earliest BCR release of protobuf module, to avoid upgrading the root module by accident | |
| bazel_dep(name = "protobuf", version = "3.19.6") | |
| # Ensure any version of aspect_bazel_lib used includes: | |
| # https://github.com/bazel-contrib/bazel-lib/commit/371362199e5e5bde58aeb15b54ea6cfb164af337 | |
| # https://github.com/bazel-contrib/bazel-lib/commit/ceaff54210291292f35d03bd4bbc0b6ceb40e77a | |
| # https://github.com/bazel-contrib/bazel-lib/commit/27a9e7af51c0f806f823425a03283ae487d3a953 | |
| # https://github.com/bazel-contrib/bazel-lib/commit/e56aa707b72364bb1cc6f92580cb12ff88dfc1b4 | |
| # https://github.com/bazel-contrib/bazel-lib/commit/2befef614904d0ebe5161beb271ac31c83e82fd2 | |
| bazel_dep(name = "aspect_bazel_lib", version = "2.22.5", repo_name = None) | |
| tel = use_extension("@aspect_tools_telemetry//:extension.bzl", "telemetry") | |
| use_repo(tel, "aspect_tools_telemetry_report") | |
| node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") | |
| use_repo( | |
| node, | |
| "nodejs_darwin_amd64", | |
| "nodejs_darwin_arm64", | |
| "nodejs_linux_amd64", | |
| "nodejs_linux_arm64", | |
| "nodejs_linux_ppc64le", | |
| "nodejs_linux_s390x", | |
| "nodejs_toolchains", | |
| "nodejs_windows_amd64", | |
| "nodejs_windows_arm64", | |
| ) | |
| # The default + public version of pnpm used by default. | |
| pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") | |
| pnpm.pnpm(name = "pnpm") | |
| use_repo(pnpm, "pnpm", "pnpm__links") | |
| bazel_lib_toolchains = use_extension("@bazel_lib//lib:extensions.bzl", "toolchains") | |
| use_repo( | |
| bazel_lib_toolchains, | |
| "coreutils_darwin_amd64", | |
| "coreutils_darwin_arm64", | |
| "coreutils_linux_amd64", | |
| "coreutils_linux_arm64", | |
| "coreutils_toolchains", | |
| "coreutils_windows_amd64", | |
| "coreutils_windows_arm64", | |
| ) | |
| yq_toolchain = use_extension("@yq.bzl//yq:extensions.bzl", "yq") | |
| use_repo( | |
| yq_toolchain, | |
| "yq_darwin_amd64", | |
| "yq_darwin_arm64", | |
| "yq_linux_amd64", | |
| "yq_linux_arm64", | |
| "yq_linux_ppc64le", | |
| "yq_linux_riscv64", | |
| "yq_linux_s390x", | |
| "yq_windows_amd64", | |
| "yq_windows_arm64", | |
| ) | |
| tar_toolchains = use_extension("@tar.bzl//tar:extensions.bzl", "toolchains") | |
| use_repo( | |
| tar_toolchains, | |
| "bsd_tar_toolchains", | |
| "bsd_tar_toolchains_darwin_amd64", | |
| "bsd_tar_toolchains_darwin_arm64", | |
| "bsd_tar_toolchains_linux_amd64", | |
| "bsd_tar_toolchains_linux_arm64", | |
| "bsd_tar_toolchains_windows_amd64", | |
| "bsd_tar_toolchains_windows_arm64", | |
| ) | |
| ####### Dev dependencies ######## | |
| register_toolchains( | |
| "//js/private/test/proto:proto_toolchain_for_tests_toolchain", | |
| "//js/private/test/proto:rpc_toolchain_for_tests_toolchain", | |
| dev_dependency = True, | |
| ) | |
| # Dev-only pnpm used for local testing | |
| pnpm10 = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm", dev_dependency = True) | |
| pnpm10.pnpm( | |
| name = "pnpm10", | |
| pnpm_version = "10.22.0", | |
| pnpm_version_integrity = "sha512-vwSe/plbKPUn/StBrgR0zikYb37cs79UUIe9Yfu+uyv3U2LRMH/aCcLSiOHkmXh6wS1Py2F6l0cYpgUfLu50HA==", | |
| ) | |
| use_repo(pnpm10, "pnpm10") | |
| bazel_dep(name = "bazelrc-preset.bzl", version = "1.9.2", dev_dependency = True) | |
| bazel_dep(name = "aspect_rules_lint", version = "2.3.0", dev_dependency = True) | |
| bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.1", dev_dependency = True) | |
| bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True) | |
| # Override transitive rules_go from rules_buf; <0.59.0 uses CcInfo as a Bazel global which was removed in Bazel 9.0.1 | |
| bazel_dep(name = "rules_go", version = "0.60.0", dev_dependency = True, repo_name = None) | |
| host = use_extension( | |
| "@bazel_lib//lib:extensions.bzl", | |
| "host", | |
| dev_dependency = True, | |
| ) | |
| host.host() | |
| use_repo(host, "bazel_lib_host") | |
| node_dev = use_extension( | |
| "@rules_nodejs//nodejs:extensions.bzl", | |
| "node", | |
| dev_dependency = True, | |
| ) | |
| use_repo(node_dev, "node20_linux_amd64") | |
| use_repo(node_dev, "node20_darwin_arm64") | |
| use_repo(node_dev, "node20_darwin_amd64") | |
| use_repo(node_dev, "node20_linux_arm64") | |
| use_repo(node_dev, "node20_linux_s390x") | |
| use_repo(node_dev, "node20_linux_ppc64le") | |
| use_repo(node_dev, "node20_windows_amd64") | |
| use_repo(node_dev, "node22_linux_amd64") | |
| use_repo(node_dev, "node22_darwin_arm64") | |
| use_repo(node_dev, "node22_darwin_amd64") | |
| use_repo(node_dev, "node22_linux_arm64") | |
| use_repo(node_dev, "node22_linux_s390x") | |
| use_repo(node_dev, "node22_linux_ppc64le") | |
| use_repo(node_dev, "node22_windows_amd64") | |
| use_repo(node_dev, "node24_linux_amd64") | |
| use_repo(node_dev, "node24_darwin_arm64") | |
| use_repo(node_dev, "node24_darwin_amd64") | |
| use_repo(node_dev, "node24_linux_arm64") | |
| use_repo(node_dev, "node24_linux_s390x") | |
| use_repo(node_dev, "node24_linux_ppc64le") | |
| use_repo(node_dev, "node24_windows_amd64") | |
| # default name+version | |
| node_dev.toolchain() | |
| # additional custom name+versions | |
| node_dev.toolchain( | |
| name = "node20", | |
| node_version = "20.17.0", | |
| ) | |
| node_dev.toolchain( | |
| name = "node22", | |
| node_version = "22.20.0", | |
| ) | |
| node_dev.toolchain( | |
| name = "node24", | |
| node_version = "24.9.0", | |
| ) | |
| npm = use_extension( | |
| "@aspect_rules_js//npm:extensions.bzl", | |
| "npm", | |
| dev_dependency = True, | |
| ) | |
| npm.npm_translate_lock( | |
| name = "npm", | |
| bins = { | |
| # derived from "bin" attribute in node_modules/typescript/package.json | |
| "typescript": [ | |
| "tsc=./bin/tsc", | |
| "tsserver=./bin/tsserver", | |
| ], | |
| }, | |
| custom_postinstalls = { | |
| "pngjs": "chmod -R a+X *", # fixes malformed tarball content file permissions in this package after extraction (see https://github.com/aspect-build/rules_js/issues/1637 for more details) | |
| }, | |
| data = [ | |
| "//:package.json", | |
| "//:pnpm-workspace.yaml", | |
| "//js/private/coverage/bundle:package.json", | |
| "//js/private/devserver/src:package.json", | |
| "//js/private/test/image:package.json", | |
| "//js/private/test/image-fixture-a:package.json", | |
| "//js/private/test/image-fixture-d:package.json", | |
| "//js/private/test/js_run_devserver:package.json", | |
| "//js/private/test/node-patches:package.json", | |
| "//js/private/worker/src:package.json", | |
| "//npm/private/lifecycle:package.json", | |
| "//npm/private/test:package.json", | |
| "//npm/private/test:vendored/lodash-4.17.21.tgz", | |
| "//npm/private/test/npm_package:package.json", | |
| "//npm/private/test/npm_package_publish:package.json", | |
| "//npm/private/test/subs:package.json", | |
| "//npm/private/test/vendored/is-odd:package.json", | |
| "//npm/private/test/vendored/semver-max:package.json", | |
| ], | |
| generate_bzl_library_targets = True, | |
| lifecycle_hooks = { | |
| # We fetch @kubernetes/client-node from source and it has a `prepare` lifecycle hook that needs to be run | |
| # which runs the `build` package.json script: https://github.com/kubernetes-client/javascript/blob/fc681991e61c6808dd26012a2331f83671a11218/package.json#L28. | |
| # Here we run run build so we just run `tsc` instead of `npm run build` which ends up just running `tsc`. | |
| "@kubernetes/client-node": ["build"], | |
| # 'install' hook fails as it assumes the following path to `node-pre-gyp`: ./node_modules/.bin/node-pre-gyp | |
| # https://github.com/stultuss/protoc-gen-grpc-ts/blob/53d52a9d0e1fe3cbe930dec5581eca89b3dde807/package.json#L28 | |
| "protoc-gen-grpc@2.0.3": [], | |
| }, | |
| lifecycle_hooks_execution_requirements = { | |
| "*": [ | |
| "no-sandbox", | |
| ], | |
| # If @kubernetes/client-node is not sandboxed, will fail with | |
| # ``` | |
| # src/azure_auth.ts(97,43): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | |
| # src/azure_auth.ts(98,34): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | |
| # src/gcp_auth.ts(93,43): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | |
| # src/gcp_auth.ts(94,34): error TS2575: No overload expects 2 arguments, but overloads do exist that expect either 1 or 4 arguments. | |
| # ``` | |
| # since a `jsonpath-plus@7.2.0` that is newer then the transitive dep `jsonpath-plus@0.19.0` is found outside of the sandbox that | |
| # includes typings that don't match the 0.19.0 "any" usage. | |
| "@kubernetes/client-node": [], | |
| "@figma/nodegit": [ | |
| "no-sandbox", | |
| "requires-network", | |
| ], | |
| "esbuild": [ | |
| "no-sandbox", | |
| "requires-network", | |
| ], | |
| "segfault-handler": [ | |
| "no-sandbox", | |
| "requires-network", | |
| ], | |
| "puppeteer": [ | |
| "no-remote", | |
| "no-sandbox", | |
| "requires-network", | |
| ], | |
| }, | |
| npmrc = "//:.npmrc", | |
| package_visibility = { | |
| "unused": ["//npm/private/test:__subpackages__"], | |
| }, | |
| pnpm_lock = "//:pnpm-lock.yaml", | |
| update_pnpm_lock = True, | |
| use_pnpm = "@pnpm10//:package/bin/pnpm.cjs", | |
| verify_node_modules_ignored = "//:.bazelignore", | |
| ) | |
| npm.npm_translate_lock( | |
| name = "npm-no_optional", | |
| no_optional = True, | |
| npmrc = "//:.npmrc", | |
| pnpm_lock = "//:pnpm-lock.yaml", | |
| ) | |
| npm.npm_translate_lock( | |
| name = "npm-no_dev", | |
| no_dev = True, | |
| npmrc = "//:.npmrc", | |
| pnpm_lock = "//:pnpm-lock.yaml", | |
| ) | |
| npm.npm_import( | |
| name = "npm__meaning-of-life__1.0.0", | |
| integrity = "sha512-fVA4xSydqtK9owabGcYw1r4EKEsMOVVeYQLeCXPu77Z+8Y2j2B2I16UqZlKIOHnYkJ4RSvpJ00ywy9IWjmuxYw==", | |
| package = "meaning-of-life", | |
| patch_args = ["-p1"], | |
| # A custom patch tool must be a pre-built binary or source file since repository | |
| # rules cannot depend on the output of a build target. | |
| patch_tool = "//npm/private/test:patch_tool.sh", | |
| patches = ["//npm/private/test:meaning-of-life@1.0.0.patch"], | |
| root_package = "npm/private/test", | |
| version = "1.0.0", | |
| ) | |
| use_repo( | |
| npm, | |
| "npm", | |
| "npm-no_dev", | |
| "npm-no_optional", | |
| "npm__es5-ext__0.10.64__links", | |
| "npm__fsevents__2.3.3__links", | |
| "npm__google-closure-compiler__20251111.0.0__links", | |
| "npm__meaning-of-life__1.0.0", | |
| "npm__meaning-of-life__1.0.0__links", | |
| "npm__rollup__4.55.2", | |
| "npm__rollup__4.55.2__links", | |
| "npm__unused__0.2.2__links", | |
| "npm__webpack-bundle-analyzer__4.5.0_bufferutil_4.0.8", | |
| ) |