nodejs / import-in-the-middle

Like `require-in-the-middle`, but for ESM import
https://www.npmjs.com/package/import-in-the-middle
Apache License 2.0
60 stars 22 forks source link

Incompatible with node 20.6+ #33

Closed lizthegrey closed 8 months ago

lizthegrey commented 11 months ago

See https://nodejs.org/en/blog/release/v20.6.0#new-nodemodule-api-register-for-module-customization-hooks-new-initialize-hook which appears to have changed --experimental-loader chaining such that it no longer works correctly.

Qard commented 11 months ago

What's the behaviour you're seeing? We've tested on 20.6 and it worked for our tests. Are you encountering something different from #32?

lizthegrey commented 11 months ago

One data point is that we also chain .pnp.js from Yarn 4 to be able to then use IITM; I'll check first to see if the problem is there and get back to you.

lizthegrey commented 9 months ago

The problem seems to be https://github.com/nodejs/node/issues/50435 -- kudos to the person who found the minimal repro for this.

lizthegrey commented 8 months ago

This appears to be a problem strictly with Yarn PNP and not with Datadog IITM. And will be fixed in 20.11.0 anyways.

lizthegrey commented 7 months ago

Confirmed fixed in 20.11.0