Skip to content

Commit

Permalink
test: add lockfile test cases (#1764)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed May 28, 2024
1 parent b9b764d commit 78c5e56
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
4 changes: 0 additions & 4 deletions e2e/pnpm_lockfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ TODO:

Has inconsistencies across pnpm lockfile versions, issues with pnpm9

- file references: `"@scoped/c": "file:../projects/c"`

Has inconsistencies across pnpm lockfile versions, issues with pnpm9

- npm: references: `@aspect-test/a2": "npm:@aspect-test/a"`

No :node_modules/\* targets are generated for aliases to npm packages.
Expand Down
12 changes: 9 additions & 3 deletions e2e/pnpm_lockfiles/lockfile-test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def lockfile_test(name = None):

# Direct 'devDependencies'
":node_modules/@aspect-test/b",
":node_modules/@types/node",

# Direct 'optionalDependencies'
":node_modules/@aspect-test/c",
Expand All @@ -77,7 +78,7 @@ def lockfile_test(name = None):
# link:, workspace:, file:, ./rel/path
":node_modules/@scoped/a",
":node_modules/@scoped/b",
# ":node_modules/@scoped/c", TODO: see README
":node_modules/@scoped/c",
":node_modules/@scoped/d",

# npm:
Expand All @@ -94,12 +95,17 @@ def lockfile_test(name = None):
":.aspect_rules_js/node_modules/@aspect-test+c@2.0.2/lc",
":.aspect_rules_js/node_modules/@aspect-test+c@2.0.2/pkg_lc",

# link:, workspace:, file:, ./rel/path
":.aspect_rules_js/node_modules/@scoped+a@0.0.0",
":.aspect_rules_js/node_modules/@scoped+b@0.0.0",
":.aspect_rules_js/node_modules/@scoped+c@0.0.0",
":.aspect_rules_js/node_modules/@scoped+d@0.0.0",

# Patched dependencies
":.aspect_rules_js/node_modules/meaning-of-life@1.0.0_o3deharooos255qt5xdujc3cuq",

# TODO: differs across lockfile versions
# Direct deps from custom registry
# ":.aspect_rules_js/node_modules/@types+node@registry.npmjs.org+@types+node@16.18.11",
":.aspect_rules_js/node_modules/@types+node@16.18.11",

# Direct deps with peers
":.aspect_rules_js/node_modules/@aspect-test+d@2.0.0_at_aspect-test_c_2.0.2",
Expand Down
4 changes: 3 additions & 1 deletion e2e/pnpm_lockfiles/v54/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion e2e/pnpm_lockfiles/v60/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion e2e/pnpm_lockfiles/v61/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 78c5e56

Please sign in to comment.