| bazel_dep(name = "aspect_rules_js", version = "0.0.0", dev_dependency = True) |
| local_path_override( |
| module_name = "aspect_rules_js", |
| path = "../..", |
| ) |
| |
| bazel_dep(name = "local_repo", version = "0.0.0", dev_dependency = True) |
| local_path_override( |
| module_name = "local_repo", |
| path = "./local_repo", |
| ) |
| |
| bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True) |
| |
| npm = use_extension( |
| "@aspect_rules_js//npm:extensions.bzl", |
| "npm", |
| dev_dependency = True, |
| ) |
| npm.npm_translate_lock( |
| name = "npm", |
| data = [ |
| "//:package.json", |
| "//:pnpm-workspace.yaml", |
| ], |
| npmrc = "//:.npmrc", |
| patch_args = { |
| "meaning-of-life": ["-p1"], |
| }, |
| patches = { |
| # TODO: Because `patches` is a string_list_dict that doesn't take labels, we can't |
| # pass in a label like `@local_repo~//:....` because only the root repository knows |
| # how to map this repo to its local override. This causes rules_js to fail when trying |
| # to convert the label into a path. |
| "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") |