Skip to content

Commit 6b7674a

Browse files
authored
test: move pnpm_lockfiles/cases to isolated test directories (#2208)
1 parent c878387 commit 6b7674a

30 files changed

+148
-89
lines changed

e2e/pnpm_lockfiles/.bazelignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
node_modules/
2-
cases/node_modules
2+
cases/versionless-patch-v9/node_modules
3+
cases/docusaurus-direct-peer-v9/node_modules
4+
cases/isaacs-cliui-v90/node_modules
5+
cases/override-with-alias-url-v9/node_modules
6+
cases/docusaurus-direct-peer-v6/node_modules
7+
cases/tarball-no-url-v54/node_modules
38
projects/a/node_modules
49
projects/a-types/node_modules
510
projects/b/node_modules

e2e/pnpm_lockfiles/MODULE.bazel

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ PNPM_LOCK_VERSIONS = [
1414

1515
# Lockfiles with unique test cases
1616
PNPM_LOCK_TEST_CASES = [
17-
"tarball-no-url-v54.yaml",
18-
"override-with-alias-url-v9.yaml",
19-
"isaacs-cliui-v90.yaml",
20-
"docusaurus-direct-peer-v6.yaml",
21-
"docusaurus-direct-peer-v9.yaml",
22-
"versionless-patch-v9.yaml",
17+
"tarball-no-url-v54",
18+
"override-with-alias-url-v9",
19+
"isaacs-cliui-v90",
20+
"docusaurus-direct-peer-v6",
21+
"docusaurus-direct-peer-v9",
22+
"versionless-patch-v9",
2323
]
2424

2525
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0")
@@ -94,7 +94,7 @@ npm = use_extension(
9494
[
9595
npm.npm_translate_lock(
9696
name = lockfile.replace(".yaml", ""),
97-
pnpm_lock = "//cases:%s" % lockfile,
97+
pnpm_lock = "//cases/%s:pnpm-lock.yaml" % lockfile,
9898
verify_node_modules_ignored = "//:.bazelignore",
9999
)
100100
for lockfile in PNPM_LOCK_TEST_CASES

e2e/pnpm_lockfiles/WORKSPACE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ PNPM_LOCK_VERSIONS = [
1313

1414
# Lockfiles with unique test cases
1515
PNPM_LOCK_TEST_CASES = [
16-
"tarball-no-url-v54.yaml",
17-
"override-with-alias-url-v9.yaml",
18-
"isaacs-cliui-v90.yaml",
19-
"docusaurus-direct-peer-v6.yaml",
20-
"docusaurus-direct-peer-v9.yaml",
21-
"versionless-patch-v9.yaml",
16+
"tarball-no-url-v54",
17+
"override-with-alias-url-v9",
18+
"isaacs-cliui-v90",
19+
"docusaurus-direct-peer-v6",
20+
"docusaurus-direct-peer-v9",
21+
"versionless-patch-v9",
2222
]
2323

2424
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
@@ -60,7 +60,7 @@ npm_repositories_v90()
6060
[
6161
npm_translate_lock(
6262
name = lockfile.replace(".yaml", ""),
63-
pnpm_lock = "//cases:%s" % lockfile,
63+
pnpm_lock = "//cases/%s:pnpm-lock.yaml" % lockfile,
6464
verify_node_modules_ignored = "//:.bazelignore",
6565
)
6666
for lockfile in PNPM_LOCK_TEST_CASES

e2e/pnpm_lockfiles/cases/BUILD.bazel

Lines changed: 0 additions & 74 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
load("@bazel_skylib//rules:build_test.bzl", "build_test")
2+
load("@docusaurus-direct-peer-v6//:defs.bzl", docusaurus_direct_with_peers_v6_link_all = "npm_link_all_packages")
3+
4+
exports_files(["pnpm-lock.yaml"])
5+
6+
docusaurus_direct_with_peers_v6_link_all()
7+
8+
build_test(
9+
name = "docusaurus_direct_with_peers",
10+
targets = [
11+
":node_modules",
12+
":node_modules/@docusaurus/module-type-aliases",
13+
],
14+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
load("@bazel_skylib//rules:build_test.bzl", "build_test")
2+
load("@docusaurus-direct-peer-v9//:defs.bzl", docusaurus_direct_with_peers_v9_link_all = "npm_link_all_packages")
3+
4+
exports_files(["pnpm-lock.yaml"])
5+
6+
docusaurus_direct_with_peers_v9_link_all()
7+
8+
build_test(
9+
name = "docusaurus_direct_with_peers",
10+
targets = [
11+
":node_modules",
12+
":node_modules/@docusaurus/module-type-aliases",
13+
],
14+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"pnpm": {
3+
"onlyBuiltDependencies": []
4+
}
5+
}

0 commit comments

Comments
 (0)