Skip to content

Commit

Permalink
Support wildcard patch releases (#15)
Browse files Browse the repository at this point in the history
* Support using a wildcard to check for the latest patch release

* Update error parameter name

* Use version numbers that make more sense in context

* Use semver to find the latest patch version from the provided versions

* Use different versions for packages2 package

* Add error for incorrect wildcard uses and throw in mergeDependency and lookUpLatestPatchVersion

* npm audit fix
  • Loading branch information
jafeltra authored Jul 20, 2023
1 parent 86c3734 commit 1d84cbb
Show file tree
Hide file tree
Showing 7 changed files with 395 additions and 63 deletions.
164 changes: 110 additions & 54 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@types/lodash": "^4.14.177",
"@types/node": "^14.17.27",
"@types/opener": "^1.4.0",
"@types/semver": "^7.5.0",
"@types/tar": "^4.0.3",
"@types/temp": "^0.8.34",
"@typescript-eslint/eslint-plugin": "^5.1.0",
Expand All @@ -63,6 +64,7 @@
"fs-extra": "^10.0.0",
"https-proxy-agent": "^5.0.0",
"lodash": "^4.17.21",
"semver": "^7.5.4",
"tar": "^5.0.11",
"temp": "^0.9.1",
"winston": "^3.3.3"
Expand Down
7 changes: 7 additions & 0 deletions src/errors/IncorrectWildcardVersionFormatError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export class IncorrectWildcardVersionFormatError extends Error {
constructor(public packageName: string, version: string) {
super(
`Incorrect version format for package ${packageName}: ${version}. Wildcard should only be used to specify patch versions.`
);
}
}
Loading

0 comments on commit 1d84cbb

Please sign in to comment.