Skip to content

Yarn uses matching @next / unstable version instead of latest matching stable like NPM #1690

@Ambroos

Description

@Ambroos

Do you want to request a feature or report a bug?
Bug 🐜 😱 Yarn selects different versions than NPM with the same version specifier.

What is the current behavior?

  • Package aes-decrypter is on npm: { latest: '1.0.3', beta: '1.0.0-0', next: '1.1.0' }
  • Package video.jsis on npm: { latest: '5.11.9', next: '5.12.6', alpha: '5.9.0-2' }
  • Package videojs-contrib-hls depends on aes-decrypter@^1.0.3' and video.js@^5.10.1
  • My package depends on videojs-contrib-hls@^3.6.7 inpackage.json:
{
  "name": "yarn-next-bug-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "videojs-contrib-hls": "^3.6.7"
  }
}
  • No yarn.lock
  • Run yarn

The packages installed and added to yarn.lock are:

What is the expected behavior?
What NPM does with this same package.json:

Please mention your node.js, yarn and operating system version.
node.js v7.0.0
both yarn v0.16.0 and v0.19.0-0 (master at f0d875a) have the bug
both npm v3.10.9 and v4.0.2 do the expected thing
macOS Sierra 10.12.2 Beta (16C32f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions