yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

`yarn info` yields repo info vs `npm info` which yields installed info #1873

Open rosskevin opened 7 years ago

rosskevin commented 7 years ago

Do you want to request a feature or report a bug? BUG

What is the current behavior? Currently, installing "react": "15.3.2" installs version 15.4.0-rc.4

If the current behavior is a bug, please provide the steps to reproduce.

~/p/a/temp ❯❯❯ yarn --version                                                feature/form ✚ ✱ ➜ ◼
0.16.1

~/p/a/temp ❯❯❯ yarn init                                                     feature/form ✚ ✱ ➜ ◼
yarn init v0.16.1
question name (temp): foo
question version (1.0.0): 
question description: 
question entry point (index.js): 
question git repository: 
question author: 
question license (MIT): 
success Saved package.json
✨  Done in 11.00s.

~/p/a/temp ❯❯❯ yarn add react@15.3.2                                         feature/form ✚ ✱ ➜ ◼
yarn add v0.16.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
success Saved 15 new dependencies.
├─ asap@2.0.5
├─ core-js@1.2.7
├─ encoding@0.1.12
├─ fbjs@0.8.6
├─ iconv-lite@0.4.13
├─ is-stream@1.1.0
├─ isomorphic-fetch@2.2.1
├─ js-tokens@2.0.0
├─ loose-envify@1.3.0
├─ node-fetch@1.6.3
├─ object-assign@4.1.0
├─ promise@7.1.1
├─ react@15.3.2
├─ ua-parser-js@0.7.12
└─ whatwg-fetch@2.0.0
✨  Done in 1.46s.
~/p/a/temp ❯❯❯ yarn info react version                                       feature/form ✚ ✱ ➜ ◼
yarn info v0.16.1
15.4.0-rc.4
✨  Done in 0.38s.

~/p/a/temp ❯❯❯ cat package.json                                              feature/form ✚ ✱ ➜ ◼
{
  "name": "foo",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "react": "15.3.2"
  }
}

Here is a snapshot of yarn info react:

yarn info v0.16.1
{ name: 'react',
  description: 'React is a JavaScript library for building user interfaces.',
  'dist-tags': 
   { latest: '15.3.2',
     '0.10.0-rc1': '0.10.0-rc1',
     '0.11.0-rc1': '0.11.0-rc1',
     next: '15.4.0-rc.4' },
  versions: 
   [ '0.0.1',
     '0.0.2',
     '0.0.3',
     '0.1.2',
     '0.2.0',
     '0.2.1',
     '0.2.2',
     '0.2.3',
     '0.2.4',
     '0.2.5',
     '0.2.6',
     '0.3.0',
     '0.3.4',
     '0.3.5',
     '0.5.0',
     '0.5.1',
     '0.5.2',
     '0.6.0',
     '0.6.1',
     '0.6.2',
     '0.6.3',
     '0.7.0',
     '0.7.1',
     '0.8.0',
     '0.9.0-rc1',
     '0.9.0',
     '0.10.0-rc1',
     '0.10.0',
     '0.11.0-rc1',
     '0.11.0',
     '0.11.1',
     '0.11.2',
     '0.12.0-rc1',
     '0.12.0',
     '0.12.1',
     '0.12.2',
     '0.13.0-alpha.1',
     '0.13.0-alpha.2',
     '0.13.0-beta.1',
     '0.13.0-beta.2',
     '0.13.0-rc1',
     '0.13.0-rc2',
     '0.13.0',
     '0.13.1',
     '0.13.2',
     '0.13.3',
     '0.14.0-alpha1',
     '0.14.0-alpha2',
     '0.14.0-alpha3',
     '0.14.0-beta1',
     '0.14.0-beta2',
     '0.14.0-beta3',
     '0.14.0-rc1',
     '0.14.0',
     '0.14.1',
     '0.14.2',
     '0.14.3',
     '0.14.4',
     '0.14.5',
     '0.14.6',
     '0.14.7',
     '0.14.8',
     '0.15.0-alpha.1',
     '15.0.0-rc.1',
     '15.0.0-rc.2',
     '15.0.0',
     '15.0.1',
     '15.0.2-alpha.1',
     '15.0.2-alpha.2',
     '15.0.2-alpha.3',
     '15.0.2-alpha.4',
     '15.0.2',
     '15.0.3-alpha.1',
     '15.0.3-alpha.2',
     '15.1.0-alpha.1',
     '15.1.0',
     '15.2.0-rc.1',
     '15.2.0-rc.2',
     '15.2.0',
     '15.2.1',
     '15.3.0-rc.1',
     '15.3.0-rc.2',
     '15.3.0-rc.3',
     '15.3.0',
     '15.3.1-rc.1',
     '15.3.1-rc.2',
     '15.3.1',
     '15.3.2-rc.1',
     '15.3.2',
     '15.4.0-rc.1',
     '15.4.0-rc.2',
     '15.4.0-rc.3',
     '15.4.0-rc.4' ],
  maintainers: 
   [ { name: 'fb',
       email: 'opensource+npm@fb.com' },
     { name: 'gaearon',
       email: 'dan.abramov@gmail.com' },
     { name: 'graue',
       email: 'scott@oceanbase.org' },
     { name: 'jeffmo',
       email: 'lbljeffmo@gmail.com' },
     { name: 'sebmarkbage',
       email: 'sebastian@calyptus.eu' },
     { name: 'spicyj',
       email: 'ben@benalpert.com' },
     { name: 'zpao',
       email: 'paul@oshannessy.com' } ],
  time: 
   { modified: '2016-11-14T22:19:16.040Z',
     created: '2011-10-26T17:46:21.942Z',
     '0.0.1': '2011-10-26T17:46:22.746Z',
     '0.0.2': '2011-10-28T22:40:36.115Z',
     '0.0.3': '2011-10-29T13:40:41.073Z',
     '0.1.2': '2011-12-21T20:56:27.003Z',
     '0.2.0': '2012-01-10T18:58:59.882Z',
     '0.2.1': '2012-01-10T19:36:17.074Z',
     '0.2.2': '2012-01-10T20:44:37.670Z',
     '0.2.3': '2012-01-10T23:15:07.894Z',
     '0.2.4': '2012-01-11T15:44:12.287Z',
     '0.2.5': '2012-01-11T19:55:24.505Z',
     '0.2.6': '2012-01-11T20:58:23.590Z',
     '0.3.0': '2012-01-14T06:06:46.726Z',
     '0.3.4': '2012-01-17T14:59:12.449Z',
     '0.3.5': '2012-01-17T20:13:08.100Z',
     '0.5.0': '2012-01-18T06:49:43.631Z',
     '0.5.1': '2012-01-18T18:07:11.608Z',
     '0.5.2': '2012-03-13T14:01:11.641Z',
     '0.6.0': '2012-03-28T22:14:37.758Z',
     '0.6.1': '2012-04-25T16:57:02.959Z',
     '0.6.2': '2012-09-12T21:14:33.270Z',
     '0.6.3': '2012-10-18T04:24:03.381Z',
     '0.7.0': '2013-05-23T18:23:29.579Z',
     '0.7.1': '2013-05-23T19:48:26.316Z',
     '0.8.0': '2013-12-19T18:46:02.355Z',
     '0.9.0-rc1': '2014-02-17T03:31:05.147Z',
     '0.9.0': '2014-02-20T18:47:54.841Z',
     '0.10.0-rc1': '2014-03-19T18:28:04.636Z',
     '0.10.0': '2014-03-21T21:48:06.915Z',
     '0.11.0-rc1': '2014-07-13T04:41:23.857Z',
     '0.11.0': '2014-07-17T20:51:00.913Z',
     '0.11.1': '2014-07-25T18:36:36.918Z',
     '0.11.2': '2014-09-16T18:33:57.956Z',
     '0.12.0-rc1': '2014-10-16T22:24:04.601Z',
     '0.12.0': '2014-10-28T18:40:33.643Z',
     '0.12.1': '2014-11-18T06:56:11.863Z',
     '0.12.2': '2014-12-18T20:51:41.024Z',
     '0.13.0-alpha.1': '2014-12-23T20:08:42.636Z',
     '0.13.0-alpha.2': '2015-01-16T19:09:02.924Z',
     '0.13.0-beta.1': '2015-01-28T05:19:01.230Z',
     '0.13.0-beta.2': '2015-02-14T02:37:43.316Z',
     '0.13.0-rc1': '2015-02-22T21:36:01.461Z',
     '0.13.0-rc2': '2015-03-03T19:52:41.430Z',
     '0.13.0': '2015-03-10T21:51:43.816Z',
     '0.13.1': '2015-03-17T00:01:25.829Z',
     '0.13.2': '2015-04-18T22:38:01.925Z',
     '0.13.3': '2015-05-08T23:40:52.344Z',
     '0.14.0-alpha1': '2015-05-11T05:37:34.808Z',
     '0.14.0-alpha2': '2015-05-20T20:38:30.743Z',
     '0.14.0-alpha3': '2015-05-27T23:49:08.232Z',
     '0.14.0-beta1': '2015-07-03T08:50:06.815Z',
     '0.14.0-beta2': '2015-07-31T05:31:14.850Z',
     '0.14.0-beta3': '2015-08-03T21:33:47.972Z',
     '0.14.0-rc1': '2015-09-10T16:00:44.142Z',
     '0.14.0': '2015-10-07T17:27:39.042Z',
     '0.14.1': '2015-10-28T21:36:14.876Z',
     '0.14.2': '2015-11-02T19:55:21.088Z',
     '0.14.3': '2015-11-19T02:26:57.036Z',
     '0.14.4': '2015-12-29T22:00:21.565Z',
     '0.14.5': '2015-12-29T22:39:56.148Z',
     '0.14.6': '2016-01-06T23:52:45.571Z',
     '0.15.0-alpha.1': '2016-01-21T04:16:30.061Z',
     '0.14.7': '2016-01-28T19:59:29.509Z',
     '15.0.0-rc.1': '2016-03-08T01:07:27.078Z',
     '15.0.0-rc.2': '2016-03-16T22:19:35.759Z',
     '0.14.8': '2016-03-29T16:19:44.344Z',
     '15.0.0': '2016-04-07T21:25:42.928Z',
     '15.0.1': '2016-04-08T18:24:01.947Z',
     '15.0.2-alpha.1': '2016-04-20T18:17:51.152Z',
     '15.0.2-alpha.2': '2016-04-21T22:22:07.642Z',
     '15.0.2-alpha.3': '2016-04-25T20:04:05.908Z',
     '15.0.2-alpha.4': '2016-04-28T07:12:12.709Z',
     '15.0.2': '2016-04-30T00:38:26.753Z',
     '15.0.3-alpha.1': '2016-05-03T19:40:31.408Z',
     '15.0.3-alpha.2': '2016-05-10T04:38:08.171Z',
     '15.1.0-alpha.1': '2016-05-10T05:28:41.025Z',
     '15.1.0': '2016-05-20T23:06:26.234Z',
     '15.2.0-rc.1': '2016-06-15T01:30:22.163Z',
     '15.2.0-rc.2': '2016-07-01T06:32:12.488Z',
     '15.2.0': '2016-07-01T18:52:24.535Z',
     '15.2.1': '2016-07-08T22:31:10.383Z',
     '15.3.0-rc.1': '2016-07-13T18:58:33.786Z',
     '15.3.0-rc.2': '2016-07-13T21:02:13.320Z',
     '15.3.0-rc.3': '2016-07-21T22:59:16.416Z',
     '15.3.0': '2016-07-29T18:38:21.959Z',
     '15.3.1-rc.1': '2016-08-12T23:35:31.733Z',
     '15.3.1-rc.2': '2016-08-15T22:56:32.596Z',
     '15.3.1': '2016-08-19T18:50:25.665Z',
     '15.3.2-rc.1': '2016-09-15T23:43:44.694Z',
     '15.3.2': '2016-09-19T17:47:04.705Z',
     '15.4.0-rc.1': '2016-10-04T22:35:42.618Z',
     '15.4.0-rc.2': '2016-10-05T22:51:07.111Z',
     '15.4.0-rc.3': '2016-10-14T19:17:37.819Z',
     '15.4.0-rc.4': '2016-10-14T22:00:00.474Z' },
  repository: 
   { type: 'git',
     url: 'git+https://github.com/facebook/react.git' },
  readmeFilename: 'README.md',
  homepage: 'https://facebook.github.io/react/',
  keywords: [ 'react' ],
  bugs: { url: 'https://github.com/facebook/react/issues' },
  users: 
   { dubban: true,
     '3boll': true,
     bausmeier: true,
     axelav: true,
     joakin: true,
     ruffle1986: true,
     abalandin: true,
     koorchik: true,
     nikunjchapadia: true,
     z5h: true,
     dozoisch: true,
     treycordova: true,
     xanderiel: true,
     sroccaserra: true,
     'david.herse': true,
     andrezsanchez: true,
     ich: true,
     laiff: true,
     erikvold: true,
     spicyj: true,
     jkkramer: true,
     mhaidarh: true,
     womjoy: true,
     azaviruha: true,
     insin: true,
     dimitriwalters: true,
     chrisayn: true,
     justinanastos: true,
     devonbl: true,
     kewah: true,
     robbschiller: true,
     rifat: true,
     codematix: true,
     agtlucas: true,
     stuligan: true,
     jackson7am: true,
     jehoshua02: true,
     shanewholloway: true,
     haeck: true,
     leebyron: true,
     mehditup: true,
     ahmedelgabri: true,
     mathieuancelin: true,
     pughpugh: true,
     sobering: true,
     wambulance: true,
     pburtchaell: true,
     kulakowka: true,
     pensierinmusica: true,
     'goodacre.liam': true,
     dbrockman: true,
     onestone: true,
     jarib: true,
     tchcxp: true,
     'arnold-almeida': true,
     gentlecat: true,
     yodairish: true,
     jamesulph: true,
     markthethomas: true,
     byoigres: true,
     koulmomo: true,
     geilt: true,
     borjes: true,
     neaton: true,
     simplyianm: true,
     enet4: true,
     aleclarson: true,
     leonardorb: true,
     tjwebb: true,
     mchampi: true,
     af: true,
     orlenka: true,
     oheard: true,
     zchee: true,
     hmazter: true,
     kogai: true,
     dac2205: true,
     moimikey: true,
     charlespeters: true,
     sua: true,
     goblindegook: true,
     hpherzog: true,
     chriscalo: true,
     tomdanvers: true,
     gabrielsanterre: true,
     season19840122: true,
     program247365: true,
     modao: true,
     danieljjh: true,
     damianof: true,
     chrisjordanme: true,
     prabhash1785: true,
     theveil: true,
     qqqppp9998: true,
     kai_: true,
     kriswallsmith: true,
     jabbrwcky: true,
     rocalayo: true,
     mfunkie: true,
     drabinowitz: true,
     nak2k: true,
     keeyanajones: true,
     bplabombarda: true,
     tinyhill: true,
     alexcoady: true,
     sergiodxa: true,
     huangdawei: true,
     chicagoan: true,
     yxqme: true,
     tcskrovseth: true,
     octoo: true,
     nicastelo: true,
     attomos: true,
     buzuli: true,
     clholzin: true,
     'h.kamitomo': true,
     hyzhak: true,
     gilbarbara: true,
     freshlogic: true,
     itonyyo: true,
     qiming: true,
     aahz: true,
     icestone: true,
     ugarz: true,
     cypark: true,
     manny: true,
     courington: true,
     enriquecaballero: true,
     sjnnr: true,
     pjb3: true,
     bernardhamann: true,
     isik: true,
     fleeting: true,
     sume0805: true,
     narven: true,
     tuiteraz: true,
     arkanciscan: true,
     wkaifang: true,
     famousgarkin: true,
     asa: true,
     jovenbarola: true,
     monjer: true,
     nice_body: true,
     yhui02: true,
     lova: true,
     arulkumar: true,
     devdebonair: true,
     tandysean: true,
     tarex: true,
     knoja4: true,
     cpojer: true,
     antouank: true,
     sammyteahan: true,
     dongguangming: true,
     draganhr: true,
     xgqfrms: true,
     iolo: true,
     nickeltobias: true,
     yangxiaoqiang: true,
     kuakman: true,
     wzbg: true,
     shiva127: true,
     jimmyking: true,
     szlegradi: true,
     allthingssmitty: true,
     leyyinad: true,
     onheiron: true,
     edloidas: true,
     ddgromit: true,
     igreulich: true,
     vincetardy: true,
     stefanof: true,
     prisme: true,
     vbv: true,
     jordansrowles: true,
     nalindak: true,
     luckyulin: true,
     unitetheclans: true,
     hosomichi: true,
     davidchubbs: true,
     almccann: true,
     'martin.toma': true,
     shelling: true,
     urbantumbleweed: true,
     heinzmuller: true,
     junjiansyu: true,
     corintho: true,
     stany: true,
     js3692: true,
     keberox: true,
     lavir: true,
     ambdxtrch: true,
     vwal: true,
     leahcimic: true,
     'zhiquan.yu': true,
     epickris: true,
     moxiaohe: true,
     'oka-hide': true,
     geese98: true,
     moogus: true,
     zhoutk: true,
     amobiz: true,
     rpnna: true,
     evan2x: true,
     kevinsuttle: true,
     cfleschhut: true,
     benstr: true,
     jtsky: true,
     tobiasnickel: true,
     rhaynel: true,
     rbartoli: true,
     sternelee: true,
     victorquinn: true,
     daniele_cammarata: true,
     barbarosh: true,
     brandonccx: true,
     kytart: true,
     ferrari: true,
     liugenbin: true,
     acterce: true,
     kevinoneill: true,
     feedm3: true,
     sergeymakoveev: true,
     tomazzaman: true,
     graubnla: true,
     artursgirons: true,
     fistynuts: true,
     lourenzo: true,
     hugojosefson: true,
     lcdss: true,
     zoey1990: true,
     kratyk: true,
     alexlukin: true,
     aoki: true,
     'chris-me': true,
     nexume: true,
     apehead: true,
     minfrank: true,
     ricardoj: true,
     joannerpena: true,
     orkisz: true,
     highlanderkev: true,
     richie_south: true,
     panlw: true,
     boterom89: true,
     philiiiiiipp: true,
     feyzee: true,
     dubielzyk: true,
     lex_nel: true,
     vasz: true,
     subhojit777: true,
     brunolemos: true,
     ajaegle: true,
     'dmitry-lobanov': true,
     huibean: true,
     'apita-cc': true,
     tribou: true,
     sakura: true,
     th3brink: true,
     katy: true,
     krishaamer: true,
     bhsiung: true,
     ferchoriverar: true,
     wouter_vdb: true,
     zhouanbo: true,
     dbobrov: true,
     jeffboyus: true,
     giioaj: true,
     hypersprite: true,
     princetoad: true,
     reekdeb: true,
     strokirk: true,
     riteshg: true,
     rokeyzki: true,
     mrmartineau: true,
     amattbryan: true,
     wangfei: true,
     shuoshubao: true,
     asm2hex: true,
     walkercz: true,
     dskecse: true,
     bcoe: true,
     walkah: true,
     dmitryscaletta: true,
     freddieridell: true,
     justinjung04: true,
     mhetrerajat: true,
     javascriptismagic: true,
     guypeer: true,
     gindis: true,
     kaapex: true,
     booleanhunter: true,
     alexjsdev: true,
     bogdanvlviv: true,
     tyus512: true,
     saravntbe: true,
     xile611: true,
     kimmohintikka: true,
     bpatel: true,
     chuck0523: true,
     tigefa: true,
     emarcs: true,
     marcobiedermann: true,
     goatandsheep: true,
     septs: true,
     fsgdez: true,
     hyteer: true,
     digitalblake: true,
     mluberry: true,
     ibartholomew: true,
     leocreatini: true,
     scotchulous: true,
     bshackelford: true,
     kenjisan4u: true,
     evegreen: true,
     razr9: true,
     onufrienko: true,
     'john-goldsmith': true,
     robertgonzales: true,
     akarem: true,
     apopek: true,
     wirehive: true,
     arulsakthiprakasam: true,
     akarpov: true,
     bsesic: true,
     sozonov: true,
     vpal: true,
     ironmaniiith: true,
     pgabronis: true,
     tonyseek: true,
     wanngxiao: true,
     kwhitley: true,
     enzoferey: true,
     maninacan: true,
     sasquatch: true,
     reneweb: true,
     natforyou: true,
     fchienvuhoang: true,
     darklake: true,
     v3rron: true,
     hydra: true,
     pris54: true,
     lencioni: true,
     cssachse: true,
     avanthikameenakshi: true,
     yanrivera: true,
     morewry: true,
     easimonenko: true,
     degouville: true,
     tmurngon: true,
     danielbayley: true,
     pkhotpanya: true,
     wayhome: true,
     rwaness: true,
     djorg83: true,
     kudakv: true,
     mrmaxmeranda: true,
     coot: true,
     theramey: true,
     lucaskatayama: true,
     amdsouza92: true,
     morogasper: true,
     prbsas: true,
     lavysh: true,
     mindrudan: true,
     vespaccio: true,
     fenrir: true,
     serkonyc: true,
     muroc: true,
     fahadjadoon: true,
     igorsetsfire: true,
     dzhou777: true,
     womcauliff: true,
     ahshum: true,
     romelperez: true,
     kontrax: true,
     rhomnickcoloma: true,
     ramavarsh: true,
     jetbug123: true,
     jankanty: true,
     oleblaesing: true,
     'federico-garcia': true,
     timjk: true },
  license: 'BSD-3-Clause',
  version: '15.4.0-rc.4',
  files: 
   [ 'LICENSE',
     'PATENTS',
     'addons.js',
     'react.js',
     'addons/',
     'dist/',
     'lib/' ],
  main: 'react.js',
  engines: { node: '>=0.10.0' },
  dependencies: 
   { fbjs: '^0.8.4',
     'loose-envify': '^1.1.0',
     'object-assign': '^4.1.0' },
  browserify: { transform: [ 'loose-envify' ] },
  scripts: {},
  dist: 
   { shasum: '09d08dd266a9088db963399dfdf814377e9a74dc',
     tarball: 'https://registry.npmjs.org/react/-/react-15.4.0-rc.4.tgz' },
  directories: {} }
Done in 0.35s.

What is the expected behavior? It installs the specified version 15.3.2

Please mention your node.js, yarn and operating system version. yarn 0.16.1, and 0.17.0 node 7.1.0 os OSX 10.12.1

wyze commented 7 years ago

The correct version is installed. When you run yarn info this hits the npm registry and reports the information from there.

$ yarn info react version
yar info v0.18.0-0
15.4.0-rc.4
✨  Done in 0.27s.

$ npm info react version
15.3.2
rosskevin commented 7 years ago

Confirmed, the correct version is installed. Is there a CLI command I should be using to find out which is installed?

wyze commented 7 years ago

yarn ls react would do it.

meta-meta commented 7 years ago

is there currently a way to get info for the installed version? I'm looking for peerDependencies of currently installed packages

Meligy commented 7 years ago

Actually, npm info (alias for npm view) shows npm registry version not installed version.

See https://docs.npmjs.com/cli/view

You use npm ls for local package version, and npm explore for running commands in local package folder

connorshea commented 6 years ago

yarn ls was removed, now I assume yarn list does the same thing?