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

util._extend will be removed in node v23 #607

Open
mcollina opened this issue Jun 12, 2024 · 11 comments
Open

util._extend will be removed in node v23 #607

mcollina opened this issue Jun 12, 2024 · 11 comments

Comments

@mcollina
Copy link
Contributor

Currently the tests for tape fails on Node v23:

 > [email protected] prepublish
 > not-in-publish || npm run prepublishOnly
 added 852 packages in 41s
 > [email protected] tests-only
 > cross-env NODE_OPTIONS='--no-warnings' nyc tap 'test/*.js'
 /home/iojs/tmp/citgm_tmp/5e2892bd-922c-45d1-87d3-ad3da4f8442d/tape/node_modules/nyc/node_modules/debug/src/node.js:234
   debug.inspectOpts = util._extend({}, exports.inspectOpts);
                            ^
 TypeError: util._extend is not a function
     at Function.init (/home/iojs/tmp/citgm_tmp/5e2892bd-922c-45d1-87d3-ad3da4f8442d/tape/node_modules/nyc/node_modules/debug/src/node.js:234:28)
     at createDebug (/home/iojs/tmp/citgm_tmp/5e2892bd-922c-45d1-87d3-ad3da4f8442d/tape/node_modules/nyc/node_modules/debug/src/debug.js:124:13)
     at Object.<anonymous> (/home/iojs/tmp/citgm_tmp/5e2892bd-922c-45d1-87d3-ad3da4f8442d/tape/node_modules/nyc/node_modules/istanbul-lib-source-maps/lib/map-store.js:7:29)
     at Module._compile (node:internal/modules/cjs/loader:1460:14)
     at Module._extensions..js (node:internal/modules/cjs/loader:1544:10)
     at Module.load (node:internal/modules/cjs/loader:1275:32)
     at Module._load (node:internal/modules/cjs/loader:1091:12)
     at wrapModuleLoad (node:internal/modules/cjs/loader:212:19)
     at Module.require (node:internal/modules/cjs/loader:1297:12)
     at require (node:internal/modules/helpers:123:16)
 Node.js v23.0.0-pre

I think this is using an old version of debug

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

As are 95 million other people every week, nearly as many as are using the latest, v4: https://majors.nullvoxpopuli.com/q?minors=&old=&packages=debug

node may want to reconsider this deprecation given the usage.

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

Additionally, motivated by recent CITGM failures, tape's tests should no longer be failing due to these debug messages: 8d40837

@mcollina
Copy link
Contributor Author

@ljharb that's not released yet.

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

ah, i thought CITGM was configured to run on tape's HEAD instead of the latest version.

Unfortunately I can't upgrade beyond debug v2 due to engines constraints. If this API is indeed something node is determined to remove, it'd be ideal to ship a backport in debug that refactors to avoid using it.

@mcollina
Copy link
Contributor Author

mcollina commented Jun 12, 2024

Largely it does not seem feasible, because the v2 line of debug is already patched. This is due to some dependencies using locked versions.

We'll revert in Node

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

Makes sense. Which dependencies are using locked versions? I could certainly see about updating those, so node isn't held back.

@mcollina
Copy link
Contributor Author

nyc depends on debug@2, which does not have the patch.

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

aha, gotcha. there remains one ecosystem-active maintainer of debug; i can try to pursue a backport?

@mcollina
Copy link
Contributor Author

I think it would be best. nyc will keep the noisy warning anyway for another semver-major cycle of Node.js.

@ljharb
Copy link
Collaborator

ljharb commented Jun 12, 2024

The warning can't be removed as a non-major?

@mcollina
Copy link
Contributor Author

Currently using util._extend() emits a warning. In v23, this will have the same behavior of v22.

We will remove it at some point.

nodejs-github-bot pushed a commit to nodejs/node that referenced this issue Jun 14, 2024
This reverts commit ac97a53.

PR-URL: #53429
Refs: tape-testing/tape#607
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: James M Snell <[email protected]>
eliphazz pushed a commit to eliphazz/node that referenced this issue Jun 20, 2024
This reverts commit ac97a53.

PR-URL: nodejs#53429
Refs: tape-testing/tape#607
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: James M Snell <[email protected]>
bmeck pushed a commit to bmeck/node that referenced this issue Jun 22, 2024
This reverts commit ac97a53.

PR-URL: nodejs#53429
Refs: tape-testing/tape#607
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: James M Snell <[email protected]>
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

No branches or pull requests

2 participants