Skip to content

fix(deps): update dependency @whatwg-node/server to ^0.10.0 #214

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

Merged
merged 3 commits into from
May 28, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 27, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@whatwg-node/server (source) ^0.9.60 -> ^0.10.0 age adoption passing confidence

Release Notes

ardatan/whatwg-node (@​whatwg-node/server)

v0.10.10

Compare Source

Patch Changes

v0.10.9

Compare Source

Patch Changes
  • #​2424
    28c4ad9
    Thanks @​ardatan! - Performance optimizations

    • Avoid creating AbortController and AbortSignal if not needed with new Request because it
      is expensive
    • Avoid creating a map for Headers and try to re-use the init object for Headers for
      performance with a single-line writeHead.
    • Avoid creating Buffer for string bodies for performance
    • Use setHeaders which accepts Headers since Node 18 if needed to forward Headers to Node
  • 1642a76
    Thanks @​ardatan! - Remove unnecessary workaround for Bun

  • Updated dependencies
    [28c4ad9]:

v0.10.8

Compare Source

Patch Changes
  • 8eb332c
    Thanks @​ardatan! - Workaround for the bug in Node 24 and Deno don't
    like bound disposal functions

v0.10.7

Compare Source

Patch Changes

v0.10.6

Compare Source

Patch Changes
  • #​2383
    9527e8f
    Thanks @​ardatan! - Some implementations like compression npm
    package do not implement response.write(data, callback) signature, but whatwg-node/server waits
    for it to finish the response stream. Then it causes the response stream hangs when the
    compression package takes the stream over when the response data is larger than its threshold.

    It is actually a bug in compression package;
    expressjs/compression#46 But since it is a
    common mistake, we prefer to workaround this on our end.

    Now after calling response.write, it no longer uses callback but first it checks the result;

    if it is true, it means stream is drained and we can call response.end immediately. else if it
    is false, it means the stream is not drained yet, so we can wait for the drain event to call
    response.end.

  • Updated dependencies
    [d86b4f3,
    9527e8f]:

v0.10.5

Compare Source

Patch Changes

v0.10.4

Compare Source

Patch Changes

v0.10.3

Compare Source

Patch Changes
  • #​2208
    ff052a3
    Thanks @​ardatan! - When any Request method is called outside
    server adapter scope, it used to hang. This PR prevents it to hang and throw an error if the
    readable stream is destroyed earlier.

    let request: Request
    const adapter = createServerAdapter(req => {
      request = req
      return new Response('Hello World')
    })
    
    await request.text() // Was hanging but now throws an error

v0.10.2

Compare Source

Patch Changes

v0.10.1

Compare Source

Patch Changes

v0.10.0

Compare Source

Minor Changes
  • #​2068
    516bf60
    Thanks @​EmrysMyrddin! - Add new Instrumentation API

    Introduction of a new API allowing to instrument the graphql pipeline.

    This new API differs from already existing Hooks by not having access to input/output of phases.
    The goal of Instrumentation is to run allow running code before, after or around the whole
    process of a phase
    , including plugins hooks executions.

    The main use case of this new API is observability (monitoring, tracing, etc...).

Basic usage
import Sentry from '@​sentry/node'
import { createServerAdapter } from '@​whatwg-node/server'

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  {
    plugins: [
      {
        instrumentation: {
          request: ({ request }, wrapped) =>
            Sentry.startSpan({ name: 'Graphql Operation' }, async () => {
              try {
                await wrapped()
              } catch (err) {
                Sentry.captureException(err)
              }
            })
        }
      }
    ]
  }
)
Multiple instrumentation plugins

It is possible to have multiple instrumentation plugins (Prometheus and Sentry for example), they
will be automatically composed by envelop in the same order than the plugin array (first is
outermost, last is inner most).

import { createServerAdapter } from '@​whatwg-node/server'

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  { plugins: [useSentry(), useOpentelemetry()] }
)
sequenceDiagram
  Sentry->>Opentelemetry: ;
  Opentelemetry->>Server Adapter: ;
  Server Adapter->>Opentelemetry: ;
  Opentelemetry->>Sentry: ;
Loading
Custom instrumentation ordering

If the default composition ordering doesn't suite your need, you can manually compose
instrumentation. This allows to have a different execution order of hooks and instrumentation.

import { composeInstrumentation, createServerAdapter } from '@​whatwg-node/server'

const { instrumentation: sentryInstrumentation, ...sentryPlugin } = useSentry()
const { instrumentation: otelInstrumentation, ...otelPlugin } = useOpentelemetry()
const instrumentation = composeInstrumentation([otelInstrumentation, sentryInstrumentation])

const server = createServerAdapter(
  (req, res) => {
    //...
  },
  { plugins: [{ instrumentation }, sentryPlugin, otelPlugin] }
)
sequenceDiagram
  Opentelemetry->>Sentry: ;
  Sentry->>Server Adapter: ;
  Server Adapter->>Sentry: ;
  Sentry->>Opentelemetry: ;
Loading
Patch Changes

Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner May 27, 2025 09:19
@renovate renovate bot requested a review from a team as a code owner May 27, 2025 09:19
@renovate renovate bot added the javascript label May 27, 2025
@renovate renovate bot force-pushed the renovate/whatwg-node-server-0.x branch from a119cf9 to d0af0c2 Compare May 27, 2025 21:09
@renovate renovate bot force-pushed the renovate/whatwg-node-server-0.x branch from d0af0c2 to 7fc5705 Compare May 28, 2025 00:42
@serhalp serhalp enabled auto-merge (squash) May 28, 2025 15:15
Copy link
Contributor Author

renovate bot commented May 28, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@serhalp serhalp merged commit b3ea166 into main May 28, 2025
9 checks passed
@serhalp serhalp deleted the renovate/whatwg-node-server-0.x branch May 28, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant