diff --git a/MODULE.bazel b/MODULE.bazel index d7be01e2120..4c505e1c148 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -55,17 +55,17 @@ bazel_dep( npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( - name = "npm", + name = "flatbuffers_npm", npmrc = "//:.npmrc", pnpm_lock = "//:pnpm-lock.yaml", verify_node_modules_ignored = "//:.bazelignore", ) -use_repo(npm, "npm") +use_repo(npm, "flatbuffers_npm") node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") use_repo(node, "nodejs_linux_amd64") -rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True) +rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext") rules_ts_ext.deps() use_repo(rules_ts_ext, "npm_typescript") diff --git a/tests/bazel_repository_test_dir/MODULE.bazel b/tests/bazel_repository_test_dir/MODULE.bazel new file mode 100644 index 00000000000..d37d66dd4b7 --- /dev/null +++ b/tests/bazel_repository_test_dir/MODULE.bazel @@ -0,0 +1,12 @@ +module(name = "bazel_repository_test") + +bazel_dep(name = "flatbuffers", repo_name = "com_github_google_flatbuffers") +local_path_override( + module_name = "flatbuffers", + path = "../../", +) + +bazel_dep( + name = "rules_cc", + version = "0.0.16", +) diff --git a/tests/ts/bazel_repository_test_dir/MODULE.bazel b/tests/ts/bazel_repository_test_dir/MODULE.bazel index 5aae272be91..f22f73148a6 100644 --- a/tests/ts/bazel_repository_test_dir/MODULE.bazel +++ b/tests/ts/bazel_repository_test_dir/MODULE.bazel @@ -1,12 +1,28 @@ module(name = "bazel_repository_test") bazel_dep(name = "flatbuffers", repo_name = "com_github_google_flatbuffers") - local_path_override( - module_name = "com_github_google_flatbuffers", + module_name = "flatbuffers", path = "../../../", ) +bazel_dep( + name = "aspect_rules_esbuild", + version = "0.15.0", +) +bazel_dep( + name = "aspect_rules_js", + version = "1.34.1", +) +bazel_dep( + name = "aspect_rules_ts", + version = "1.4.5", +) +bazel_dep( + name = "rules_nodejs", + version = "5.8.3", +) + npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( name = "npm", @@ -19,6 +35,5 @@ use_repo(npm, "npm") node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") use_repo(node, "nodejs_linux_amd64") -rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True) -rules_ts_ext.deps() +rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext") use_repo(rules_ts_ext, "npm_typescript")