Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The naming convention for Sails plugins and core modules.

Branches / NPM dist tags

The git branch and NPM dist tag for a particular package are based on the Sails version they're intended to be run with. For example:

NPM dist tag Recommended branch name where hotfixes should be done Example of most recent release on branch
edge master 22.45.38-4
for-sails-2 for-sails-2 21.0.19
for-sails-1 for-sails-1 19.11.2
for-sails-0.12 for-sails-0.12 18.2.5
for-sails-0.11 for-sails-0.11 17.1.12

In situations where the recommended branch name is not specific enough (e.g. if an adapter needs to introduce breaking changes that are database-specific and unrelated to sails version), more package-specific branch names might need to be used if/when you need to introduce hotfixes (e.g. 20.x). In those cases, it would generally behoove individual package maintainers to include a table in their README files that map releases of their package with a particular version of Sails.

Similarly, you may not always need a branch for a dist tag! Create a branch when you need to do your first hotfix.

In general, remember that branch names are up to you. The important thing is to consistently use conventional NPM dist tags.

Git tags / version strings

Note that git tags and the version string (in package.json) for a particular package are completely distinct from the Sails version. For example:

Git tag Version string
v4.13.8 4.13.8
v5.10.7 5.10.7
v5.10.7-4 5.10.7-4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.