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

docs: use node: imports for node core modules #39681

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

erickzhao
Copy link
Member

@erickzhao erickzhao commented Aug 28, 2023

Description of Change

Core Node.js modules (e.g. os, fs, path) can be imported using the node: prefixed syntax as of Node.js 16.0/14.18. Node's own documentation has moved to use this prefix syntax for clarity reasons (nodejs/node#42752).

After discussing with @electron/docs, we believe we should migrate the syntax in our docs as well to follow suit.

Note
None of the examples in breaking-changes.md have been updated since users may be on older versions of Electron that do not support the node: syntax.

Checklist

Release Notes

Notes: none

@electron-cation electron-cation bot added documentation 📓 semver/patch backwards-compatible bug fixes new-pr 🌱 PR opened in the last 24 hours labels Aug 28, 2023
@dsanders11 dsanders11 added target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. labels Aug 28, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 29, 2023
@jkleinsc
Copy link
Contributor

Merging as CI failure unrelated to PR change.

@jkleinsc jkleinsc merged commit b8ac798 into electron:main Aug 30, 2023
25 of 26 checks passed
@release-clerk
Copy link

release-clerk bot commented Aug 30, 2023

No Release Notes

@trop
Copy link
Contributor

trop bot commented Aug 30, 2023

I have automatically backported this PR to "27-x-y", please check out #39694

@trop trop bot added in-flight/27-x-y and removed target/27-x-y PR should also be added to the "27-x-y" branch. labels Aug 30, 2023
@trop
Copy link
Contributor

trop bot commented Aug 30, 2023

I have automatically backported this PR to "26-x-y", please check out #39695

@trop trop bot added in-flight/26-x-y merged/27-x-y PR was merged to the "27-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. and removed target/26-x-y PR should also be added to the "26-x-y" branch. in-flight/27-x-y in-flight/26-x-y labels Aug 30, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
docs: use `node:` imports for node builtin modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📓 merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants