{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/416","repository_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin","labels_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/416/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/416/comments","events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/416/events","html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/416","id":171900358,"number":416,"title":"[JENKINS-37006] Improved module resolution/loading/sharing across browser bundles","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/labels/needs-review","name":"needs-review","color":"eb6420"},{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/labels/work-in-progress","name":"work-in-progress","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-08-18T13:26:17Z","updated_at":"2016-08-23T08:49:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/416","html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/416","diff_url":"https://github.com/jenkinsci/blueocean-plugin/pull/416.diff","patch_url":"https://github.com/jenkinsci/blueocean-plugin/pull/416.patch"},"body":"# Description\r\n\r\nSee [JENKINS-37006](https://issues.jenkins-ci.org/browse/JENKINS-37006).\r\n\r\nDepends on these PRs (most of the changes are there):\r\n\r\n* https://github.com/jenkinsci/js-modules/pull/2\r\n* https://github.com/jenkinsci/js-builder/pull/5\r\n\r\n`js-modules` support for version range/wildcard module `import` + support for `export` of internal deps (e.g. exporting `react` and `react-dom` from the main `blueocean-web` bundle).\r\n\r\nSo, the explicit export code in the `init.jsx` in `blueocean-web` is gone now. Exports (and imports) are now done in the `package.json` i.e.\r\n\r\n```javascript\r\n  \"jenkinscd\": {\r\n    \"import\": [\r\n      \"history\",\r\n      \"immutable\",\r\n      \"keymirror\",\r\n      \"react-redux\",\r\n      \"react-router\",\r\n      \"redux\",\r\n      \"redux-thunk\"\r\n    ],\r\n    \"export\": [\r\n      \"@jenkins-cd/js-extensions\",\r\n      \"@jenkins-cd/design-language\",\r\n      \"react\",\r\n      \"react-dom\"\r\n    ]\r\n  }\r\n```\r\n\r\n> Of course, for more fine-grained control,  you can also call `import` and `export` on the `bundle` instance in the `gulpfile.js`.\r\n\r\nIf the bundle can use any version of a package, just specify the package import with a version number of \"any\" on it (using the same format as when running `npm install` on the command line) e.g. `immutable@any`. This also tells `js-modules` not to load the bundle if it's not loaded i.e. to wait for something else to load the bundle i.e. it's \"provided\". We use this for importing `react` and `react-dom` into all other bundles generated outside `blueocean-web` e.g. in dashboard.\r\n\r\nIt also supports imports of version ranges e.g. `immutable@3.8.x` or `immutable@3.x`, where `x` can be any number. OR, you can specify an ordered list of compatible versions e.g. `immutable@3.8.x,3.8.1`. What the later translates to in `js-modules` is ... \"if another bundle has already loaded any 3.8.* version of `immutable` that can be used (no need to load anything), otherwise load 3.8.1 and use it\".\r\n\r\n# Submitter checklist\r\n- [x] Link to JIRA ticket in description, if appropriate.\r\n- [x] Change is code complete and matches issue description\r\n- [x] Apppropriate unit or acceptance tests or explaination to why this change has no tests\r\n- [x] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below. N/A\r\n- [x] Ran Acceptance Test Harness against PR changes.\r\n- [x] Test @kzantow branch ... https://github.com/kzantow/blueocean-plugin/tree/victory-failure and make necessary tweaks to make sure it works without the dev jumping through a load of hoops. __Verified__: Worked without any tweaks. [Branch here](https://github.com/tfennelly/blueocean-plugin/tree/JENKINS-37006-with-kzantow-victory). [Screenshot here](https://www.dropbox.com/s/jjfdgvy9h6ybj2f/Screenshot%202016-08-18%2015.40.16.png?dl=0). \r\n- [ ] Update docs to reflect changes.\r\n- [ ] Some user docs on how to use `import` ad `export`.\r\n- [ ] Some BO specific docs on how bundle loading is done, with specifics regarding `react` and `react-dom`.\r\n\r\n# Reviewer checklist\r\n- [ ] Run the changes and verified the change matches the issue description\r\n- [ ] Reviewed the code\r\n- [x] Verified that the appropriate tests have been written or valid explaination given\r\n\r\n@jenkinsci/code-reviewers @reviewbybees \r\n"},"comment":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/comments/241667294","html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/416#issuecomment-241667294","issue_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/416","id":241667294,"user":{"login":"michaelneale","id":14976,"avatar_url":"https://avatars.githubusercontent.com/u/14976?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelneale","html_url":"https://github.com/michaelneale","followers_url":"https://api.github.com/users/michaelneale/followers","following_url":"https://api.github.com/users/michaelneale/following{/other_user}","gists_url":"https://api.github.com/users/michaelneale/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelneale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelneale/subscriptions","organizations_url":"https://api.github.com/users/michaelneale/orgs","repos_url":"https://api.github.com/users/michaelneale/repos","events_url":"https://api.github.com/users/michaelneale/events{/privacy}","received_events_url":"https://api.github.com/users/michaelneale/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T08:49:10Z","updated_at":"2016-08-23T08:49:10Z","body":"this will need attention of @cliffmeyers and @scherler (to try and also to review). "}}
{"actor":{"display_login":"michaelneale"}}