Skip to content

Use of deprecated util._extend API #23

@bxt

Description

@bxt

After starting my project with node version v22.14.0 (current LTS), I got a deprecation warning which I could trace back to the frame-stream package using the --trace-deprecation flag:

(node:58294) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
    at new exports.Decoder (.../node_modules/frame-stream/lib/index.js:12:20)
    at module.exports (.../node_modules/frame-stream/lib/index.js:7:10)
...

I can see the API is used in the code here in the constructor of Decoder:

this.opts = util._extend({

The docs from Node.js about this deprecation seem to be here: https://nodejs.org/api/deprecations.html#DEP0060

It seems this was deprecated for a long time, and just version 22 of Node starts printing this warning.

It's just a warning for now, but it would be cool if this would not show up in the logs.

It seems to me it would be easy to replace it with Object.assign() which has been there since node 4.0.0 and this project lists >=18 in the node engines field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions