I am preparing a software package for internal consumption in my organization. It will be published on our internal non-public npm feed.
The used technology (npm) requires me to adhere to semantic versioning by format, though I would also like to adhere to it by idea, which is what this question aims at.
The content of the software package is not our own - it is a proprietary 3rd party software that we are licensing. We receive the JavaScript files by the producing entity for use in our products, and no npm package is provided. The necessity for packaging these files into an npm package is based on the desire to keep our internal development and build process streamlined.
How is the software versioned? The 3rd party software already adheres to semantic versioning; it is versioned with a 3-component scheme that matches the major.minor.patch idea.
How do we translate this into our package versions? This is where I see the problem: Intuitively, it would be best to just take over the 3rd party software's version and be happy. This has the advantage of making it obvious to consumers of the 3rd party package which version of the 3rd party software they are using, which release notes apply, and so on.
However, in a few situations, it is necessary to do "technical changes" to the package, in particular by reconfiguring things in the package.json file. These would cause an increase in the package version, as well, but there appears to be no component left for it.
Example Timeline:
- 3rd party software version 2.4.1
- 3rd party software version 2.4.2
- 3rd party software version 2.4.2 with change 1 to
package.json - 3rd party software version 2.4.3
- 3rd party software version 2.4.3 with change 1 to
package.json - 3rd party software version 2.4.3 with change 2 to
package.json
Considered workarounds:
- I have considered using the prerelease part of the semantic versioning number for this, but then each and every version of the package would technically have to be using a prerelease version, as at the time of upgrading to the new version of the 3rd party software, we do not yet know whether we will have to fix something about
package.json. - The build number does not help, as by the SemVer definition, it is to be ignored in determining version precedence and serves only for information.
- I could rely on the 3rd party software never releasing more than x patches and us never needing more than y
package.jsonupdates for any version. Then, I could encode two numbers in the patch number based on digits. E.g. 2.4.2003 to denote 3rd party software release 2.4.2,package.jsonupdate 3. This would result in slightly awkward looking version numbers, most of which end in000.
Is there a common way to resolve this within the definitions of semantic versioning, or is this a situation where semantic versioning just does not fit with our needs and we must define on our own what the version numbers for our package mean?
buildcomponent of SemVer?package.jsonsettings should supersede the older ones.