Skip to content

Commit 9df2c7e

Browse files
committed
fix patch filename parsing
1 parent 0e087bd commit 9df2c7e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

β€Žintegration-tests/dev-only-patches/__snapshots__/dev-only-patches.test.ts.snapβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ exports[`Test dev-only-patches: fake-package should be skipped 1`] = `
44
"SNAPSHOT: fake-package should be skipped
55
patch-package 0.0.0
66
Applying patches...
7-
Skipping dev-only fake-package@3.0.0.dev βœ”
7+
Skipping dev-only fake-package@3.0.0 βœ”
88
left-pad@1.3.0 βœ”
99
Skipping dev-only slash@3.0.0 βœ”
1010
END SNAPSHOT"

β€Žsrc/PackageDetails.test.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Object {
7676
"patchFilename": "banana+0.4.2.dev.patch",
7777
"path": "node_modules/banana",
7878
"pathSpecifier": "banana",
79-
"version": "0.4.2.dev",
79+
"version": "0.4.2",
8080
}
8181
`)
8282
})

β€Žsrc/PackageDetails.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function getPackageDetailsFromPatchFilename(
4848
patchFilename: string,
4949
): PatchedPackageDetails | null {
5050
const legacyMatch = patchFilename.match(
51-
/^([^+=]+?)(:|\+)(\d+\.\d+\.\d+.*)(\.dev)?\.patch$/,
51+
/^([^+=]+?)(:|\+)(\d+\.\d+\.\d+.*?)(\.dev)?\.patch$/,
5252
)
5353

5454
if (legacyMatch) {

0 commit comments

Comments
Β (0)