-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc: fix explanation of package.json "type" field #27516
Conversation
@nodejs/modules-active-members PTAL |
I'm not sure that this is an improvement. I think it's important for users to know that both |
@GeoffreyBooth
The edited paragraph documents the "type" field specifically. The original text implies that the "type" field affects how |
ping @GeoffreyBooth |
I disagree with this change. While the field may not affect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not find the removal to improve clarity or ease of searching for information.
How about, in addition to this change, adding a sentence in the
|
@tamias that seems fine |
@Trott lgtm |
Remove erroneous reference to files with `.mjs` extension, which are not affected by the package.json "type" field.
Added sentence about the type field not affecting .mjs and .cjs files.
I was already working on the rebase. 😛 A separate paragraph had already been added at the end of that doc section; in the rebase I put my sentence after that paragraph. Still look okay that way? |
seems fine |
@GeoffreyBooth Does this change look OK to you now? Or is it still problematic from your point of view? |
Co-Authored-By: Geoffrey Booth <[email protected]>
Looks good now, thanks! |
Regardless of the value of the `"type"` field, `.mjs` files are always treated as ES modules and `.cjs` files are always treated as CommonJS. PR-URL: #27516 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Regardless of the value of the `"type"` field, `.mjs` files are always treated as ES modules and `.cjs` files are always treated as CommonJS. PR-URL: #27516 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Regardless of the value of the `"type"` field, `.mjs` files are always treated as ES modules and `.cjs` files are always treated as CommonJS. PR-URL: #27516 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Regardless of the value of the `"type"` field, `.mjs` files are always treated as ES modules and `.cjs` files are always treated as CommonJS. PR-URL: #27516 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Remove erroneous reference to files with
.mjs
extension, which are not affected by the "type" field.Checklist