Not sure this is a bug. Perhaps its more of a request for clarification (depending whether the behavior is deliberate or accidental)
Semver version numbers can look like this (examples from here: http://semver.org/):
2.0.0-rc.2 2.0.0-rc.1 1.0.0-beta
There can be a 'pre-release-tag' appended after the 3rd number, seperated by a '-'. This is also the convention of version for node packages as far as I know. It seems like vsce publish refuses such versions however.
Error: Failed Request: Bad Request(400) - The version string '0.0.1-201612192249' doesn't conform to the requirements for a version. It must be one to four numbers in the range 0 to 2147483647, with each number seperated by a period. It must contain at least one non-zero number.
First... I thought its a bug. But then I thought, maybe this could be deliberate? (E.g to prevent publishing of 'pre-release' versions on marketplace? But then its a bit odd it would accept a fourth number as the error suggests)
Please clarify what the rules are for publishing versions to marketplace (and consider fixing/changing it if this behavior isn't deliberate)
This needs to come from the Marketplace itself. @hamenon @modigrv
This is by design today, we only allow numeric values and period in the version. I can add an item to the backlog to allow pre-release tags.
This would be a good feature to have in Marketplace to publish pre-release versions of extensions.
Note that the Marketplace seems to allow 4 digits (at least for other kind of extensions): X.Y.Z.build while vsce don't.
was going through semver documentation, found the following explanation:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
incrementing the third digit (PATCH digit) seems to indicate a stable update; it would be helpful to support pre-release version numbers to indicate unstable versions. Maybe this was by design since users can only find and install the most recent (and stable) version of extensions
I just ran into the same problem while trying to distribute an alpha version for testers. I'm not feeling comfortable distributing alpha extension packages which look like legit releases.
The latest version (1.74.0) seems to support this. Strange - I didn't see anything having addressed this in the latest commits...
While this is not implemented, should this be reflected here: https://code.visualstudio.com/api/references/extension-manifest#fields
The docs for the version field are incorrect, stating that it is SemVer compliant.
I ran into this with 1.75.0.
+1 on this. The documentation specifically says:
SemVer compatible version.
But vsce does not support all SemVer compatible versions.
Also, the marketplace is not SemVer compatible either. Taking 0.0.0-dev20200624 as an example. It is s valid semantic version, however marketplace does not recognize it.


Is this something that's still being considered?
Just to pile on here -- I should have linked our issue when we hit this.
In particular, in https://github.com/PowerShell/vscode-powershell/issues/1880#issue-433375920 we discuss the fact that npm uses semver v2 whereas the marketplace uses semver v1 (see @andschwa's comment) the .NET/Windows version scheme, meaning extensions are forced to use the intersection of the two; the marketplace doesn't tolerate a prerelease tag, but npm doesn't tolerate a patch version.
Actually, I checked the spec and since the marketplace doesn't support an alphnumeric tag after a hyphen, it does not use Semantic Versioning v1, which specifies:
A pre-release version number MAY be denoted by appending an arbitrary string immediately following the patch version and a dash. The string MUST be comprised of only alphanumerics plus dash [0-9A-Za-z-].
The marketplace seems to have its own versioning schema.
It seems pretty obvious to me that everything living in the Node.js ecosystem should support SemVer 2.0. I hope this will be addressed and fixed soon.
Most helpful comment
This is by design today, we only allow numeric values and period in the version. I can add an item to the backlog to allow pre-release tags.