Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .licenses/npm/@actions/core.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "@actions/core"
version: 3.0.0
version: 3.0.1
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/main/packages/core
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/@actions/http-client.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "@actions/http-client"
version: 4.0.0
version: 4.0.1
type: npm
summary: Actions Http Client
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
Expand Down
2 changes: 1 addition & 1 deletion .licenses/npm/semver.dep.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: semver
version: 7.7.4
version: 7.8.0
type: npm
summary: The semantic version parser used by npm.
homepage:
Expand Down
59 changes: 58 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,61 @@ const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
module.exports = sort


/***/ }),

/***/ 6114:
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {



const parse = __nccwpck_require__(6353)
const constants = __nccwpck_require__(5101)
const SemVer = __nccwpck_require__(7163)

const truncate = (version, truncation, options) => {
if (!constants.RELEASE_TYPES.includes(truncation)) {
return null
}

const clonedVersion = cloneInputVersion(version, options)
return clonedVersion && doTruncation(clonedVersion, truncation)
}

const cloneInputVersion = (version, options) => {
const versionStringToParse = (
version instanceof SemVer ? version.version : version
)

return parse(versionStringToParse, options)
}

const doTruncation = (version, truncation) => {
if (isPrerelease(truncation)) {
return version.version
}

version.prerelease = []

switch (truncation) {
case 'major':
version.minor = 0
version.patch = 0
break
case 'minor':
version.patch = 0
break
}

return version.format()
}

const isPrerelease = (type) => {
return type.startsWith('pre')
}

module.exports = truncate


/***/ }),

/***/ 8780:
Expand Down Expand Up @@ -1588,6 +1643,7 @@ const gte = __nccwpck_require__(1236)
const lte = __nccwpck_require__(6717)
const cmp = __nccwpck_require__(8646)
const coerce = __nccwpck_require__(5385)
const truncate = __nccwpck_require__(6114)
const Comparator = __nccwpck_require__(9379)
const Range = __nccwpck_require__(6782)
const satisfies = __nccwpck_require__(8011)
Expand Down Expand Up @@ -1626,6 +1682,7 @@ module.exports = {
lte,
cmp,
coerce,
truncate,
Comparator,
Range,
satisfies,
Expand Down Expand Up @@ -1965,7 +2022,7 @@ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
createToken('GTLT', '((?:<|>)?=?)')

// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Note that "x.x" is a valid xRange identifier, meaning "any version"
// Only the first item is strictly required.
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
Expand Down
Loading
Loading