Is Server canonical for NPM? - node.js

Which of these package version numbers is canonical for NPM?
2.0.0-pre1
2.0.0-pre.1

NPM just uses the semver package, which follows https://semver.org/, so there isn't any "npm-flavored" semver.
According to semver, both of your examples are valid prerelease versions; the only requirement is that the version number is followed by a hyphen and a series of dot-separated alphanumeric identifiers.
That said, in my opinion, the second is more idiomatic, assuming that you are trying to convey the idea of prerelease version "pre #1". 2.0.0-beta.37, makes it clear that this is beta #37, which comes after prelease beta #36 and before prelease beta #38; as opposed to 2.0.0-beta37, which is ambiguous: beta37 could mean beta #37, or it could be a codename for this particular prerelease, followed by 2.0.0-blue42 etc. etc.

Related

semver: matching a pre-release suffix (3.* =/= 3.4.5-1)

Using this online semver checker: https://jubianchi.github.io/semver-check/
Notice how
version "3.4.5" is compatible with expression "3."
but...
version "3.4.5-1" is NOT compatible with expression "3."
How can I change my compatibility expression to include this pre-release version?
That's because pre-release versions are not included by default.
According to the docs:
SemVer comparisons without a pre-release comparator will skip pre-release versions. For example, >=1.2.3 will skip pre-releases when looking at a list of releases while >=1.2.3-0 will evaluate and find pre-releases.
In order to match that pre-release version, you could use, for example: ~3 >3.4.5-0.
3.4.5-1 satisfies constraint ~3 >3.4.5-0

What is this carbon,boron,argon , which is used for nodejs?

I am just curious, what is carbon, boron, argon which is used while describing versions of nodejs?
Actually Node.js provide code name for Long Term Support (LTS) versions.
It started from Argon (version 4.2.0 to 4.9.1). And then it went like Boron (6.9.0 to 6.16.0), Carbon(8.9.0 to 8.15.0) and Dubnium (10.13.0 to 10.15.0). Basically they name their LTS versions under Chemical elements.
Argon(Ar), Boron(B), Carbon(C) and Dubnium(Db).
They are the code names for the Nodejs versions (based on chemical names from the periodic table, names are taken alphabetically a, b, c ...), please check below link for more details,
https://nodejs.org/en/about/releases/
Now the second part,
Always try to use the stable and latest version (LTS) of Nodejs in production, currently, it is 12.18.3. But for experimenting you can go with the current version and play with new features.
With version 8+ you get async-await support of javascript in Nodejs
Don't bother with the previous version if you are starting new.
I don't know if I get your question right, but according to https://nodejs.org/en/blog/release/v8.9.0/, https://nodejs.org/en/blog/release/v6.9.0/, and https://nodejs.org/en/blog/release/v4.2.0/, these are the names of the releases.

azure-iot-sdk-c submodule/library versions

