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

feat(node-utils): uses host header and mocks waitUntil() #244

Merged
merged 4 commits into from
Jan 25, 2023

Conversation

feugy
Copy link
Member

@feugy feugy commented Jan 25, 2023

📖 What's in there?

Current node-utils have a fixed origin for mapped web requests. A better solution is to leverage the incomingMessage's host header, and only default to a fixed value in case the header is missing.

This PR also brings a mocked fetchEvent (web handler second parameter). It will throw when using waitUntil(), so our users would know this feature is not implemented yet.

  • feat(node-utils): uses incoming host header to determine request's origin
  • feat(node-utils): provides mocked fetch event which throws on waitUntil
  • fix(ci): reverts jest version bump from dependabot which broke main

📓 Notes to reviewers

It is likely that no one is using this package. Yet, these are 2 breaking changes, since the required options and dependencies have changed.

Please hide whitespace changes when reviewing, to find the actual changes.

@feugy feugy added the enhancement New feature or request label Jan 25, 2023
@feugy feugy requested a review from a team January 25, 2023 14:22
@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2023

🦋 Changeset detected

Latest commit: 1d3806d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@edge-runtime/node-utils Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
edge-runtime ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 25, 2023 at 3:30PM (UTC)

@Kikobeats Kikobeats merged commit 7110a53 into main Jan 25, 2023
@Kikobeats Kikobeats deleted the damien/ec-475-add-support-for-web-signature-in branch January 25, 2023 15:46
@github-actions github-actions bot mentioned this pull request Jan 25, 2023
jridgewell pushed a commit to jridgewell/edge-runtime that referenced this pull request Jun 23, 2023
* feat(node-utils): uses incoming host header to determine request's origin

* feat(node-utils): provides mocked fetch event which throws on waitUntil accesses

* fix(ci): reverts failing version bump for jest

* chore(ci): fixes poisoned turbo cache?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants