Skip to content

Commit

Permalink
fix patch filename parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ds300 committed Feb 27, 2021
1 parent 0e087bd commit a3a351e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PackageDetails.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Object {
"patchFilename": "banana+0.4.2.dev.patch",
"path": "node_modules/banana",
"pathSpecifier": "banana",
"version": "0.4.2.dev",
"version": "0.4.2",
}
`)
})
Expand Down
2 changes: 1 addition & 1 deletion src/PackageDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function getPackageDetailsFromPatchFilename(
patchFilename: string,
): PatchedPackageDetails | null {
const legacyMatch = patchFilename.match(
/^([^+=]+?)(:|\+)(\d+\.\d+\.\d+.*)(\.dev)?\.patch$/,
/^([^+=]+?)(:|\+)(\d+\.\d+\.\d+.*?)(\.dev)?\.patch$/,
)

if (legacyMatch) {
Expand Down

0 comments on commit a3a351e

Please # to comment.