I want to know how to choose the versions of the dependencies used by azure-iot-sdk-c.
for example, I plan to use:
azure-iot-sdk-c from github.com/Azure/azure-iot-sdk-c.git, release_2018_02_09_after_bump_version(3deb0ca3a8e2d220a50175bef71d16d1650a3a79),
then how do I know the right submodule/library versions for it? for example, the sub-modules in https://github.com/Azure/azure-uamqp-c/releases, github.com/Azure/azure-umqtt-c.git ...?
Thanks in advance.
Software and library is managed using the version. And libraries should be designed backwards-compatible when the MAJOR version is same.
A common way to find the suitable version for GitHub project's sub-modules is looking the release date of that project. For example of Azure-iot-sdk-c_release_2018_02_09, the version sub-module of azure-uamqp-c is 1.x.x published before 09/02/2018, so we can use any version of 1.x.x azure-uamqp-c. And of cause, the recommend version should be the latest version of that major version(1.2.3) at present.
More detail about concept of version and sub-modules, you can refer the links below:
Working with submodules
Semantic Versioning 2.0.0
If anyone else lands here after searching the error message of 3deb0ca3a8e2d220a50175bef71d16d1650a3a79;
I found this (https://github.com/Azure/azure-iot-sdk-c/blob/main/doc/master_to_main_rename.md) which refers to azure iot branchn renaming from master -> main on Dec 1st -21, which may explain the trouble finding the reference.
By updating my *.bb file which refers to the github with:
git#linktoyourgit.com ;main
This will reference the specific branch main to find the correct revision.

How to release a beta version of a crate for limited public testing?

I want to carefully release a new version of a crate to give users a chance to test it first. How can I release it to crates.io as a "beta"? (similar to how npm has #next tagged releases).
It's not supposed to be a breaking change, so I'm not going to increase semver-major version. I don't want it to be automatically picked when users do cargo upgrade until the beta testing period ends.
What version syntax should I use for the release?
Do I need to use any special cargo options when releasing it?
How do users use cargo/Cargo.toml to opt in into the beta version?
Semantic versioning defines the concept of a pre-release version:
A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92
To use this in Cargo, publish a crate of the planned version number but append a pre-release identifier. I suggest -beta.0, allowing you to easily increase if you need a second:
[package]
name = "library"
version = "0.1.1-beta.0"
To use this, you need to specifically opt into it by putting beta into the version requirement:
[dependencies]
library = "0.1.1-beta"
To test this, I:
Spun up a local crates.io server
Uploaded the crate library with version 0.1.0
Used library = "0.1.0" in a binary project app — it resolved to 0.1.0
Uploaded the crate library with version 0.1.1-beta.0
Ran cargo update in app — the version did not change.
Changed to library = "0.1.1-beta" in app, ran cargo update — the version did change.
Uploaded the crate library with version 0.1.1-beta.1
Ran cargo update in app — the version did change.

Installshield 2011 - Problem Upgrading existing software with Version format 2009.727.1365

Using Installshield 2011, we're creating a major upgrade and having problems upgrading software with this Product Version format - 2009.727.1365. We keep getting the standard 'Installed software is newer than product to be installed' message. With IS 2011, the major version has to be less than 255, from what I can gather, and I think the old format we're using is breaking the check for upgrading.
I've created a test IS project upgrading from 1.00.0000 to 2.00.0000 with no issues, so I'm thinking the issue has to be related to the format of the product version already installed.
Is there a way to use InstallScript or something to compare our old format with the new one and then do an override?
Any help would be greatly appreciated. Thanks in advance!!
**I ended up using Christopher's reply in the link he provided below (Exceeding Version Limits). This seemed to handle the uninstallation of the existing product very well. Thanks again Guys!
It sounds as if you'll need to remove or modify the ISPreventDowngrade major-upgrade item, which is what detects and prevents this kind of version downgrade (and which is usually what one wants).
(Posted follow-up to question here, too: http://community.flexerasoftware.com/showthread.php?t=195076.)
Your ProductVersion property is invalid. The SDK says:
The value of the ProductVersion property is the version of the product in string format. This property is REQUIRED.
The format of the string is as follows:
major.minor.build
The first field is the major version and has a maximum value of 255. The second field is the minor version and has a maximum value of 255. The third field is called the build version or the update version and has a maximum value of 65,535.
I also recommend reading Exceeding Version Limits.
There are hacks to work around this if you understand how FindRelatedProducts and RemoveExistingProducts works.
Even though this is an older I'd like to add my two cents.
I am creating an Installshield 2012 Spring project and I had the same issue.
Our previous installers had a Product Version in the format 2005.xx.xxxx. Obviously this 2005 was an issue.
Instead of setting the ISACTIONPROP1 property to any value (as mentioned in http://community.flexerasoftware.com/showthread.php?195076-Old-Product-version-in-2009-727-1365-format).
I added a major upgrade item with the following values:
Product code of the old installers: xxx (enter yours here)
Minimum version: 2005.001.0001
Maximum version: 2005.255.65535
Version Range Inclusive (might be overkill)
With this, the system does allow the 2005.xxx.xxxx format here. It detected and removed the previous installation. For our newer installations we will use our "normal" versions:
5.008.0001
5.009.0001
...

Resources