Skip to content

Commit

Permalink
fix: include prerelease and snapshot by default for compat w. older zpm
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-shuliu committed Sep 4, 2024
1 parent fd45298 commit 0882906
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cls/ZPM/Package.cls
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ Method versionsGet() As %ListOfDataTypes
Set tList = ##class(%ListOfDataTypes).%New()

Set name = ..name
Set tPrerelease = $Select($Data(%request) # 2: %request.Get("includePrerelease", 0), 1: 1)
Set tSnapshot = $Select($Data(%request) # 2: %request.Get("includeSnapshots", 0), 1: 1)
Set tPrerelease = $Select($Data(%request) # 2: %request.Get("includePrerelease", 1), 1: 1)
Set tSnapshot = $Select($Data(%request) # 2: %request.Get("includeSnapshots", 1), 1: 1)
&sql(
SELECT %DLIST(version) INTO :versions
FROM Package
Expand Down
4 changes: 2 additions & 2 deletions src/cls/ZPM/Registry.cls
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ ClassMethod Package(pkg As %String = "", version As %String = "", platformVersio
If (version="") {
$$$ThrowOnError(##class(ZPM.UpLink).FindPackageInAllUpLinks(pkg))
}
Set tIncludePrerelease = %request.Get("includePrerelease", 0)
Set tIncludeSnapshots = %request.Get("includeSnapshots", 0)
Set tIncludePrerelease = %request.Get("includePrerelease", 1)
Set tIncludeSnapshots = %request.Get("includeSnapshots", 1)

Set version = ##class(ZPM.Package).VersionFind(pkg, version, tIncludePrerelease, tIncludeSnapshots)
If (version = "") {
Expand Down

0 comments on commit 0882906

Please sign in to comment.