-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: Add Hook
named export
#88
Conversation
should we also update the README to make the named export the recommended usage? |
@timfish should there best test additions too? I.e. if something's exported, it should be tested that that interface works? |
I modified both an ESM and CJS test to use this new export! |
Oops! I should have noticed that. 😅 And I see that other test files retain the usage of the default export. SGTM/LGTM. |
$ git log --oneline --no-decorate v1.7.4..HEAD 9269d1f 1.8.0 74124e9 fix: handling of default and star exports (#85) 7fa4e9c Fix resolution of lib/register.js when using multiple loaders (#76) e7f05ca add node 22 to test matrix (#84) fb0e393 feat: Add `Hook` named export (#88) bef32f2 chore: don't create a package-lock file (#67) bf3a4fb fix: Resolve re-exports of external modules (#78) 0d9f351 fix: Handle cyclical reference to current file (#83) 1e05e4b test: skip static-import on > v21 (#81)
In #88 I added a named `Hook` export but forgot to update the TypeScript types!
import-in-the-middle
has some ESM interop issues.From here:
This causes issues with some bundlers. Obviously bundled imports will not go through
import-in-the-middle
but using it should not inhibit bundlers as iitm can still hook build-in modules.This PR adds a
Hook
named export and changes one cjs and esm test to use that new export.