{"action":"created","issue":{"url":"https://api.github.com/repos/dojo/core/issues/145","repository_url":"https://api.github.com/repos/dojo/core","labels_url":"https://api.github.com/repos/dojo/core/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/dojo/core/issues/145/comments","events_url":"https://api.github.com/repos/dojo/core/issues/145/events","html_url":"https://github.com/dojo/core/issues/145","id":149403618,"number":145,"title":"Split Shims and Functional Core","user":{"login":"kitsonk","id":1282577,"avatar_url":"https://avatars.githubusercontent.com/u/1282577?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dojo/core/labels/discussion","name":"discussion","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dojo/core/milestones/7","html_url":"https://github.com/dojo/core/milestones/2016.04","labels_url":"https://api.github.com/repos/dojo/core/milestones/7/labels","id":1692697,"number":7,"title":"2016.04","description":"","creator":{"login":"kitsonk","id":1282577,"avatar_url":"https://avatars.githubusercontent.com/u/1282577?v=3","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":6,"state":"open","created_at":"2016-04-08T09:45:41Z","updated_at":"2016-04-19T09:34:05Z","due_on":"2016-04-29T23:00:00Z","closed_at":null},"comments":2,"created_at":"2016-04-19T09:34:05Z","updated_at":"2016-04-19T10:37:14Z","closed_at":null,"body":"@novemberborn pointed out that [`dojo/compose`](/dojo/compose) currently only has a dependency of `WeakMap` on core.  It raised the thought in my head that maybe we should split core into things that provide functional shims to ES6+ (and W3C APIs not fully available) and things that are actual functional enhancements to APIs that we would prefer to use (e.g. `request`).  This could reduce dependendicies for some packages and give a clear distinction between replicating APIs and providing *unique* APIs.  `Task` would go into *core* while `Promise` would be in *shims*.\r\n\r\nIt would also reduce my *worry* about Streams being in core.  That would clearly go into the shims package, because it is trying to replicate an future API.  It also gives us a clear option to produce a \"modern\" version of the shims package that is essentially nothing but `export default Promise;`."},"comment":{"url":"https://api.github.com/repos/dojo/core/issues/comments/211850629","html_url":"https://github.com/dojo/core/issues/145#issuecomment-211850629","issue_url":"https://api.github.com/repos/dojo/core/issues/145","id":211850629,"user":{"login":"dylans","id":97291,"avatar_url":"https://avatars.githubusercontent.com/u/97291?v=3","gravatar_id":"","url":"https://api.github.com/users/dylans","html_url":"https://github.com/dylans","followers_url":"https://api.github.com/users/dylans/followers","following_url":"https://api.github.com/users/dylans/following{/other_user}","gists_url":"https://api.github.com/users/dylans/gists{/gist_id}","starred_url":"https://api.github.com/users/dylans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylans/subscriptions","organizations_url":"https://api.github.com/users/dylans/orgs","repos_url":"https://api.github.com/users/dylans/repos","events_url":"https://api.github.com/users/dylans/events{/privacy}","received_events_url":"https://api.github.com/users/dylans/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T10:37:14Z","updated_at":"2016-04-19T10:37:14Z","body":"> Even unique APIs could be in their own package though.\r\n\r\nI agree with the plan for splitting out the shims, as I think it will make it much more natural to drop each shim when it is no longer needed.\r\n\r\nI do think we want to be careful to consider resisting the urge to split every API into their own package (I know that is often the preferred approach for Node.js devs). I think our reasoning was that ES modules do make it fairly easy to import and export just parts of packages, core itself is pretty small, and we wanted to avoid having 10 separate packages that all depend on one other.\r\n\r\nI think it's easy enough to decide if there are things that are fairly big in core besides shims that should be split out from core, especially as the dependency chain becomes clearer."}}