Skip to content

Commit 0882906

Browse files
committed
fix: include prerelease and snapshot by default for compat w. older zpm
1 parent fd45298 commit 0882906

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cls/ZPM/Package.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ Method versionsGet() As %ListOfDataTypes
140140
Set tList = ##class(%ListOfDataTypes).%New()
141141

142142
Set name = ..name
143-
Set tPrerelease = $Select($Data(%request) # 2: %request.Get("includePrerelease", 0), 1: 1)
144-
Set tSnapshot = $Select($Data(%request) # 2: %request.Get("includeSnapshots", 0), 1: 1)
143+
Set tPrerelease = $Select($Data(%request) # 2: %request.Get("includePrerelease", 1), 1: 1)
144+
Set tSnapshot = $Select($Data(%request) # 2: %request.Get("includeSnapshots", 1), 1: 1)
145145
&sql(
146146
SELECT %DLIST(version) INTO :versions
147147
FROM Package

src/cls/ZPM/Registry.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ ClassMethod Package(pkg As %String = "", version As %String = "", platformVersio
117117
If (version="") {
118118
$$$ThrowOnError(##class(ZPM.UpLink).FindPackageInAllUpLinks(pkg))
119119
}
120-
Set tIncludePrerelease = %request.Get("includePrerelease", 0)
121-
Set tIncludeSnapshots = %request.Get("includeSnapshots", 0)
120+
Set tIncludePrerelease = %request.Get("includePrerelease", 1)
121+
Set tIncludeSnapshots = %request.Get("includeSnapshots", 1)
122122

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

0 commit comments

Comments
 (0)