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

feat: Convert to ESM #297

Merged
merged 3 commits into from
Jan 7, 2022
Merged

feat: Convert to ESM #297

merged 3 commits into from
Jan 7, 2022

Conversation

trygve-lie
Copy link
Contributor

This converts this module to being all ESM (only).

Copy link
Member

@digitalsadhu digitalsadhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I scanned the whole PR for anything obvious but given the size, I didn't look super closely at every line. Also, use the node:fs style import syntax was new for me!

LGTM

@trygve-lie
Copy link
Contributor Author

The node prefix in import statements is fairly new (works only in node 14 and newer). Its a way to safeguard that the module in use is not overridden by a module with the same name in NPM. Which is not a huge problem for existing built in modules in node, but will be for future modules core want to implement (fetch is an example).

https://nodejs.org/api/esm.html#node-imports

@trygve-lie trygve-lie merged commit 86c5cb3 into master Jan 7, 2022
@trygve-lie trygve-lie deleted the esm branch January 7, 2022 09:50
github-actions bot pushed a commit that referenced this pull request Jan 7, 2022
# [1.3.0](v1.2.29...v1.3.0) (2022-01-07)

### Features

* Convert to ESM ([#297](#297)) ([86c5cb3](86c5cb3))
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants