Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8a4e1fa

Browse filesBrowse files
tniessendanielleadams
authored andcommitted
doc: use serial comma in ESM docs
Refs: #11321 Refs: #17384 PR-URL: #43322 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
1 parent 4a9511d commit 8a4e1fa
Copy full SHA for 8a4e1fa

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/esm.md‎

Copy file name to clipboardExpand all lines: doc/api/esm.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ import './foo.mjs?query=1'; // loads ./foo.mjs with query of "?query=1"
174174
import './foo.mjs?query=2'; // loads ./foo.mjs with query of "?query=2"
175175
```
176176

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

@@ -466,7 +466,7 @@ semantics implemented.
466466
467467
### Differences between ES modules and CommonJS
468468
469-
#### No `require`, `exports` or `module.exports`
469+
#### No `require`, `exports`, or `module.exports`
470470
471471
In most cases, the ES module `import` can be used to load CommonJS modules.
472472
@@ -1033,7 +1033,7 @@ import CoffeeScript from 'coffeescript';
10331033
10341034
const baseURL = pathToFileURL(`${cwd()}/`).href;
10351035
1036-
// CoffeeScript files end in .coffee, .litcoffee or .coffee.md.
1036+
// CoffeeScript files end in .coffee, .litcoffee, or .coffee.md.
10371037
const extensionsRegex = /\.coffee$|\.litcoffee$|\.coffee\.md$/;
10381038
10391039
export async function resolve(specifier, context, defaultResolve) {
@@ -1196,7 +1196,7 @@ The resolver can throw the following errors:
11961196
> 2. If _specifier_ is a valid URL, then
11971197
> 1. Set _resolved_ to the result of parsing and reserializing
11981198
> _specifier_ as a URL.
1199-
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_ or _"../"_, then
1199+
> 3. Otherwise, if _specifier_ starts with _"/"_, _"./"_, or _"../"_, then
12001200
> 1. Set _resolved_ to the URL resolution of _specifier_ relative to
12011201
> _parentURL_.
12021202
> 4. Otherwise, if _specifier_ starts with _"#"_, then
@@ -1377,14 +1377,14 @@ _internal_, _conditions_)
13771377
> 2. Return **PACKAGE\_RESOLVE**(_target_ + _subpath_,
13781378
> _packageURL_ + _"/"_).
13791379
> 2. Otherwise, throw an _Invalid Package Target_ error.
1380-
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1380+
> 3. If _target_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
13811381
> _"node\_modules"_ segments after the first segment, case insensitive and
13821382
> including percent encoded variants, throw an _Invalid Package Target_
13831383
> error.
13841384
> 4. Let _resolvedTarget_ be the URL resolution of the concatenation of
13851385
> _packageURL_ and _target_.
13861386
> 5. Assert: _resolvedTarget_ is contained in _packageURL_.
1387-
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_ or
1387+
> 6. If _subpath_ split on _"/"_ or _"\\"_ contains any _"."_, _".."_, or
13881388
> _"node\_modules"_ segments, case insensitive and including percent
13891389
> encoded variants, throw an _Invalid Module Specifier_ error.
13901390
> 7. If _pattern_ is **true**, then

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.