Skip to content

toNpmVersion

toNpmVersion(salesforceVersion, tagSuffix?): string

Defined in: packages/simply-cicd-core/src/build/packageVersionArtifact.ts:67

Map a Salesforce package version onto a semver version.

The build number becomes the first prerelease identifier and the git tag’s suffix, if any, the second — so 1.2.3.4 on a release branch is 1.2.3-4, and the same version built from beta is 1.2.3-4.beta. This is the transformation sfdx-project.json already uses for a dependency pin ("package": "MyPackage@1.2.3-4"), not a new convention.

string

string

string

If the version isn’t major.minor.patch.build. Publishing a version derived from something unrecognised is worse than failing the job.