{"record":{"id":"89391dac07aab0cd","repo":"immich-app/immich","slug":"invalid-pump","errorCode":null,"errorMessage":"Invalid pump","messagePattern":"Invalid pump","errorType":"exception","errorClass":"ReleaseError","httpStatus":null,"severity":"error","filePath":"packages/scripts/src/commands/release.ts","lineNumber":179,"sourceCode":"    throw new ReleaseInputError();\n  }\n\n  newVersionRaw = normalize(newVersionRaw);\n\n  const newVersion = semver.parse(newVersionRaw);\n  if (!newVersion) {\n    throw new ReleaseInputError();\n  }\n\n  const invalidUpgrade =\n    isPrerelease(version) &&\n    !isPrerelease(newVersion) &&\n    (version.major !== newVersion.major ||\n      version.minor !== newVersion.minor ||\n      version.patch !== newVersion.patch);\n\n  if (!valid || invalidUpgrade) {\n    throw new ReleaseError({\n      version: versionRaw,\n      newVersion: newVersionRaw,\n    });\n  }\n\n  return newVersionRaw;\n};\n\nconst RADIX = 100;\nconst STABLE = RADIX - 1;\n\nexport const getMobileBuild = (version: SemVer) => {\n  const { major, minor, patch, prerelease } = version;\n  const candidate = prerelease[1];\n  const digit = typeof candidate === 'number' ? candidate : STABLE;\n\n  const valid =\n    major < RADIX &&","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/immich-app/immich/blob/e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c/packages/scripts/src/commands/release.ts#L161-L197","documentation":"The release script (getNewVersion) validates that the requested release type is applicable to the current version: e.g. 'patch'/'minor' are only allowed from a stable version, 'prerelease' only from a prerelease, 'release' only promotes a prerelease without changing core numbers. If the bump is invalid or would be an invalid upgrade from a prerelease to a different stable version, a ReleaseError is thrown describing the offending version transition.","triggerScenarios":"Running a release with type 'patch'/'minor' while package.json's version is a prerelease (e.g. 1.2.3-next.5); running 'prerelease' while on a stable version; running 'release' where the promotion changes major/minor/patch; or 'release' on an already-stable version.","commonSituations":"CI release pipeline picking a bump type that doesn't match the current main-branch version after a previous prerelease cycle; manually editing version in package.json to a prerelease and then triggering a stable release.","solutions":["Match the release type to the current version: stable => patch/minor/major; prerelease => prerelease or release (to promote in place).","If you want a stable release from a prerelease with a version change, first set the target version explicitly, then release.","Check the current version in package.json before configuring the CI bump type.","If the transition should be legal, adjust the ReleaseError condition mapping in packages/scripts/src/commands/release.ts."],"exampleFix":"// before: package.json version 2.0.0-next.1, run release with type=patch\n// after: promote correctly\n\"version\": \"2.0.0-next.1\"  =>  run: npm run release -- type=release  // produces 2.0.0","handlingStrategy":"validation","validationCode":"import { parse } from 'semver';\nconst v = parse(require('./package.json').version)!;\nconst allowed = prerelease(v) ? ['prerelease', 'release'] : ['patch', 'minor', 'major'];\nif (!allowed.includes(type)) throw new Error(`type=${type} invalid for ${v.raw}`);","typeGuard":null,"tryCatchPattern":"try {\n  const next = getNewVersion(current, type);\n} catch (e) {\n  if (e instanceof ReleaseError) {\n    console.error(`cannot ${type}-bump from ${e.version}; use prerelease/release`);\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Derive the CI bump type from whether package.json's version is a prerelease","Promote prereleases with type=release, not patch/minor","Avoid hand-editing version fields before scripted releases"],"tags":["semver","release-tooling","ci"],"backgroundTag":"invalid-state-transition","analyzedSha":"e55ac299a4ec7cb372e35dbf2c6c05ee9ce77f6c","analyzedAt":"2026-09-15T07:20:19.675Z","contentChangedAt":"2026-09-15T07:20:19.675Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}