Skip to content

Commit

Permalink
perf: do not sanitize npm package labels multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed Jul 24, 2024
1 parent 6a12c36 commit 51f2464
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 204 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ use_repo(
"npm__rollup__2.70.2",
"npm__rollup__2.70.2__links",
"npm__unused__0.2.2__links",
"npm__webpack-bundle-analyzer__4.5.0__bufferutil_4.0.7",
"npm__webpack-bundle-analyzer__4.5.0_bufferutil_4.0.7",
)

# As an example, manually import a package using explicit coordinates.
Expand Down
8 changes: 4 additions & 4 deletions e2e/pnpm_lockfiles/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ npm = use_extension(
"lock-%s__at_types_sizzle__2.3.8__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,
"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" % (
"lock-%s__at_rollup_plugin-typescript__8.2.1_%s" % (
version,
"ommloj5qql5ba6x5wuiluawhoi" if version == "v54" else "1662662592",
),

# Dep with patch
"lock-%s__meaning-of-life__1.0.0__o3deharooos255qt5xdujc3cuq" % version,
"lock-%s__meaning-of-life__1.0.0_o3deharooos255qt5xdujc3cuq" % version,
)
for version in PNPM_LOCK_VERSIONS
]
Expand Down
6 changes: 3 additions & 3 deletions e2e/pnpm_lockfiles/lockfile-test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def lockfile_test(name = None):
# npm: alias to a package that has many peers
":node_modules/rollup-plugin-with-peers",
# underlying repo for the many-peers package
"@%s__at_rollup_plugin-typescript__8.2.1__%s//:pkg" % (lock_repo, "ommloj5qql5ba6x5wuiluawhoi" if lock_version == "v54" else "1662662592"),
"@%s__at_rollup_plugin-typescript__8.2.1_%s//:pkg" % (lock_repo, "ommloj5qql5ba6x5wuiluawhoi" if lock_version == "v54" else "1662662592"),

# uuv 'hasBin'
":node_modules/uvu",
Expand Down Expand Up @@ -171,14 +171,14 @@ def lockfile_test(name = None):

# Patched dependencies
":.aspect_rules_js/node_modules/meaning-of-life@1.0.0_o3deharooos255qt5xdujc3cuq",
"@%s__meaning-of-life__1.0.0__o3deharooos255qt5xdujc3cuq//:pkg" % lock_repo,
"@%s__meaning-of-life__1.0.0_o3deharooos255qt5xdujc3cuq//:pkg" % lock_repo,

# Direct deps from custom registry
":.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",
"@%s__at_aspect-test_d__2.0.0__at_aspect-test_c_2.0.2//:pkg" % lock_repo,
"@%s__at_aspect-test_d__2.0.0_at_aspect-test_c_2.0.2//:pkg" % lock_repo,
],
)

Expand Down
8 changes: 4 additions & 4 deletions e2e/pnpm_lockfiles/v54/snapshots/defs.bzl

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

8 changes: 4 additions & 4 deletions e2e/pnpm_lockfiles/v60/snapshots/defs.bzl

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

8 changes: 4 additions & 4 deletions e2e/pnpm_lockfiles/v61/snapshots/defs.bzl

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

8 changes: 4 additions & 4 deletions e2e/pnpm_lockfiles/v90/snapshots/defs.bzl

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

Loading

0 comments on commit 51f2464

Please sign in to comment.