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

doc: update packages documentation for Node.js 12 EOL #43375

Closed
wants to merge 31 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4759735
doc: update packages documentation for Node.js 12 EOL
guybedford Jun 11, 2022
4fad6db
lint fixes
guybedford Jun 11, 2022
924c758
Apply suggestions from code review
guybedford Jun 11, 2022
894a104
main -> index, rewordings
guybedford Jun 12, 2022
5cb9eda
also update conditional example
guybedford Jun 12, 2022
47c501a
latest suggestions
guybedford Jun 13, 2022
2c9d7c3
remove extension in module export case
guybedford Jun 14, 2022
b65c5e5
update patterns history
guybedford Jun 14, 2022
e102fce
update imports trailers support
guybedford Jun 14, 2022
f4184d6
reorder changes
guybedford Jun 14, 2022
9db527f
use patterns extensions variant in interop example
guybedford Jun 14, 2022
4cbd77f
note major upgrade path
guybedford Jun 14, 2022
d339608
fixup unextensioned feature export
guybedford Jun 14, 2022
c83484f
Apply suggestions from code review
guybedford Jun 14, 2022
2dec621
dedicated section on import maps compat
guybedford Jun 14, 2022
074c1f5
clarification
guybedford Jun 14, 2022
a196e03
more clarifications
guybedford Jun 14, 2022
82ce47c
compatibility -> interopoerability
guybedford Jun 14, 2022
d8a9064
typo, rewording
guybedford Jun 14, 2022
b9ffef7
remove duplicated point
guybedford Jun 14, 2022
5096cc7
rewordings, fixups
guybedford Jun 14, 2022
21263f2
fixup reference ordering
guybedford Jun 14, 2022
469e5e8
subpath extensions guidance section over import maps interop section
guybedford Jun 15, 2022
f2b426a
typo
guybedford Jun 15, 2022
7804776
update import map link
guybedford Jun 15, 2022
ad0861f
lint fixes for Jacob
guybedford Jun 15, 2022
14a9f4e
further clarifications
guybedford Jun 15, 2022
eebd97d
final recommendataion cleanup
guybedford Jun 15, 2022
b0a0df3
correct patterns change
guybedford Jun 15, 2022
03e84ea
extensioned v extensionless -> extensions in subpaths
guybedford Jun 15, 2022
757bb60
casing
guybedford Jun 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
extensioned v extensionless -> extensions in subpaths
  • Loading branch information
guybedford committed Jun 15, 2022
commit 03e84eaf1c645eae2c7d70bba90b812a91e32ad8
4 changes: 2 additions & 2 deletions doc/api/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ import submodule from 'es-module-package/private-module.js';
// Throws ERR_PACKAGE_PATH_NOT_EXPORTED
```

#### Extensioned v Extensionless Subpaths
#### Extensions in Subpaths

Package authors should provide either extensioned (`import 'pkg/subpath.js'`) or
extensionless (`import 'pkg/subpath'`) subpaths in their exports. This ensures
Expand All @@ -389,7 +389,7 @@ benefits of readability and of masking the true path of the file within the
package.

With [import maps][] now providing a standard for package resolution in browsers
and other server-side runtimes, using the extensionless style can result in
and other JavaScript runtimes, using the extensionless style can result in
bloated import map definitions. Explicit file extensions can avoid this issue by
enabling the import map to utilize a [packages folder mapping][] to map multiple
subpaths where possible instead of a separate map entry per package subpath
Expand Down