{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/8130","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/8130/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/8130/comments","events_url":"https://api.github.com/repos/babel/babel/issues/8130/events","html_url":"https://github.com/babel/babel/pull/8130","id":330576294,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNTUwNTA1","number":8130,"title":"Merge class features plugins","user":{"login":"nicolo-ribaudo","id":7000710,"node_id":"MDQ6VXNlcjcwMDA3MTA=","avatar_url":"https://avatars3.githubusercontent.com/u/7000710?v=4","gravatar_id":"","url":"https://api.github.com/users/nicolo-ribaudo","html_url":"https://github.com/nicolo-ribaudo","followers_url":"https://api.github.com/users/nicolo-ribaudo/followers","following_url":"https://api.github.com/users/nicolo-ribaudo/following{/other_user}","gists_url":"https://api.github.com/users/nicolo-ribaudo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolo-ribaudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolo-ribaudo/subscriptions","organizations_url":"https://api.github.com/users/nicolo-ribaudo/orgs","repos_url":"https://api.github.com/users/nicolo-ribaudo/repos","events_url":"https://api.github.com/users/nicolo-ribaudo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolo-ribaudo/received_events","type":"User","site_admin":false},"labels":[{"id":311566482,"node_id":"MDU6TGFiZWwzMTE1NjY0ODI=","url":"https://api.github.com/repos/babel/babel/labels/PR:%20New%20Feature%20:rocket:","name":"PR: New Feature :rocket:","color":"fbca04","default":false},{"id":711596574,"node_id":"MDU6TGFiZWw3MTE1OTY1NzQ=","url":"https://api.github.com/repos/babel/babel/labels/Spec:%20Class%20Fields","name":"Spec: Class Fields","color":"1d76db","default":false},{"id":711596992,"node_id":"MDU6TGFiZWw3MTE1OTY5OTI=","url":"https://api.github.com/repos/babel/babel/labels/Spec:%20Decorators","name":"Spec: Decorators","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-06-08T09:01:26Z","updated_at":"2018-10-25T07:52:34Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/babel/babel/pulls/8130","html_url":"https://github.com/babel/babel/pull/8130","diff_url":"https://github.com/babel/babel/pull/8130.diff","patch_url":"https://github.com/babel/babel/pull/8130.patch"},"body":"<!--\r\nBefore making a PR please make sure to read our contributing guidelines\r\nhttps://github.com/babel/babel/blob/master/CONTRIBUTING.md\r\n\r\nFor issue references: Add a comma-separated list of a [closing word](https://help.github.com/articles/closing-issues-via-commit-messages/) followed by the ticket number fixed by the PR. It should be underlined in the preview if done correctly.\r\n-->\r\n\r\n| Q                        | A <!--(Can use an emoji 👍) -->\r\n| ------------------------ | ---\r\n| Fixed Issues?            | \r\n| Patch: Bug Fix?          |\r\n| Major: Breaking Change?  |\r\n| Minor: New Feature?      |\r\n| Tests Added + Pass?      | Yes\r\n| Documentation PR         | <!-- If so, add `[skip ci]` to your commit message to skip CI -->\r\n| Any Dependency Changes?  |\r\n| License                  | MIT\r\n\r\n<!-- Describe your changes below in as much detail as possible -->\r\n\r\ncc @loganfsmyth @jridgewell I tried to move plugin-proposal-class-properties to the new \"big\" plugin. All the original tests are still passing :tada: \r\n\r\nI split the class properties transformation logic in different functions, so that it can be reused. For example, to transform decorators we will need to reuse `buildPrivateNamesMap`, `buildPrivateNamesNodes`, `transformPrivateNamesUsage` and `injectInitialization`.\r\n\r\n---\r\n\r\n**Questions:** (next meeting?)\r\n- [x] Should we also merge `@babel/plugin-transform-classes`?\r\n  - **Pro**: It makes it a lot easier to reuse the class IIFE. It can be accomplished anyway, but in an uglier way ([#6993](https://github.com/babel/babel/pull/6963/files#diff-94bf3502cb4eafb89afa7ae0ae328994)).\r\n  - **Con**: What will we do if/when we will implement the [classes-1.1 proposal](https://github.com/zenparsing/js-classes-1.1)? It doesn't fit with this `@babel/plugin-proposal-enhanced-classes` plugin because every feature is not compatible, so we would probably need to create another plugin which depends on this one with only class transpilation enabled.\r\n  - NOTE: This can be done later.\r\n- [x] What will we do when a proposal implemented by this plugin becomes part of preset-env?\r\n  - Should we just remove `-proposal-` from this plugin's name now? e.g. `@babel/plugin-enhanced-classes` or `@babel/plugin-transform-enhanced-classes`.\r\n- [x] Should it be possible to enable `loose` for the different features separately?\r\n  - This would probably make sense only if we merge the class transform plugin.\r\n  - NOTE: This can be added later if we don't merge the classes transform. Otherwise, it will be a breaking chance because both `transform-classes` and `proposal-class-properties` can be loose separately (this can be probably worked-around though).\r\n- [x] How much specific the options should be?\r\n  - One option per proposal? (`instanceFields`, `staticFieldsAndMethods`, `instancePrivateMethods`?\r\n  - Make a \"grid\"? (`instance`, `static` - `public`, `private` - `fields`, `methods`, `accessors`)\r\n  - Very specific? (`publicInstanceFields`, `privateStaticMethods`, ...)\r\n  - NOTE: Options can be added/divided/merged later.\r\n- [x] Name bikeshedding: `@babel/plugin-proposal-enhanced-classes`? `@babel/plugin-proposal-class-features`?\r\n\r\n---\r\n\r\n**NOTE**: This PR only \"merges\" the class properties plugin, but it creates the whole infrastructure."},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/432950603","html_url":"https://github.com/babel/babel/pull/8130#issuecomment-432950603","issue_url":"https://api.github.com/repos/babel/babel/issues/8130","id":432950603,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjk1MDYwMw==","user":{"login":"pabloalmunia","id":1365303,"node_id":"MDQ6VXNlcjEzNjUzMDM=","avatar_url":"https://avatars3.githubusercontent.com/u/1365303?v=4","gravatar_id":"","url":"https://api.github.com/users/pabloalmunia","html_url":"https://github.com/pabloalmunia","followers_url":"https://api.github.com/users/pabloalmunia/followers","following_url":"https://api.github.com/users/pabloalmunia/following{/other_user}","gists_url":"https://api.github.com/users/pabloalmunia/gists{/gist_id}","starred_url":"https://api.github.com/users/pabloalmunia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pabloalmunia/subscriptions","organizations_url":"https://api.github.com/users/pabloalmunia/orgs","repos_url":"https://api.github.com/users/pabloalmunia/repos","events_url":"https://api.github.com/users/pabloalmunia/events{/privacy}","received_events_url":"https://api.github.com/users/pabloalmunia/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T07:52:34Z","updated_at":"2018-10-25T07:52:34Z","author_association":"NONE","body":"> This PR can probably make it easier to fix #8750\r\n\r\nThe workaround don't work in my cases. \r\n\r\nAny progress about the support of HTMLElements decoration in this PR?\r\n\r\n"}}
{"actor":{"display_login":"pabloalmunia"}}