Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 fix a regression introduced by changes in the build #496

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

ghusse
Copy link
Contributor

@ghusse ghusse commented Sep 1, 2020

Arrow functions were no longer transformed to normal function after specifying the build target. As exported function are used with the new keyword in some context (even if they should not), this caused a crash when launching an agent.

Linked to CU-7rv8fc

There is a mismatch between what is exported by forest-express-sequelize and what is expected by forest-express:

  • forest-express-sequelize exports a plain function
  • forest-express uses it as a constructor

Which one is right in this case?

Pull Request checklist:

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Create automatic tests
  • Test manually the implemented changes
  • Review my own code (indentation, syntax, style, simplicity, readability)
  • Wonder if you can improve the existing code

Arrow functions were no longer transformed to normal function after specifying the build target. As exported function are used with the new keyword in some context (even if they should not), this caused a crash when launching an agent.

Linked to CU-7rv8fc
@arnaudbesnier
Copy link
Member

Copy link
Member

@VincentMolinie VincentMolinie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clearly not the right fix. There should be no new in this case, removing the new is the fix 😉

@ghusse ghusse merged commit 89d94fe into master Sep 1, 2020
@ghusse ghusse deleted the fix/build-to-transform-arrow-functions branch September 1, 2020 12:15
forest-bot added a commit that referenced this pull request Sep 1, 2020
## [6.3.8](v6.3.7...v6.3.8) (2020-09-01)

### Bug Fixes

* 🐛 fix a regression introduced by changes in the build ([#496](#496)) ([89d94fe](89d94fe))
@forest-bot
Copy link
Member

🎉 This PR is included in version 6.3.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants