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.
Parameters
Section titled “Parameters”salesforceVersion
Section titled “salesforceVersion”string
tagSuffix?
Section titled “tagSuffix?”string
Returns
Section titled “Returns”string
Throws
Section titled “Throws”If the version isn’t major.minor.patch.build. Publishing a version derived
from something unrecognised is worse than failing the job.