{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/398","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/398/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/398/events","html_url":"https://github.com/jspm/jspm-cli/issues/398","id":54179500,"number":398,"title":"Package.json override workflow","user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T11:11:47Z","updated_at":"2015-01-17T18:00:27Z","closed_at":null,"body":"Despite my previous resistance this is probably very necessary.\r\n\r\nThe form would be:\r\n\r\n```json\r\n{\r\n  \"overrides\": {\r\n    \"github:components/jquery@2.0.0\": { ... }\r\n  }\r\n}\r\n```\r\n\r\nHere's a suggested workflow:\r\n\r\n1. When running `jspm -o`, add the override into the package.json. Also check for overrides from the package.json during install for all dependencies, this will work with the package hashing well.\r\n2. While there are overrides in the package.json, show a warning message after every install that overrides are present and that shared dependencies may not work as expected until the overrides are merged into the registry.\r\n3. `jspm register-overrides` can generate a PR into the registry for all current overrides in the package.json, returning a link to the PR. If the registry is not on GitHub, this would need to be done manually, and instead they would just be given the branch name. It could behave similarly to the jsDelivr bot - https://github.com/jsdelivr/jsdelivr/pull/3038.\r\n4. On the next install, when overrides in the package.json match the override looked up in the registry, these can be automatically cleared out (perhaps with a prompt asking the user about this first, or at least with a message).\r\n\r\nIf I've missed scenarios in the above please let me know.\r\n\r\nThe nice thing is this workflow can be implemented gradually as well from 1 - 4."},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/70376960","html_url":"https://github.com/jspm/jspm-cli/issues/398#issuecomment-70376960","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/398","id":70376960,"user":{"login":"theefer","id":36964,"avatar_url":"https://avatars.githubusercontent.com/u/36964?v=3","gravatar_id":"","url":"https://api.github.com/users/theefer","html_url":"https://github.com/theefer","followers_url":"https://api.github.com/users/theefer/followers","following_url":"https://api.github.com/users/theefer/following{/other_user}","gists_url":"https://api.github.com/users/theefer/gists{/gist_id}","starred_url":"https://api.github.com/users/theefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theefer/subscriptions","organizations_url":"https://api.github.com/users/theefer/orgs","repos_url":"https://api.github.com/users/theefer/repos","events_url":"https://api.github.com/users/theefer/events{/privacy}","received_events_url":"https://api.github.com/users/theefer/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T18:00:27Z","updated_at":"2015-01-17T18:00:27Z","body":"Sounds great. I understand your initial resistance to having local overrides, but I also believe it's going to be hard to justify not having a way to share such overrides (e.g. private repos, etc) without going through the registry. Also makes staging/testing an override easier. I like the idea of making it easy to submit an override to the registry.\r\n\r\nSlight OT, though related: I had this idea of a web app that'd help configure jspm dependencies.\r\n\r\nSomething like:\r\n\r\n1. Search for a given name (e.g. `moment`)\r\n2. Results show if it's already present in the registry. If not, it uses npm search and bower search to suggest npm/github endpoint that may be what you want.\r\n3. Picking one of the npm/github/other suggestions uses SystemJS and jspm.io to try and load the given endpoint.\r\n4. The UI lets you browse the resulting package, in particular available files, default main, and their respective exports.\r\n5. Any error (missing main, no exports found, loading error, dep not found, etc) is highlighted, with the option to solve them (pick the main file, configure a dependency, set the `lib`, override the format, etc). The package is then reloaded with the overrides so you can review if all is working as expected.\r\n6. Submit a PR to the parent repo and/or the jspm registry to record the alias and any override. Possibly (as per this PR) allow downloading the override locally (as a `jspm` command to run?) in the meantime.\r\n\r\nI haven't given it a try yet, so I don't know how much change is needed to make all of this possible. I suspect not much? Possibly 5. requires a way to apply the override in the CDN though?\r\n\r\nI don't know if this sounds like a good idea to other or not, so any feedback is welcome! Also apologies for hijacking this PR, I might open a new Issue if people feel like this is worth a try. \r\n\r\n/cc @oliverjash"}}