nodejs / admin

Administrative space for policies of the TSC
157 stars 135 forks source link

Deprecate `test` npm package #928

Open RedYetiDev opened 3 days ago

RedYetiDev commented 3 days ago

The test npm package serves as a backport of the node:test module for Node.js versions prior to v18. However, all these older versions are now end-of-life (EoL). This means the package offers no real advantage for users running supported (non-EoL) versions of Node.js, which they ideally should be using.

Given that the package is outdated and no longer necessary, wouldn't it make sense to deprecate it?

CC @nodejs/test_runner

cjihrig commented 3 days ago

Alternative take: it would be great to bring that module up to date. The delta between node:test on v18 vs. v23 is substantial.

RedYetiDev commented 3 days ago

Alternative take: it would be great to bring that module up to date. The delta between node:test on v18 vs. v23 is substantial.

That could be done, I just feel that there should be a point where this module reaches the end of its lifespan. IMHO it shouldn't be a polyfill/shim forever.

Maybe it's okay now that the test runner was added recently, but in a few years, maybe this module should eventually be deprecated.

RedYetiDev commented 8 hours ago

I've looked into upgrading the package, and I'm afraid it's not that simple. The test runner now makes use of internalBinding (which can fairly easily be polyfilled to produce the same result), and internal/modules/esm/loader, which is less straightforward to polyfill.

cjihrig commented 8 hours ago

internal/modules/esm/loader, which is less straightforward to polyfill.

In userland code, it might be enough to use dynamic import.