-
Notifications
You must be signed in to change notification settings - Fork 30k
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: improve paragraph in esm.md #34064
Conversation
doc/api/esm.md
Outdated
A folder containing a `package.json` file, and all subfolders below that folder | ||
down until the next folder containing another `package.json`, is considered a | ||
_package scope_. The `"type"` field defines how `.js` files should be treated | ||
within a particular `package.json` file’s package scope. Every package in a | ||
until the next folder containing another `package.json`, are a | ||
_package scope_. The `"type"` field defines how to treat `.js` files | ||
within the package scope. Every package in a | ||
project’s `node_modules` folder contains its own `package.json` file, so each | ||
project’s dependencies have their own package scopes. A `package.json` lacking a | ||
`"type"` field is treated as if it contained `"type": "commonjs"`. | ||
project’s dependencies have their own package scopes. If a `package.json` file | ||
does not have a `"type"` field, the default `"type"` is `"commonjs"`. |
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.
Any reason to not go the full 80 characters per line?
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.
Just to keep the diff clear. I can re-wrap to fill out the lines if that's preferred.
doc/api/esm.md
Outdated
project’s dependencies have their own package scopes. A `package.json` lacking a | ||
`"type"` field is treated as if it contained `"type": "commonjs"`. | ||
project’s dependencies have their own package scopes. If a `package.json` file | ||
does not have a `"type"` field, the default `"type"` is `"commonjs"`. |
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.
Is it worth noting that invalid values are also interpreted as "commonjs"
?
does not have a `"type"` field, the default `"type"` is `"commonjs"`. | |
does not have a `"type"` field or an invalid one, the default `"type"` is | |
`"commonjs"`. |
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.
If that's the case, then that seems like a good addition. I'd prefer that be a different pull request so that this one is kept purely style and grammar.
Landed in 95eecd5 |
Edit for clarity, correct tense, and brevity. PR-URL: #34064 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Edit for clarity, correct tense, and brevity. PR-URL: #34064 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Edit for clarity, correct tense, and brevity. PR-URL: #34064 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Edit for clarity, correct tense, and brevity.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes