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.json
updates 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.json
update 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?
build
component of SemVer? – Philip Kendall Jul 29 '23 at 09:53package.json
settings should supersede the older ones. – F-H Jul 29 '23 at 09:58package.json
? – Thomas Owens Jul 29 '23 at 11:44publishConfig
, etc. Granted, the mere metadata arguably isn't a change to the software and could count as build changes, but there appear to be options that influence how the package is assembled/included/whatever, so I cannot rule out that some of these might be relevant for the resulting application. – F-H Jul 29 '23 at 11:57package.json
, or the host for our internal npm feed (Azure DevOps). At that point, I see no reason for waiting until the supplier happens to release the next version of their 3rd party software, just so we can sneak in our other changes. – F-H Jul 29 '23 at 12:07package.json
changes may cause you to update the patch version. Pulling in changes from upstream could be patch, minor, or major. – Thomas Owens Jul 29 '23 at 12:16.d.ts
files were not properly included, and push this as what to our npm feed? 2.4.2? Then what happens when the supplier provides the actual 2.4.2 later on? – F-H Jul 29 '23 at 12:21