{"action":"created","comment":{"url":"https://api.github.com/repos/microstates/ember/pulls/comments/236637817","pull_request_review_id":178750039,"id":236637817,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjYzNzgxNw==","diff_hunk":"@@ -1,11 +1,11 @@\n {\n-  \"name\": \"ember-microstates\",\n+  \"name\": \"@microstates/ember\",\n   \"version\": \"0.3.0\",\n   \"description\": \"Data Down, Actions Up: at the molecular level.\",\n   \"keywords\": [\n     \"ember-addon\"\n   ],\n-  \"repository\": \"https://github.com/cowboyd/ember-microstates.git\",\n+  \"repository\": \"https://github.com/cowboyd/@microstates/ember.git\",","path":"package.json","position":10,"original_position":10,"commit_id":"05ba1a3a80bc7d7f5fe18fda7f356cf70b28ed9f","original_commit_id":"05ba1a3a80bc7d7f5fe18fda7f356cf70b28ed9f","user":{"login":"sivakumar-kailasam","id":604117,"node_id":"MDQ6VXNlcjYwNDExNw==","avatar_url":"https://avatars3.githubusercontent.com/u/604117?v=4","gravatar_id":"","url":"https://api.github.com/users/sivakumar-kailasam","html_url":"https://github.com/sivakumar-kailasam","followers_url":"https://api.github.com/users/sivakumar-kailasam/followers","following_url":"https://api.github.com/users/sivakumar-kailasam/following{/other_user}","gists_url":"https://api.github.com/users/sivakumar-kailasam/gists{/gist_id}","starred_url":"https://api.github.com/users/sivakumar-kailasam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sivakumar-kailasam/subscriptions","organizations_url":"https://api.github.com/users/sivakumar-kailasam/orgs","repos_url":"https://api.github.com/users/sivakumar-kailasam/repos","events_url":"https://api.github.com/users/sivakumar-kailasam/events{/privacy}","received_events_url":"https://api.github.com/users/sivakumar-kailasam/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n  \"repository\": \"https://github.com/microstates/ember.git\",\r\n```","created_at":"2018-11-27T12:17:46Z","updated_at":"2018-11-27T12:41:28Z","html_url":"https://github.com/microstates/ember/pull/72#discussion_r236637817","pull_request_url":"https://api.github.com/repos/microstates/ember/pulls/72","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/microstates/ember/pulls/comments/236637817"},"html":{"href":"https://github.com/microstates/ember/pull/72#discussion_r236637817"},"pull_request":{"href":"https://api.github.com/repos/microstates/ember/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/microstates/ember/pulls/72","id":230624938,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwNjI0OTM4","html_url":"https://github.com/microstates/ember/pull/72","diff_url":"https://github.com/microstates/ember/pull/72.diff","patch_url":"https://github.com/microstates/ember/pull/72.patch","issue_url":"https://api.github.com/repos/microstates/ember/issues/72","number":72,"state":"open","locked":false,"title":"Bring @microstates/ember up to date with Microstates.js library","user":{"login":"taras","id":74687,"node_id":"MDQ6VXNlcjc0Njg3","avatar_url":"https://avatars2.githubusercontent.com/u/74687?v=4","gravatar_id":"","url":"https://api.github.com/users/taras","html_url":"https://github.com/taras","followers_url":"https://api.github.com/users/taras/followers","following_url":"https://api.github.com/users/taras/following{/other_user}","gists_url":"https://api.github.com/users/taras/gists{/gist_id}","starred_url":"https://api.github.com/users/taras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taras/subscriptions","organizations_url":"https://api.github.com/users/taras/orgs","repos_url":"https://api.github.com/users/taras/repos","events_url":"https://api.github.com/users/taras/events{/privacy}","received_events_url":"https://api.github.com/users/taras/received_events","type":"User","site_admin":false},"body":"It's been more than 2 years since Charles' last commit to this repository. Since then, most of the work was done in [cowboyd/microstates.js](http://github.com/cowboyd/microstates.js) and now [microstates/microstates.js](http://github.com/microstates/microstates.js) repository. \r\n\r\nA lot has happened in Microstates world since `ember-microstates` was last worked on. This PR aims to bring the Ember integration with Microstates with the latest version of Microstates. There are some significant breaking changes to maintain consistency with the main Microstates library.\r\n\r\nIn spirit, the Ember add-on remains primarily a way to make templates more expressive and eliminate the need for writing actions to perform common state transitions. In `ember-microstates` this is only possible with types that were provided by `ember-microstates` namely String, Boolean, Number, List, Object,  Select and MultiSelect. It was not possible to create custom types because types in `ember-microstates` are not composable. \r\n\r\nThe new version of Microstates allows to compose Microstate types into complex data structures. Microstates will provide the transitions that you can perform on Microstates instances created from the Microstates types. `@microstates/ember` will ensure that the result of these transitions will be reflected in the template. You can learn about types and type composition in [the Microstates README](https://github.com/microstates/microstates.js#types-and-type-composition).\r\n\r\n## New API\r\n\r\n- helpers:\r\n  - `(state value)` - creates a microstate from a value and wraps it in a store\r\n  - `(type name)` - retrieves type of a given name\r\n  - `(value-of microstate)` - gets value from microstate\r\n- computed property macros\r\n  - `state(microstate)`\r\n\r\nWhen using primitive types in templates, the developer can do this.\r\n\r\n```hbs\r\n{{#let (state 42) as |number|}}\r\n  <button {{action number.increment}}>Increment ({{number.state}})</button>\r\n{{/let}}\r\n```\r\n\r\nWhen the developer needs to create a microstate, they can just do\r\n\r\n```hbs\r\n{{#let (state (type \"number\") 10) as |number|}}\r\n  <button {{action number.increment}}>Increment ({{number.state}})</button>\r\n{{/let}}\r\n```\r\n\r\nYou can use custom types by putting JS classes into files in `/types/` directory.\r\n\r\n```js\r\n// file in /app/types/person.js\r\nexport default class Person {\r\n  name = String;\r\n  age = Number;\r\n}\r\n```\r\n\r\n```hbs\r\n{{#let (state (type \"person\") initial) as |taras|}}\r\n  {{taras.name.state}} - {{taras.age.state}}\r\n{{/let}}\r\n```\r\n\r\nIn JavaScript, the developer can do this,\r\n\r\n```js\r\nimport Component from '@ember/component';\r\nimport { computed } from '@ember/object';\r\nimport { valueOf, state, create, from } from '@microstates/ember';\r\n\r\nexport default Component.extend({\r\n  // if the type is not necessary: `state([10, 20, 30])`\r\n  numbers: state([Number], [10, 20, 30]),\r\n\r\n  value: computed('numbers', function() {\r\n    return valueOf(this.get('numbers'));\r\n  }),\r\n  \r\n  layout: hbs`\r\n  {{#each numbers as |number|}}\r\n    <ul>\r\n      <li><button {{action numbers.remove number}}>{{number.state}}</button></li>\r\n    </ul>\r\n  {{/each}}\r\n  `\r\n})\r\n```\r\n\r\n### Built-in Types\r\n\r\n`ember-microstates` re-exports types from `microstates` package. This is necessary because we're exporting modules from the CJS build instead of the ES build that `ember-auto-import` uses by default. The CJS build does not transpile the classes which avoids the need for adding IE11 as a target in development.\r\n\r\n\r\n| Type     | JavaScript | `(type) helper` |\r\n|----------|------------|-----------------|\r\n| Any  | `import {Any} from '@microstates/ember'` | `(type 'any')` |\r\n| Boolean  | `import {BooleanType} from '@microstates/ember'` | `(type 'boolean')` |\r\n| Number  | `import {NumberType} from '@microstates/ember'` | `(type 'number')` |\r\n| String  | `import {StringType} from '@microstates/ember'` | `(type 'string')` |\r\n| Object  | `import {ObjectType} from '@microstates/ember'` | `(type 'object')`  |\r\n| Array  | `import {ArrayType} from '@microstates/ember'` | `(type 'array')` |\r\n\r\n## Serializing Microstates\r\n\r\nYou will likely need to be able to capture the value of the microstate to persist it. You can do this with `(value-of microstate)` and `valueOf(microstate)` function.\r\n\r\n```hbs\r\n{{#let (state 42) as |$|}}\r\n  <button {{action $.increment}}>Increment</button>\r\n  <button {{action (mut value) (value-of $)}}>Save</button>\r\n{{/let}}\r\n```\r\n\r\n```js\r\nimport Component from '@ember/component';\r\nimport { computed } from '@ember/object';\r\nimport { valueOf, state } from '@microstates/ember';\r\n\r\nexport default Component.extend({\r\n  numbers: state([10, 20, 30]),\r\n\r\n  value: computed('numbers', function() {\r\n    return valueOf(this.get('numbers'));\r\n  }),\r\n  \r\n  layout: hbs`\r\n  {{#each numbers as |number|}}\r\n    <ul>\r\n      <li><button {{action numbers.delete number}}>{{number.state}}</button></li>\r\n    </ul>\r\n  {{/each}}\r\n  `\r\n})\r\n```\r\n\r\n## TODO\r\n\r\n- [x] Wait for https://github.com/microstates/microstates.js/pull/276 to be released\r\n- [x] Add integration tests for all helpers\r\n- [x] Move to `@microstates/ember`","created_at":"2018-11-13T21:07:44Z","updated_at":"2018-11-27T12:41:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dcce3d1e4910a3c572be2d2aac4403a54188ef2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/microstates/ember/pulls/72/commits","review_comments_url":"https://api.github.com/repos/microstates/ember/pulls/72/comments","review_comment_url":"https://api.github.com/repos/microstates/ember/pulls/comments{/number}","comments_url":"https://api.github.com/repos/microstates/ember/issues/72/comments","statuses_url":"https://api.github.com/repos/microstates/ember/statuses/05ba1a3a80bc7d7f5fe18fda7f356cf70b28ed9f","head":{"label":"microstates:tm/new-api-upgrade","ref":"tm/new-api-upgrade","sha":"05ba1a3a80bc7d7f5fe18fda7f356cf70b28ed9f","user":{"login":"microstates","id":32446710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNDQ2NzEw","avatar_url":"https://avatars3.githubusercontent.com/u/32446710?v=4","gravatar_id":"","url":"https://api.github.com/users/microstates","html_url":"https://github.com/microstates","followers_url":"https://api.github.com/users/microstates/followers","following_url":"https://api.github.com/users/microstates/following{/other_user}","gists_url":"https://api.github.com/users/microstates/gists{/gist_id}","starred_url":"https://api.github.com/users/microstates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microstates/subscriptions","organizations_url":"https://api.github.com/users/microstates/orgs","repos_url":"https://api.github.com/users/microstates/repos","events_url":"https://api.github.com/users/microstates/events{/privacy}","received_events_url":"https://api.github.com/users/microstates/received_events","type":"Organization","site_admin":false},"repo":{"id":59223635,"node_id":"MDEwOlJlcG9zaXRvcnk1OTIyMzYzNQ==","name":"ember","full_name":"microstates/ember","private":false,"owner":{"login":"microstates","id":32446710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNDQ2NzEw","avatar_url":"https://avatars3.githubusercontent.com/u/32446710?v=4","gravatar_id":"","url":"https://api.github.com/users/microstates","html_url":"https://github.com/microstates","followers_url":"https://api.github.com/users/microstates/followers","following_url":"https://api.github.com/users/microstates/following{/other_user}","gists_url":"https://api.github.com/users/microstates/gists{/gist_id}","starred_url":"https://api.github.com/users/microstates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microstates/subscriptions","organizations_url":"https://api.github.com/users/microstates/orgs","repos_url":"https://api.github.com/users/microstates/repos","events_url":"https://api.github.com/users/microstates/events{/privacy}","received_events_url":"https://api.github.com/users/microstates/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/microstates/ember","description":"Use Microstates in Ember.","fork":false,"url":"https://api.github.com/repos/microstates/ember","forks_url":"https://api.github.com/repos/microstates/ember/forks","keys_url":"https://api.github.com/repos/microstates/ember/keys{/key_id}","collaborators_url":"https://api.github.com/repos/microstates/ember/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/microstates/ember/teams","hooks_url":"https://api.github.com/repos/microstates/ember/hooks","issue_events_url":"https://api.github.com/repos/microstates/ember/issues/events{/number}","events_url":"https://api.github.com/repos/microstates/ember/events","assignees_url":"https://api.github.com/repos/microstates/ember/assignees{/user}","branches_url":"https://api.github.com/repos/microstates/ember/branches{/branch}","tags_url":"https://api.github.com/repos/microstates/ember/tags","blobs_url":"https://api.github.com/repos/microstates/ember/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/microstates/ember/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/microstates/ember/git/refs{/sha}","trees_url":"https://api.github.com/repos/microstates/ember/git/trees{/sha}","statuses_url":"https://api.github.com/repos/microstates/ember/statuses/{sha}","languages_url":"https://api.github.com/repos/microstates/ember/languages","stargazers_url":"https://api.github.com/repos/microstates/ember/stargazers","contributors_url":"https://api.github.com/repos/microstates/ember/contributors","subscribers_url":"https://api.github.com/repos/microstates/ember/subscribers","subscription_url":"https://api.github.com/repos/microstates/ember/subscription","commits_url":"https://api.github.com/repos/microstates/ember/commits{/sha}","git_commits_url":"https://api.github.com/repos/microstates/ember/git/commits{/sha}","comments_url":"https://api.github.com/repos/microstates/ember/comments{/number}","issue_comment_url":"https://api.github.com/repos/microstates/ember/issues/comments{/number}","contents_url":"https://api.github.com/repos/microstates/ember/contents/{+path}","compare_url":"https://api.github.com/repos/microstates/ember/compare/{base}...{head}","merges_url":"https://api.github.com/repos/microstates/ember/merges","archive_url":"https://api.github.com/repos/microstates/ember/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/microstates/ember/downloads","issues_url":"https://api.github.com/repos/microstates/ember/issues{/number}","pulls_url":"https://api.github.com/repos/microstates/ember/pulls{/number}","milestones_url":"https://api.github.com/repos/microstates/ember/milestones{/number}","notifications_url":"https://api.github.com/repos/microstates/ember/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/microstates/ember/labels{/name}","releases_url":"https://api.github.com/repos/microstates/ember/releases{/id}","deployments_url":"https://api.github.com/repos/microstates/ember/deployments","created_at":"2016-05-19T16:26:29Z","updated_at":"2018-11-27T11:56:33Z","pushed_at":"2018-11-27T12:03:17Z","git_url":"git://github.com/microstates/ember.git","ssh_url":"git@github.com:microstates/ember.git","clone_url":"https://github.com/microstates/ember.git","svn_url":"https://github.com/microstates/ember","homepage":"","size":1318,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":12,"watchers":53,"default_branch":"master"}},"base":{"label":"microstates:master","ref":"master","sha":"133bcbf7598d31ac4ec6fd512cc6911c8e8daa95","user":{"login":"microstates","id":32446710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNDQ2NzEw","avatar_url":"https://avatars3.githubusercontent.com/u/32446710?v=4","gravatar_id":"","url":"https://api.github.com/users/microstates","html_url":"https://github.com/microstates","followers_url":"https://api.github.com/users/microstates/followers","following_url":"https://api.github.com/users/microstates/following{/other_user}","gists_url":"https://api.github.com/users/microstates/gists{/gist_id}","starred_url":"https://api.github.com/users/microstates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microstates/subscriptions","organizations_url":"https://api.github.com/users/microstates/orgs","repos_url":"https://api.github.com/users/microstates/repos","events_url":"https://api.github.com/users/microstates/events{/privacy}","received_events_url":"https://api.github.com/users/microstates/received_events","type":"Organization","site_admin":false},"repo":{"id":59223635,"node_id":"MDEwOlJlcG9zaXRvcnk1OTIyMzYzNQ==","name":"ember","full_name":"microstates/ember","private":false,"owner":{"login":"microstates","id":32446710,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyNDQ2NzEw","avatar_url":"https://avatars3.githubusercontent.com/u/32446710?v=4","gravatar_id":"","url":"https://api.github.com/users/microstates","html_url":"https://github.com/microstates","followers_url":"https://api.github.com/users/microstates/followers","following_url":"https://api.github.com/users/microstates/following{/other_user}","gists_url":"https://api.github.com/users/microstates/gists{/gist_id}","starred_url":"https://api.github.com/users/microstates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microstates/subscriptions","organizations_url":"https://api.github.com/users/microstates/orgs","repos_url":"https://api.github.com/users/microstates/repos","events_url":"https://api.github.com/users/microstates/events{/privacy}","received_events_url":"https://api.github.com/users/microstates/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/microstates/ember","description":"Use Microstates in Ember.","fork":false,"url":"https://api.github.com/repos/microstates/ember","forks_url":"https://api.github.com/repos/microstates/ember/forks","keys_url":"https://api.github.com/repos/microstates/ember/keys{/key_id}","collaborators_url":"https://api.github.com/repos/microstates/ember/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/microstates/ember/teams","hooks_url":"https://api.github.com/repos/microstates/ember/hooks","issue_events_url":"https://api.github.com/repos/microstates/ember/issues/events{/number}","events_url":"https://api.github.com/repos/microstates/ember/events","assignees_url":"https://api.github.com/repos/microstates/ember/assignees{/user}","branches_url":"https://api.github.com/repos/microstates/ember/branches{/branch}","tags_url":"https://api.github.com/repos/microstates/ember/tags","blobs_url":"https://api.github.com/repos/microstates/ember/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/microstates/ember/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/microstates/ember/git/refs{/sha}","trees_url":"https://api.github.com/repos/microstates/ember/git/trees{/sha}","statuses_url":"https://api.github.com/repos/microstates/ember/statuses/{sha}","languages_url":"https://api.github.com/repos/microstates/ember/languages","stargazers_url":"https://api.github.com/repos/microstates/ember/stargazers","contributors_url":"https://api.github.com/repos/microstates/ember/contributors","subscribers_url":"https://api.github.com/repos/microstates/ember/subscribers","subscription_url":"https://api.github.com/repos/microstates/ember/subscription","commits_url":"https://api.github.com/repos/microstates/ember/commits{/sha}","git_commits_url":"https://api.github.com/repos/microstates/ember/git/commits{/sha}","comments_url":"https://api.github.com/repos/microstates/ember/comments{/number}","issue_comment_url":"https://api.github.com/repos/microstates/ember/issues/comments{/number}","contents_url":"https://api.github.com/repos/microstates/ember/contents/{+path}","compare_url":"https://api.github.com/repos/microstates/ember/compare/{base}...{head}","merges_url":"https://api.github.com/repos/microstates/ember/merges","archive_url":"https://api.github.com/repos/microstates/ember/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/microstates/ember/downloads","issues_url":"https://api.github.com/repos/microstates/ember/issues{/number}","pulls_url":"https://api.github.com/repos/microstates/ember/pulls{/number}","milestones_url":"https://api.github.com/repos/microstates/ember/milestones{/number}","notifications_url":"https://api.github.com/repos/microstates/ember/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/microstates/ember/labels{/name}","releases_url":"https://api.github.com/repos/microstates/ember/releases{/id}","deployments_url":"https://api.github.com/repos/microstates/ember/deployments","created_at":"2016-05-19T16:26:29Z","updated_at":"2018-11-27T11:56:33Z","pushed_at":"2018-11-27T12:03:17Z","git_url":"git://github.com/microstates/ember.git","ssh_url":"git@github.com:microstates/ember.git","clone_url":"https://github.com/microstates/ember.git","svn_url":"https://github.com/microstates/ember","homepage":"","size":1318,"stargazers_count":53,"watchers_count":53,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":12,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/microstates/ember/pulls/72"},"html":{"href":"https://github.com/microstates/ember/pull/72"},"issue":{"href":"https://api.github.com/repos/microstates/ember/issues/72"},"comments":{"href":"https://api.github.com/repos/microstates/ember/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/microstates/ember/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/microstates/ember/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/microstates/ember/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/microstates/ember/statuses/05ba1a3a80bc7d7f5fe18fda7f356cf70b28ed9f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sivakumar-kailasam"}}