diff --git a/CHANGELOG.md b/CHANGELOG.md index b650ce4..7a846d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [4.1.6](https://github.com/cloudquery/setup-cloudquery/compare/v4.1.5...v4.1.6) (2025-05-08) + + +### Bug Fixes + +* **deps:** Update commitlint monorepo to v19.8.0 ([#691](https://github.com/cloudquery/setup-cloudquery/issues/691)) ([c3aad04](https://github.com/cloudquery/setup-cloudquery/commit/c3aad044d3d42fae6eb2a635c1ffa444dcc701a9)) +* **deps:** Update dependency @types/node to v22.14.1 ([#693](https://github.com/cloudquery/setup-cloudquery/issues/693)) ([01a2c56](https://github.com/cloudquery/setup-cloudquery/commit/01a2c56c95fac1ec90d64a732063c62a1797774e)) +* **deps:** Update dependency @types/pg to v8.11.14 ([#690](https://github.com/cloudquery/setup-cloudquery/issues/690)) ([1638027](https://github.com/cloudquery/setup-cloudquery/commit/16380271efdd9ef0f24fc869761e36cf6609aaa2)) +* **deps:** Update dependency semver to v7.7.1 ([#694](https://github.com/cloudquery/setup-cloudquery/issues/694)) ([21de0b1](https://github.com/cloudquery/setup-cloudquery/commit/21de0b1f11790265a2bd5c947f87f4fbf5e7f3d3)) + ## [4.1.5](https://github.com/cloudquery/setup-cloudquery/compare/v4.1.4...v4.1.5) (2025-04-01) diff --git a/dist/index.js b/dist/index.js index 5e24ce8..31d7157 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4454,7 +4454,7 @@ const testSet = (set, version, options) => { const debug = __nccwpck_require__(1159) const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(5101) -const { safeRe: re, t } = __nccwpck_require__(5471) +const { safeRe: re, safeSrc: src, t } = __nccwpck_require__(5471) const parseOptions = __nccwpck_require__(356) const { compareIdentifiers } = __nccwpck_require__(3348) @@ -4464,7 +4464,7 @@ class SemVer { if (version instanceof SemVer) { if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { + version.includePrerelease === !!options.includePrerelease) { return version } else { version = version.version @@ -4630,6 +4630,20 @@ class SemVer { // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. inc (release, identifier, identifierBase) { + if (release.startsWith('pre')) { + if (!identifier && identifierBase === false) { + throw new Error('invalid increment argument: identifier is empty') + } + // Avoid an invalid semver results + if (identifier) { + const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`) + const match = `-${identifier}`.match(r) + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`) + } + } + } + switch (release) { case 'premajor': this.prerelease.length = 0 @@ -4660,6 +4674,12 @@ class SemVer { } this.inc('pre', identifier, identifierBase) break + case 'release': + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`) + } + this.prerelease.length = 0 + break case 'major': // If this is a pre-major version, bump up to the same major version. @@ -4703,10 +4723,6 @@ class SemVer { case 'pre': { const base = Number(identifierBase) ? 1 : 0 - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - if (this.prerelease.length === 0) { this.prerelease = [base] } else { @@ -4965,20 +4981,13 @@ const diff = (version1, version2) => { return 'major' } - // Otherwise it can be determined by checking the high version - - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version + // If the main part has no difference + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return 'minor' + } return 'patch' } - - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' - } - - // bumping major/minor/patch all have same result - return 'major' } // add the `pre` prefix if we are going to a prerelease version @@ -5485,6 +5494,7 @@ exports = module.exports = {} const re = exports.re = [] const safeRe = exports.safeRe = [] const src = exports.src = [] +const safeSrc = exports.safeSrc = [] const t = exports.t = {} let R = 0 @@ -5517,6 +5527,7 @@ const createToken = (name, value, isGlobal) => { debug(name, index, value) t[name] = index src[index] = value + safeSrc[index] = safe re[index] = new RegExp(value, isGlobal ? 'g' : undefined) safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) } diff --git a/package-lock.json b/package-lock.json index 5dce246..03e8444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cloudquery/setup-cloudquery", - "version": "4.1.5", + "version": "4.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@cloudquery/setup-cloudquery", - "version": "4.1.5", + "version": "4.1.6", "license": "MIT", "dependencies": { "@actions/core": "1.11.1", diff --git a/package.json b/package.json index ee95eae..c534c77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudquery/setup-cloudquery", - "version": "4.1.5", + "version": "4.1.6", "description": "Setup CloudQuery CLI in a GitHub action environment", "main": "dist/index.js", "type": "module",