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 [email protected].dev βœ”
7+
Skipping dev-only [email protected] βœ”
88
99
Skipping dev-only [email protected] βœ”
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)