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

fix for node 16.12 and higher #4

Closed bengl closed 2 years ago

bengl commented 2 years ago

Node 16.12.0 and higher replaces the getSource and getFormat hooks with a load hook. This has now been added, calling into the getSource hook in order to not duplicate its complexity.

There's no need for a separate test, but eventually some mechanism of testing all supported Node.js versions and collecting the coverage data will be required, since not all lines are now covered on every Node.js version.