npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Support semver build metadata in package versions

What I Wanted to Do

I wanted to specify version like this 1.0.1+foo

What Happened Instead

NPM strips build metadata from version

Reproduction Steps

npm init
npm publish

Platform Info

$ npm --versions
{ '': '1.0.1+foo',
  npm: '6.7.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '34.0',
  http_parser: '2.8.0',
  icu: '63.1',
  llhttp: '1.1.1',
  modules: '67',
  napi: '4',
  nghttp2: '1.34.0',
  node: '11.11.0',
  openssl: '1.1.1a',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.26.0',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform

(Moved to #idea as I think npm is working as intended.)

Is this to publish a single copy of a given version number with some extra metadata? (As opposed to multiple variations of a single version number for different platforms, say.)