{"action":"created","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/681","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/681/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/681/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/681/events","html_url":"https://github.com/yarnpkg/yarn/issues/681","id":182333031,"number":681,"title":"Pinning dependencies behaves differently than npm.","user":{"login":"STRML","id":1197375,"avatar_url":"https://avatars1.githubusercontent.com/u/1197375?v=3","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"labels":[{"id":446993282,"url":"https://api.github.com/repos/yarnpkg/yarn/labels/compatibility","name":"compatibility","color":"b60205","default":false},{"id":458577783,"url":"https://api.github.com/repos/yarnpkg/yarn/labels/enhancement","name":"enhancement","color":"006b75","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-11T18:04:39Z","updated_at":"2017-04-28T15:56:18Z","closed_at":"2017-04-28T15:56:18Z","body":"<!-- *Before creating an issue please make sure you are using the latest version of yarn.* -->\n\n**Do you want to request a _feature_ or report a _bug_?**\nBug, or at least a behavior deviation.\n\n**What is the current behavior?**\nPinning a package to an exact version in package.json does not also pin it for dependencies, even if the pinned version satisfied the range.\n\n**If the current behavior is a bug, please provide the steps to reproduce.**\nI've created a reproduction repository [here](https://github.com/STRML/yarn-test).\n\nIn short, I've pinned `left-pad` to `1.1.1` at the root, which satisfies `color-parse`'s dependency of `\"left-pad\": \"^1.1.1\"`. However, yarn gives `1.1.3` to color-parse, and `1.1.1` to the root. npm just uses `1.1.1` for both.\n\nNote the differences in the npm & yarn tree:\n\n`npm 3.10.3`\n\n```\n├─┬ color-parse@1.2.0\n│ ├── color-name@1.1.1\n│ └── is-plain-obj@1.1.0\n└── left-pad@1.1.1\n```\n\n`yarn`\n\n```\nyarn ls v0.15.1\n├─ color-name@1.1.1\n├─ color-parse@1.2.0\n│  ├─ color-name@^1.0.0\n│  ├─ is-plain-obj@^1.1.0\n│  ├─ left-pad@^1.1.1\n│  └─ left-pad@1.1.3\n├─ is-plain-obj@1.1.0\n└─ left-pad@1.1.1\n```\n\n**What is the expected behavior?**\nI would expect that because a stricter definition of a root-level dependency satisfies the sub-dependency's version, it is used instead.\n\n**Please mention your node.js, yarn and operating system version.**\nNode 6.7.0, OSX 10.11, yarn 0.15.1 & npm 3.10.3.\n\nThis can be fixed by editing the yarn.lock directly but this could be error-prone.\n"},"comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments/298036459","html_url":"https://github.com/yarnpkg/yarn/issues/681#issuecomment-298036459","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/681","id":298036459,"user":{"login":"arcanis","id":1037931,"avatar_url":"https://avatars1.githubusercontent.com/u/1037931?v=3","gravatar_id":"","url":"https://api.github.com/users/arcanis","html_url":"https://github.com/arcanis","followers_url":"https://api.github.com/users/arcanis/followers","following_url":"https://api.github.com/users/arcanis/following{/other_user}","gists_url":"https://api.github.com/users/arcanis/gists{/gist_id}","starred_url":"https://api.github.com/users/arcanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arcanis/subscriptions","organizations_url":"https://api.github.com/users/arcanis/orgs","repos_url":"https://api.github.com/users/arcanis/repos","events_url":"https://api.github.com/users/arcanis/events{/privacy}","received_events_url":"https://api.github.com/users/arcanis/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T15:56:18Z","updated_at":"2017-04-28T15:56:18Z","body":"This issue seems to be fixed. Let me know if it's not.\r\n\r\n```\r\n❯ [mael-mbp?] /Users/mael/test ❯ yarn list\r\n\r\nUsing globally installed version of Yarn\r\nyarn list v0.23.2\r\nwarning No license field\r\n├─ color-name@1.1.2\r\n├─ color-parse@1.3.2\r\n│  ├─ color-name@^1.0.0\r\n│  └─ is-plain-obj@^1.1.0\r\n├─ is-plain-obj@1.1.0\r\n└─ left-pad@1.1.1\r\n✨  Done in 0.10s.\r\n```"}}
{"actor":{"display_login":"arcanis"}}