Search code examples
npmgulpnpm-install

Gulp version 4. Why is it not the 'latest' version?


I am working on a project which has gulp as a dependency. I am looking at updating it to gulp 4. A quick look at the output of npm show gulp@latest shows

...
dist-tags:
latest: 3.9.1  next: 4.0.0
...

I wonder why the gulp team have left latest: 3.9.1 and choose next: 4.0.0, i.e. npm install gulp installs 3.9.1 while to get 4.0.0 one has to ask for npm install gulp@next. Why is the default version still 3.9.1? Is version 4.0.0 still not fully supported or something? I have not found anything regarding this on the gulp website.


Solution

  • From the npm dist-tag docs:

    By default, the latest tag is used by npm to identify the current version of a package, and npm install (without any @ or @ specifier) installs the latest tag. Typically, projects only use the latest tag for stable release versions, and use other tags for unstable versions such as prereleases.

    The next tag is used by some projects to identify the upcoming version.

    By default, other than latest, no tag has any special significance to npm itself.

    In this case latest is 3.x.x and next is 4.x.x As it is following semver, it means that there are backwards incompatible changes. If you check gulpjs.com, the link to the documentation brings you to the 3.x.x docs. It's the authorative version at the moment as set by the gulp maintainers.