Skip to content

Commit 05aaa43

Browse files
tniessentargos
authored andcommitted
doc: use serial comma in ESM docs
Refs: #11321 Refs: #17384 PR-URL: #43322 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
1 parent 55b420c commit 05aaa43

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/esm.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ import './foo.mjs?query=1'; // loads ./foo.mjs with query of "?query=1"
170170
import './foo.mjs?query=2'; // loads ./foo.mjs with query of "?query=2"
171171
```
172172

173-
The volume root may be referenced via `/`, `//` or `file:///`. Given the
173+
The volume root may be referenced via `/`, `//`, or `file:///`. Given the
174174
differences between [URL][] and path resolution (such as percent encoding
175175
details), it is recommended to use [url.pathToFileURL][] when importing a path.
176176

@@ -456,7 +456,7 @@ semantics implemented.
456456
457457
### Differences between ES modules and CommonJS
458458
459-
#### No `require`, `exports` or `module.exports`
459+
#### No `require`, `exports`, or `module.exports`
460460
461461
In most cases, the ES module `import` can be used to load CommonJS modules.
462462
@@ -1021,7 +1021,7 @@ import CoffeeScript from 'coffeescript';
10211021
10221022
const baseURL = pathToFileURL(`${cwd()}/`).href;
10231023
1024-
// CoffeeScript files end in .coffee, .litcoffee or .coffee.md.
1024+
// CoffeeScript files end in .coffee, .litcoffee, or .coffee.md.
10251025
const extensionsRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/;
10261026
10271027
export async function resolve(specifier, context, defaultResolve) {
@@ -1184,7 +1184,7 @@ The resolver can throw the following errors:
11841184
> 2. If _specifier_ is a valid URL, then
11851185
> 1. Set _resolved_ to the result of parsing and reserializing
11861186
> _specifier_ as a URL.
1187-
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_ or _"../"_, then
1187+
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_, or _"../"_, then
11881188
> 1. Set _resolved_ to the URL resolution of _specifier_ relative to
11891189
> _parentURL_.
11901190
> 4. Otherwise, if _specifier_ starts with _"#"_, then
@@ -1386,14 +1386,14 @@ _internal_, _conditions_)
13861386
> 2. Return **PACKAGE\_RESOLVE**(_target_ + _subpath_,
13871387
> _packageURL_ + _"/"_).
13881388
> 2. Otherwise, throw an _Invalid Package Target_ error.
1389-
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1389+
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
13901390
> _"node\_modules"_ segments after the first segment, case insensitive and
13911391
> including percent encoded variants, throw an _Invalid Package Target_
13921392
> error.
13931393
> 4. Let _resolvedTarget_ be the URL resolution of the concatenation of
13941394
> _packageURL_ and _target_.
13951395
> 5. Assert: _resolvedTarget_ is contained in _packageURL_.
1396-
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1396+
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
13971397
> _"node\_modules"_ segments, case insensitive and including percent
13981398
> encoded variants, throw an _Invalid Module Specifier_ error.
13991399
> 7. If _pattern_ is **true**, then

0 commit comments

Comments
 (0)