{"action":"opened","issue":{"url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-sequelize/issues/237","repository_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-sequelize","labels_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-sequelize/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-sequelize/issues/237/comments","events_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-sequelize/issues/237/events","html_url":"https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/237","id":360489344,"node_id":"MDU6SXNzdWUzNjA0ODkzNDQ=","number":237,"title":"Extending service class fails when transpiling to ES5","user":{"login":"RickEyre","id":1071332,"node_id":"MDQ6VXNlcjEwNzEzMzI=","avatar_url":"https://avatars3.githubusercontent.com/u/1071332?v=4","gravatar_id":"","url":"https://api.github.com/users/RickEyre","html_url":"https://github.com/RickEyre","followers_url":"https://api.github.com/users/RickEyre/followers","following_url":"https://api.github.com/users/RickEyre/following{/other_user}","gists_url":"https://api.github.com/users/RickEyre/gists{/gist_id}","starred_url":"https://api.github.com/users/RickEyre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RickEyre/subscriptions","organizations_url":"https://api.github.com/users/RickEyre/orgs","repos_url":"https://api.github.com/users/RickEyre/repos","events_url":"https://api.github.com/users/RickEyre/events{/privacy}","received_events_url":"https://api.github.com/users/RickEyre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-15T00:17:48Z","updated_at":"2018-09-15T00:17:48Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\nI'm attempting to extend the Service class in the library like so:\r\n\r\n```js\r\nimport { Service } from 'feathers-sequelize';\r\n\r\nexport class SequelizeService extends Service {\r\n  constructor(Model, options = {}) {\r\n    super({ Model, ...options });\r\n  }\r\n}\r\n\r\nconst service = new Service(MyModel);\r\n```\r\nI'm also transpiling my code to ES5 using babel. \r\n\r\n### Expected behavior\r\nThe service should be created.\r\n\r\n### Actual behavior\r\nBreaks at runtime with the following error:\r\n\r\n```bash\r\nTypeError: Class constructor Service cannot be invoked without 'new'\r\n```\r\nI believe this is because my transpiled code isn't trying to call the ES6 as a function without the `new` keyword.\r\n\r\nIf there was an ES5 version of the package published I'd be able to extend.\r\n\r\nOr is there a better way on my end to solve this?"}}
{"actor":{"display_login":"RickEyre"}}