Skip to content

Deprecation: replace util._extend usage with Object.assign (DEP0060) #1715

@albert-raphael

Description

@albert-raphael

Node.js now deprecates util._extend (DEP0060). I observed this deprecation when running a dev server that depends on http-proxy (via webpack-dev-server/http-proxy-middleware). The minimal fix is to replace occurrences of util._extend(...) with Object.assign(...).

Steps to reproduce:

  1. Create a small project that uses http-proxy (or http-proxy-middleware with webpack-dev-server).
  2. Start the dev server with Node 24+ or use --trace-deprecation and observe DEP0060 pointing to http-proxy's use of util._extend.

Suggested patch: replace util._extend( with Object.assign( in lib/http-proxy/index.js. This is backwards-compatible in all supported Node.js versions.

I can open a small PR with a one-line replacement plus a test if you want — let me know if you'd prefer a PR or if there are other constraints to follow for this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions