{"action":"created","issue":{"url":"https://api.github.com/repos/npm/npm/issues/5499","repository_url":"https://api.github.com/repos/npm/npm","labels_url":"https://api.github.com/repos/npm/npm/issues/5499/labels{/name}","comments_url":"https://api.github.com/repos/npm/npm/issues/5499/comments","events_url":"https://api.github.com/repos/npm/npm/issues/5499/events","html_url":"https://github.com/npm/npm/issues/5499","id":35896189,"number":5499,"title":"Install multiple versions of a dependency","user":{"login":"denis-sokolov","id":113721,"avatar_url":"https://avatars0.githubusercontent.com/u/113721?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-sokolov","html_url":"https://github.com/denis-sokolov","followers_url":"https://api.github.com/users/denis-sokolov/followers","following_url":"https://api.github.com/users/denis-sokolov/following{/other_user}","gists_url":"https://api.github.com/users/denis-sokolov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-sokolov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-sokolov/subscriptions","organizations_url":"https://api.github.com/users/denis-sokolov/orgs","repos_url":"https://api.github.com/users/denis-sokolov/repos","events_url":"https://api.github.com/users/denis-sokolov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-sokolov/received_events","type":"User","site_admin":false},"labels":[{"id":104298906,"url":"https://api.github.com/repos/npm/npm/labels/feature-request","name":"feature-request","color":"98DCFF","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":125,"created_at":"2014-06-17T14:47:02Z","updated_at":"2017-12-15T06:37:17Z","closed_at":"2015-01-22T20:07:41Z","author_association":"NONE","body":"Currently a package can have only a single version of a dependency defined.\nI have a need to install multiple versions of a dependency at once.\nThis is a subset of aliasing features that were rejected in #2943.\n\nIn my use case I have a library ([`frozen-express`](https://www.npmjs.org/package/frozen-express)) that can during runtime take an object produced by another library (Express app) and do useful things with it.\nI support multiple versions of Express.\n\nDuring development I want to be able to test my application with different versions of my dependency. I could fake both versions of Express, but I consider that using a real Express app is a better deal. The tests become more of integration tests as opposed to unit tests, but that only makes them more useful.\n\nI could use `npm install express@3 && npm test && npm install express@4 && npm test`, but that is very significantly slower than running my entire test suite.\nIn addition, this wrecks any chance of receiving proper code coverage reports.\nObviously, I have code that conditionally applies to one or another version, and no code coverage tool understands that, if I need to run `npm test` twice (or more times).\n\nThe best workaround is, unfortunately, abusing the npm database. A single-line module [`express3`](https://github.com/denis-sokolov/express3) that depends on `express@3` and exports it solves all my problems.\n\nPerhaps this feature request is a tiny bit more viable than #2943?\n"},"comment":{"url":"https://api.github.com/repos/npm/npm/issues/comments/351926212","html_url":"https://github.com/npm/npm/issues/5499#issuecomment-351926212","issue_url":"https://api.github.com/repos/npm/npm/issues/5499","id":351926212,"user":{"login":"DuBistKomisch","id":703055,"avatar_url":"https://avatars2.githubusercontent.com/u/703055?v=4","gravatar_id":"","url":"https://api.github.com/users/DuBistKomisch","html_url":"https://github.com/DuBistKomisch","followers_url":"https://api.github.com/users/DuBistKomisch/followers","following_url":"https://api.github.com/users/DuBistKomisch/following{/other_user}","gists_url":"https://api.github.com/users/DuBistKomisch/gists{/gist_id}","starred_url":"https://api.github.com/users/DuBistKomisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuBistKomisch/subscriptions","organizations_url":"https://api.github.com/users/DuBistKomisch/orgs","repos_url":"https://api.github.com/users/DuBistKomisch/repos","events_url":"https://api.github.com/users/DuBistKomisch/events{/privacy}","received_events_url":"https://api.github.com/users/DuBistKomisch/received_events","type":"User","site_admin":false},"created_at":"2017-12-15T06:37:17Z","updated_at":"2017-12-15T06:37:17Z","author_association":"NONE","body":"In response to https://github.com/npm/npm/issues/5499#issuecomment-71930827:\r\n\r\n>No one yet has provided a real-world example of (2) in this thread, so I am somewhat suspicious that it's only hypothetical anyway.\r\n\r\nWe want to use `socket.io-client` to connect to separate v1 and v2 servers, and the protocols are mutually incompatible, so we'd need both clients installed simultaneously.\r\n\r\nEventually I'd like to switch to yarn for this project of course (sick of npm's shit, and yarn's only burned me once so far), but I don't have time to clean up all the tech debt required right now, so this is really annoying... guess I'll try out `npm-install-version`/`node-multidep`."}}
{"actor":{"display_login":"DuBistKomisch"}}