Questions tagged [semantic-versioning]

Semantic Versioning is a community-driven version-numbering standard. Use this tag to indicate the software versioning concepts defined at http://semver.org.

Semantic Versioning is a conceptual software scheme which defines concepts of API compatibility and a specific, strict set of versioning rules intended to avoid dependency hell.

A number of software packages have made a commitment to apply the concepts of Semantic Versioning, or help to enforce its rules. For example: , and other package managers often help manage software dependencies using these rules.

Not all software versioning applies these semantics, which can lead to confusion. Semantic Versioning 2.0.0, the current specification, was originally written by Tom Preston-Werner, and is a community based effort hosted at https://github.com/semver/semver.

664 questions
5155
votes
20 answers

What's the difference between tilde(~) and caret(^) in package.json?

After I upgraded to the latest stable node and npm, I tried npm install moment --save. It saves the entry in the package.json with the caret ^ prefix. Previously, it was a tilde ~ prefix. Why are these changes made in npm? What is the difference…
Fizer Khan
  • 88,237
  • 28
  • 143
  • 153
282
votes
5 answers

What is the bower (and npm) version syntax?

Bower enables me to specify version requirements for packages using the following syntax: "dependencies": { "": "", }, But I have not been able to find what is the syntax to use for the . I know that I can specify versions…
Samuel Hapak
  • 6,950
  • 3
  • 35
  • 58
117
votes
3 answers

What is the caret sign (^) before the dependency version number in Flutter's pubspec.yaml?

In the pubspec.yaml file of my Flutter project there is a caret (^) before the version number of some of the dependencies. dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.2 english_words: ^3.1.5 What is its purpose? What does it…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
64
votes
4 answers

Update package to a major release with NPM

Inside a Node.js project, it's not clear to me what is the correct workflow to ugpgrade a package to a major release. Let's suppose I'm istalling stylelint: npm install --save stylelint by default puts inside my package.json the string "stylelint":…
caneta
  • 1,612
  • 2
  • 20
  • 34
64
votes
3 answers

What package version does @next specify for npm?

What version of package foo will this command install? npm install foo@next The package.json and semver docs don't mention next.
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
59
votes
3 answers

Should I pin my Python dependencies versions?

I am about to release a Python library I've been working on the past few weeks. I've read a lot about Python dependencies but something is not quite clear yet: Some people pretend you should never pin your dependencies versions as it would prevent…
ereOn
  • 53,676
  • 39
  • 161
  • 238
53
votes
3 answers

Are there npm version prerelease identifiers?

There is a very handy npm version command. Besides arguments like major, minor and patch it accepts arguments like prerelease, prepatch, etc. It says in the docs that the commands work in accordance with the semver.inc function. These pre commands I…
timetowonder
  • 5,121
  • 5
  • 34
  • 48
53
votes
7 answers

How do I install the latest minor version of a package on npm?

For example: I have version 2.0.0 of package-name installed. The latest minor version that has the same major version is 2.1.2 The latest major version (which would be installed if I ran npm install package-name@latest is 4.3.0 How can I install…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
49
votes
3 answers

What is the meaning of -rc in semantic versioning?

I get the logic of MAJOR.MINOR.PATCH and kinda intuitively get what -alpha and -beta mean at the end of a semver number but -rc doesn't ring any bell for me. Couldn't find a satisfying answer there -> https://semver.org/
Félix Paradis
  • 5,165
  • 6
  • 40
  • 49
45
votes
9 answers

Azure Pipeline Nuget Package Versioning Scheme, How to Get "1.0.$(Rev:r)"

I'm setting up an Azure Pipelines build that needs to package a C# .NET class library into a NuGet package. In this documentation, it lists a couple different ways to automatically generate SemVer strings. In particular, I want to implement this…
44
votes
2 answers

Parcel SemVer bug

So, I've used Parcel multiple times before and I've never had an issue with it. This time it throws some stupid errors about SemVer versioning and I'm literally loosing my mind trying to find a solution which would fix this problem. I've started new…
veilvokay
  • 461
  • 1
  • 4
  • 6
42
votes
1 answer

What is the convention for versioning npm packages prior to 1.0.0?

I was reading up on versioning with npm, and apparently it provides a nice convenient command for bumping your package versions. npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease] prerelease Lets say…
SteamDev
  • 4,294
  • 5
  • 20
  • 29
41
votes
5 answers

Is there a workaround for `npm publish -f`

Now that npm publish -f is deprecated, is there a workaround or a package that makes it possible to overwrite a target version after it's been published? I know about semver; I still want npm publish -f.
Alexej Magura
  • 4,833
  • 3
  • 26
  • 40
40
votes
5 answers

What does "public api" mean in Semantic Versioning?

I'm learning about how to assign and increment version numbers with the rule called "Semantic Versioning" from http://semver.org/. Among all its rules, the first one said: Software using Semantic Versioning MUST declare a public API. This API…
Neekey
  • 4,065
  • 1
  • 15
  • 9
39
votes
2 answers

npm version to add alpha postfix

How can i bump the package.json version to contain -alpha using npm versioning. Running npm version will bump the version of the package.json file, however i want to add -alpha postfix to the version, but i am unable to as it is not…
Bamieh
  • 10,358
  • 4
  • 31
  • 52
1
2 3
44 45