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

Use "node:" prefixed imports everywhere. #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boenrobot
Copy link

@boenrobot boenrobot commented Jul 26, 2024

Update minimum nodejs version to the ones where this feature was introduced, and update CI accordingly.

Also bumped the mocha version to the latest one, as that one is still compatible with the now bumped nodejs version.


Using "node:" prefixed imports enable the use of this library in runtimes other than nodejs that provide node compatibility layer by checking the "node:" prefix in package names (notably, workerd). The cost for that is the bump of the minimum nodejs version to ">=14.18.0 <15 || >=16".

The other alternative for "using in other runtimes" would be to remove the one use of util.inspect(), but since even these new versions are EOL, and compatibility layer for inspect() is present, I imagine bumping the minimum node version is the better option.

Or, there's also the option of trying to require node:util and fallback to "util", with "util" being used through an optional peer dependency to util.

Update minimum nodejs version to the ones where this feature was introduced, and update CI accordingly.

Also bumped the mocha version to the latest one, as that one is still compatible with the now bumped nodejs version.
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

Successfully merging this pull request may close these issues.

1 participant