| bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) |
| local_path_override( |
| module_name = "aspect_rules_js", |
| path = "../..", |
| ) |
| |
| # The same primary lockfile across all versions |
| PNPM_LOCK_VERSIONS = [ |
| "v54", |
| "v60", |
| "v61", |
| "v90", |
| "v101", |
| ] |
| |
| # Lockfiles with unique test cases |
| PNPM_LOCK_TEST_CASES = [ |
| "tarball-no-url-v54", |
| "override-with-alias-url-v9", |
| "isaacs-cliui-v90", |
| "docusaurus-direct-peer-v6", |
| "docusaurus-direct-peer-v9", |
| "versionless-patch-v9", |
| ] |
| |
| bazel_dep(name = "aspect_bazel_lib", version = "2.14.0") |
| |
| bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) |
| bazel_dep(name = "rules_nodejs", version = "6.3.0", dev_dependency = True) |
| |
| bazel_dep(name = "platforms", version = "0.0.5") |
| |
| node = use_extension( |
| "@rules_nodejs//nodejs:extensions.bzl", |
| "node", |
| dev_dependency = True, |
| ) |
| use_repo(node, "nodejs_toolchains") |
| use_repo(node, "nodejs_darwin_amd64") |
| use_repo(node, "nodejs_darwin_arm64") |
| use_repo(node, "nodejs_linux_amd64") |
| use_repo(node, "nodejs_linux_arm64") |
| |
| npm = use_extension( |
| "@aspect_rules_js//npm:extensions.bzl", |
| "npm", |
| dev_dependency = True, |
| ) |
| |
| [ |
| npm.npm_translate_lock( |
| name = "lock-%s" % version, |
| data = [ |
| "//%s:package.json" % version, |
| "//%s:patches/meaning-of-life@1.0.0-pnpm.patch" % version, |
| ], |
| pnpm_lock = "//%s:pnpm-lock.yaml" % version, |
| verify_node_modules_ignored = "//:.bazelignore", |
| ) |
| for version in PNPM_LOCK_VERSIONS |
| ] |
| |
| # repos used by the lockfile tests |
| [ |
| use_repo( |
| npm, |
| "lock-%s" % version, |
| |
| # Dep with bin entries etc |
| "lock-%s__rollup__2.14.0" % version, |
| "lock-%s__rollup__2.14.0__links" % version, |
| "lock-%s__rollup__3.29.4" % version, |
| "lock-%s__rollup__3.29.4__links" % version, |
| |
| # Dep only referenced via npm: should have the real package name in the repo name |
| "lock-%s__at_types_sizzle__2.3.9" % version, |
| "lock-%s__at_types_sizzle__2.3.9__links" % version, |
| |
| # Deps with circles |
| "lock-%s__at_aspect-test_a__5.0.2__links" % version, |
| "lock-%s__at_aspect-test_b__5.0.2__links" % version, |
| |
| # Dep with lifecycle hooks |
| "lock-%s__at_aspect-test_c__2.0.0__links" % version, |
| |
| # Dep with peers |
| "lock-%s__at_aspect-test_d__2.0.0_at_aspect-test_c_2.0.2" % version, |
| "lock-%s__at_aspect-test_d__2.0.0_at_aspect-test_c_2.0.2__links" % version, |
| |
| # Deep with many peers |
| "lock-%s__at_rollup_plugin-typescript__8.2.1_%s" % ( |
| version, |
| "3vgsug3mjv7wvue74swjdxifxy" if version == "v54" else "626159424" if (version == "v90" or version == "v101") else "1813138439" if (version == "v61" or version == "v60") else "unknown", |
| ), |
| |
| # Dep with patch |
| "lock-%s__meaning-of-life__1.0.0_%s" % ( |
| version, |
| "1541309197" if version == "v101" else "o3deharooos255qt5xdujc3cuq", |
| ), |
| ) |
| for version in PNPM_LOCK_VERSIONS |
| ] |
| |
| [ |
| npm.npm_translate_lock( |
| name = lockfile.replace(".yaml", ""), |
| pnpm_lock = "//cases/%s:pnpm-lock.yaml" % lockfile, |
| verify_node_modules_ignored = "//:.bazelignore", |
| ) |
| for lockfile in PNPM_LOCK_TEST_CASES |
| ] |
| |
| [ |
| use_repo( |
| npm, |
| lockfile.replace(".yaml", ""), |
| ) |
| for lockfile in PNPM_LOCK_TEST_CASES |
| ] |