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

refactor!: reduce node.js dependency #178

Merged
merged 10 commits into from Oct 14, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Sep 13, 2022

In order to get closer to #73 this change removes support from legacy handler.

Breaking changes for event handlers:

  • All handlers should be defined with eventHandler() wrapper otherwise a warning will be shown suggesting to change.
  • Node.js handlers with (req, res) = {} are not automatically converted to event handler format. They can now be defined with fromNodeMiddleware((req, res) => {})
  • Compatibility api to support mixed req.event / res.event is dropped

Breaking changes for app:

  • app instance is not a Node.js listener (req, res) anymore. It should be converted into using toNodeListener(app) that gives a (req, res) interface from app.

@pi0 pi0 changed the title refactor!: remove compatibility handler support refactor!: reduce node.js handler support Sep 16, 2022
@pi0 pi0 force-pushed the feat/deprecate-without-wrapper branch from 0a9f475 to d9f99d2 Compare October 13, 2022 18:18
@pi0 pi0 marked this pull request as ready for review October 13, 2022 19:33
@pi0 pi0 changed the title refactor!: reduce node.js handler support refactor!: reduce node.js dependency Oct 13, 2022
@codecov
Copy link

codecov bot commented Oct 13, 2022

Codecov Report

Merging #178 (7013a0e) into main (e542b07) will decrease coverage by 0.51%.
The diff coverage is 90.25%.

@@            Coverage Diff             @@
##             main     #178      +/-   ##
==========================================
- Coverage   79.72%   79.21%   -0.52%     
==========================================
  Files          18       19       +1     
  Lines        1110     1039      -71     
  Branches      205      208       +3     
==========================================
- Hits          885      823      -62     
+ Misses        225      216       -9     
Impacted Files Coverage Δ
src/event/utils.ts 65.62% <40.00%> (-7.62%) ⬇️
src/node.ts 85.18% <85.18%> (ø)
src/app.ts 93.61% <96.29%> (+0.28%) ⬆️
src/error.ts 88.42% <100.00%> (ø)
src/event/event.ts 38.23% <100.00%> (-15.62%) ⬇️
src/event/response.ts 34.54% <100.00%> (ø)
src/index.ts 100.00% <100.00%> (ø)
src/router.ts 100.00% <100.00%> (ø)
src/types.ts 100.00% <100.00%> (ø)
src/utils/body.ts 82.89% <100.00%> (+1.56%) ⬆️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0 pi0 marked this pull request as draft October 14, 2022 08:41
@pi0 pi0 marked this pull request as ready for review October 14, 2022 09:58
@pi0 pi0 merged commit ba2fe08 into main Oct 14, 2022
@pi0 pi0 deleted the feat/deprecate-without-wrapper branch October 14, 2022 09:58
@pi0 pi0 mentioned this pull request Oct 14, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant