Antoine du HAMEL
bf7f492cb6
doc: rename module pages
...
Using a "Modules:" prefix groups all the related pages together when
using alphabetical order.
Refs: https://github.com/nodejs/modules/issues/539
PR-URL: https://github.com/nodejs/node/pull/34663
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-24 12:19:59 +01:00
Antoine du HAMEL
34430abd71
doc: move module core module doc to separate page
...
The `module` core module is available for both CJS and ESM users, it
deserves its own page.
PR-URL: https://github.com/nodejs/node/pull/34747
Refs: https://github.com/nodejs/modules/issues/539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:23 +01:00
Guy Bedford
698cae7625
module: share CJS/ESM resolver fns, refactoring
...
PR-URL: https://github.com/nodejs/node/pull/34744
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-20 15:05:14 +01:00
Myles Borins
ca62c34f69
2020-07-21, Version 14.6.0 (Current)
...
Notable changes:
deps:
* upgrade npm to 6.14.6 (claudiahdz) https://github.com/nodejs/node/pull/34246
* upgrade to libuv 1.38.1 (Colin Ihrig) https://github.com/nodejs/node/pull/34187
* (SEMVER-MINOR) update V8 to 8.4.371.19 (Michaël Zasso) [#33579 ](https://github.com/nodejs/node/pull/33579 )
module:
* (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) https://github.com/nodejs/node/pull/32217
* (SEMVER-MINOR) package "imports" field (Guy Bedford) https://github.com/nodejs/node/pull/34117
src:
* (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) https://github.com/nodejs/node/pull/34303
* (SEMVER-MINOR) allow embedders to disable esm loader (Shelley Vohr) https://github.com/nodejs/node/pull/34060
tls:
* (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) https://github.com/nodejs/node/pull/33974
vm:
* (SEMVER-MINOR) add run-after-evaluate microtask mode (Anna Henningsen) https://github.com/nodejs/node/pull/34023
worker:
* (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) https://github.com/nodejs/node/pull/34303
New Collaborators:
* add danielleadams to collaborators (Danielle Adams) https://github.com/nodejs/node/pull/34360
* add sxa as collaborator (Stewart X Addison) https://github.com/nodejs/node/pull/34338
* add ruyadorno to collaborators (Ruy Adorno) https://github.com/nodejs/node/pull/34297
PR-URL: https://github.com/nodejs/node/pull/34371
2020-07-20 16:51:34 -04:00
Antoine du HAMEL
8d7330be0e
module: deprecate module.parent
...
This feature does not work when a module is imported using ECMAScript
modules specification, therefore it is deprecated.
Fixes: https://github.com/nodejs/modules/issues/469
Backport-PR-URL: https://github.com/nodejs/node/pull/33533
PR-URL: https://github.com/nodejs/node/pull/32217
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-07-16 17:09:13 -04:00
Guy Bedford
1ae76bd075
module: package "imports" field
...
PR-URL: https://github.com/nodejs/node/pull/34117
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-07-16 17:09:07 -04:00
Rich Trott
3b268094cc
doc: use sentence-case for headings in docs
...
Backport-PR-URL: https://github.com/nodejs/node/pull/33961
PR-URL: https://github.com/nodejs/node/pull/33889
Refs: https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings
Refs: https://docs.microsoft.com/en-us/style-guide/capitalization
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-14 11:22:34 -04:00
Rich Trott
3874358e32
doc: use a single space between sentences
...
We mostly have a single space between the punctuation that ends a
sentence and the start of the next sentence. Change instances with two
spaces to one.
PR-URL: https://github.com/nodejs/node/pull/33995
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-06-30 09:34:24 -07:00
Zeke Sikelianos
3a53c2ff26
doc: update ``txt `fandamental and ``raw code blocks
...
These are changed to either ```text or ```console.
PR-URL: https://github.com/nodejs/node/pull/33028
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-06-30 09:33:50 -07:00
Derek Lewis
44cd26b73b
doc: normalize Bash code block info strings
...
Prior to this commit, Bash fenced code blocks in Markdown files had
inconsistent info strings. This has been corrected to standardize on
the less-obscure variant.
PR-URL: https://github.com/nodejs/node/pull/33510
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-06-30 09:33:44 -07:00
Guy Bedford
f98e927523
doc: correct CommonJS self-resolve spec
...
PR-URL: https://github.com/nodejs/node/pull/33391
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-06-30 09:33:37 -07:00
Antoine du Hamel
4cc5e9668f
doc: document module.path
...
Refs: https://github.com/nodejs/node/pull/26970
Fixes: https://github.com/nodejs/node/issues/33270
PR-URL: https://github.com/nodejs/node/pull/33323
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-06-02 20:21:53 +02:00
Prosper Opara
aec7bc754e
doc: remove repeated word in modules.md
...
PR-URL: https://github.com/nodejs/node/pull/32931
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-04-27 20:40:48 +01:00
Guy Bedford
b2e77003c5
module: path-only CJS exports extension searching
...
PR-URL: https://github.com/nodejs/node/pull/32351
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2020-04-07 16:25:09 +01:00
Joe Pea
a220202a47
doc: include the error type in the request.resolve doc
...
PR-URL: https://github.com/nodejs/node/pull/32152
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-03-11 17:41:54 +01:00
Rich Trott
b6cd2155c3
doc: remove em dashes
...
Our documentation uses em dashes inconsistently. They are treated
inconsistently typographically too. (For example, they are sometimes
surrounded by spaces and sometimes not.) They are also often confused
with ordinary hyphens such as in the CHANGELOG, where they are
inadvertently mixed together in a single list. The difference is
not obvious in the raw markdown but is very noticeable when rendered,
appearing to be a typographical error (which it in fact is).
The em dash is never needed. There are always alternatives. Remove em
dashes entirely.
PR-URL: https://github.com/nodejs/node/pull/32080
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-03-05 22:25:42 -08:00
Rich Trott
e81f60c8d3
doc: reword possessive form of Node.js in modules.md
...
Throughout the docs, we sometimes write the possessive of _Node.js_ as
_Node.js'_ and other times as _Node.js's_. The former conforms with some
generally accepted style guides (e.g., Associated Press Stylebook) while
the latter complies with others (e.g., Chicago Manual of Style).
Since there is no clear authoritative answer as to which form is
correct, and since (at least to me) both are visually jarring and
sometimes cause a pause to understand, I'd like to reword things to
eliminate the possessive form where possible.
This is one of those examples.
PR-URL: https://github.com/nodejs/node/pull/31713
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-12 00:20:39 -08:00
Steffen
d80c40047b
doc: fix numbering
...
PR-URL: https://github.com/nodejs/node/pull/31575
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-01 11:34:26 +01:00
Denys Otrishko
be6596352b
doc: clarify require() OS independence
...
PR-URL: https://github.com/nodejs/node/pull/31571
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-01-31 19:05:16 -08:00
Shelley Vohr
a484f1acf3
2020-01-21, Version 13.7.0 (Current)
...
Notable changes:
* deps:
* upgrade to libuv 1.34.1 (cjihrig) https://github.com/nodejs/node/pull/31332
* upgrade npm to 6.13.6 (Ruy Adorno) https://github.com/nodejs/node/pull/31304
* module
* add API for interacting with source maps (bcoe) https://github.com/nodejs/node/pull/31132
* loader getSource, getFormat, transform hooks (Geoffrey Booth) https://github.com/nodejs/node/pull/30986
* logical conditional exports ordering (Guy Bedford) https://github.com/nodejs/node/pull/31008
* unflag conditional exports (Guy Bedford) https://github.com/nodejs/node/pull/31001
* process:
* allow monitoring uncaughtException (Gerhard Stoebich) https://github.com/nodejs/node/pull/31257
* Added new collaborators:
* [GeoffreyBooth](https://github.com/GeoffreyBooth ) - Geoffrey Booth. https://github.com/nodejs/node/pull/31306
PR-URL: https://github.com/nodejs/node/pull/31382
2020-01-21 09:58:13 -08:00
bcoe
521b2224c3
module: add API for interacting with source maps
...
PR-URL: https://github.com/nodejs/node/pull/31132
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-01-14 12:39:06 -08:00
Guy Bedford
8a96d05ec7
module: self resolve bug fix and esm ordering
...
PR-URL: https://github.com/nodejs/node/pull/31009
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2019-12-29 11:17:21 -05:00
Rich Trott
248f057509
doc,module: use code markup/markdown in headers
...
PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-12-26 21:39:27 -08:00
Guy Bedford
357a99293e
module: conditional exports import condition
...
PR-URL: https://github.com/nodejs/node/pull/30799
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-12-12 17:35:08 -05:00
Thomas Watson
ab2afa3379
doc: add missing 'added' versions to module.builtinModules
...
PR-URL: https://github.com/nodejs/node/pull/30562
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
2019-11-30 01:52:34 +01:00
Vse Mozhet Byt
3d926898db
doc: fix some recent doc nits
...
* Fix formatting.
* Fix list numbering.
* Unify abbreviation casing.
* Use an uppercased constructor in a hypothetic code example.
* Fix typos.
* Fix sorting in sections and references.
PR-URL: https://github.com/nodejs/node/pull/30341
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-11-12 16:55:27 -08:00
Guy Bedford
2367474db4
module: conditional exports with flagged conditions
...
PR-URL: https://github.com/nodejs/node/pull/29978
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2019-11-08 17:26:26 -05:00
Alex Zherdev
6f39f10543
doc: fix an error in resolution algorithm steps
...
As it is, if `X begins with './' or '/' or '../'` (step 3), it reads
as if it were possible for the algorithm to do a node_modules lookup
(step 4). But that doesn't seem to reflect the actual logic.
PR-URL: https://github.com/nodejs/node/pull/29940
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-30 07:57:01 -07:00
Jan Krems
050a3b1d75
doc: fix numbering in require algorithm
...
Refs: https://github.com/nodejs/node/pull/29327
PR-URL: https://github.com/nodejs/node/pull/30117
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-10-29 14:34:12 -07:00
Rich Trott
0ed22668bb
doc: delete "a number of" things in the docs
...
Delete "a number of" phrases in the docs. See what I did there? Ha ha.
Ha ha. Ha. ...heh.. <clears throat/>
PR-URL: https://github.com/nodejs/node/pull/30103
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-26 11:25:43 -07:00
Rich Trott
10040500da
doc: remove dashes
...
The use of dashes -- in general, but especially in our docs -- can be
problematic. It is used inconsistently and there is always another form
of punctuation that is as good or better for the situation. In an effort
to reduce the number of variations we use to display the same types of
information, remove the various uses of dashes from the documentation.
PR-URL: https://github.com/nodejs/node/pull/30101
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-10-26 08:39:41 -07:00
Jan Krems
71bcd05232
module: resolve self-references
...
Adds the ability to `import` or `require` a package from within its
own source code. This allows tests and examples to be written using
the package name, making them easier to reuse by consumers of the
package.
Assuming the `name` field in `package.json` is set to `my-pkg`, its
test could use `require('my-pkg')` or `import 'my-pkg'` even if
there's no `node_modules/my-pkg` while testing the package itself.
An important difference between this and relative specifiers like
`require('../')` is that self-references use the public interface
of the package as defined in the `exports` field while relative
specifiers don't.
This behavior is guarded by a new experimental flag
(`--experimental-resolve-self`).
PR-URL: https://github.com/nodejs/node/pull/29327
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-10-24 15:14:38 -07:00
Ruben Bridgewater
06f6d662f6
2019-10-11, Version 12.12.0 (Current)
...
Notable changes:
* build:
* Add `--force-context-aware` flag to prevent usage of native node
addons that aren't context aware
https://github.com/nodejs/node/pull/29631
* deprecations:
* Add documentation-only deprecation for `process._tickCallback()`
https://github.com/nodejs/node/pull/29781
* esm:
* Using JSON modules is experimental again
https://github.com/nodejs/node/pull/29754
* fs:
* Introduce `opendir()` and `fs.Dir` to iterate through directories
https://github.com/nodejs/node/pull/29349
* process:
* Add source-map support to stack traces by using
`--source-map-support` https://github.com/nodejs/node/pull/29564
* tls:
* Honor `pauseOnConnect` option
https://github.com/nodejs/node/pull/29635
* Add option for private keys for OpenSSL engines
https://github.com/nodejs/node/pull/28973
PR-URL: https://github.com/nodejs/node/pull/29919
2019-10-11 21:25:36 +02:00
Nick Schonning
81bc7b3ba5
doc: escape brackets not used as markdown reference links
...
These can turn into links if reference links are added to the document
PR-URL: https://github.com/nodejs/node/pull/29809
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-10-10 22:15:58 -07:00
Guy Bedford
b798f64566
esm: unflag --experimental-exports
...
PR-URL: https://github.com/nodejs/node/pull/29867
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-10 16:29:08 -07:00
Bradley Farias
0b495a899b
esm: remove proxy for builtin exports
...
PR-URL: https://github.com/nodejs/node/pull/29737
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2019-10-05 20:11:15 -04:00
Vse Mozhet Byt
d5882a9544
doc: unify place of stability notes
...
In most cases, stability note is the first info in a doc section
after YAML. This PR makes it consistent across all docs,
as this info seems the most relevant for a reader.
PR-URL: https://github.com/nodejs/node/pull/29799
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-10-03 13:59:40 -07:00
Nick Schonning
e2dcbf1c32
doc: use consistent unordered list style
...
Convert to asterisks when there are mixed styles in document.
Addresses Markdownlint MD004 rule
PR-URL: https://github.com/nodejs/node/pull/29516
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-09-16 11:24:54 -07:00
Nick Schonning
f6152857f9
doc: indent child list items for remark-lint
...
Child items not aligned to parent are flagged by list-item-bullet-indent
PR-URL: https://github.com/nodejs/node/pull/29488
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-09-10 01:18:35 -07:00
Maledong
3c84556654
doc: change the 'txt' to 'console' for a command
...
This is the document formation, because `node` is a command to be
executed, we should reguard it as a command prompt instead of a command
txt type.
PR-URL: https://github.com/nodejs/node/pull/29389
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-09-03 14:21:34 -07:00
Guy Bedford
2103ae4835
module: pkg exports validations and fallbacks
...
PR-URL: https://github.com/nodejs/node/pull/28949
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2019-08-12 06:24:28 -04:00
Guy Bedford
452b393c1f
module: exports error as MODULE_NOT_FOUND
...
PR-URL: https://github.com/nodejs/node/pull/28905
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-08-01 20:36:27 -07:00
Jan Krems
dcb6929183
module: implement "exports" proposal for CommonJS
...
Refs: https://github.com/jkrems/proposal-pkg-exports/issues/36
Refs: https://github.com/nodejs/node/pull/28568
PR-URL: https://github.com/nodejs/node/pull/28759
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2019-07-23 16:11:20 -07:00
Rich Trott
c68513f632
doc: remove "note that" from modules.md
...
PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-06-23 07:07:39 -07:00
Alex Temny
db013e1cd3
doc: clarify wording in modules.md
...
This is a minor clarification in two places in modules.md.
PR-URL: https://github.com/nodejs/node/pull/27853
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-06-02 11:57:01 +02:00
cjihrig
58a59a8d6b
doc: improve createRequire() example
...
Update the example to use import and import.meta.url instead
of require() and require.resolve().
PR-URL: https://github.com/nodejs/node/pull/27762
Fixes: https://github.com/nodejs/node/issues/27758
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-05-20 10:22:44 -04:00
Michaël Zasso
e006a8545e
2019-05-07, Version 12.2.0 (Current)
...
Notable changes:
* deps:
* Updated llhttp to 1.1.3. This fixes a bug that made Node.js' HTTP
parser refuse any request URL that contained the "|" (vertical bar)
character. https://github.com/nodejs/node/pull/27595
* tls:
* Added an `enableTrace()` method to `TLSSocket` and an `enableTrace`
option to `tls.createServer()`. When enabled, TSL packet trace
information is written to `stderr`. This can be used to debug TLS
connection problems. https://github.com/nodejs/node/pull/27497
https://github.com/nodejs/node/pull/27376
* cli:
* Added a `--trace-tls` command-line flag that enables tracing of TLS
connections without the need to modify existing application code.
https://github.com/nodejs/node/pull/27497
* Added a `--cpu-prof-interval` command-line flag. It can be used to
specify the sampling interval for the CPU profiles generated by
`--cpu-prof`. https://github.com/nodejs/node/pull/27535
* module:
* Added the `createRequire()` method. It allows to create a require
function from a file URL object, a file URL string or an absolute
path string. The existing `createRequireFromPath()` method is now
deprecated https://github.com/nodejs/node/pull/27405 .
* Throw on `require('./path.mjs')`. This is technically a breaking
change that should have landed with Node.js 12.0.0. It is necessary
to have this to keep the possibility for a future minor version to
load ES Modules with the require function.
https://github.com/nodejs/node/pull/27417
* repl:
* The REPL now supports multi-line statements using `BigInt` literals
as well as public and private class fields and methods.
https://github.com/nodejs/node/pull/27400
* The REPL now supports tab autocompletion of file paths with `fs`
methods. https://github.com/nodejs/node/pull/26648
* meta:
* Added Christian Clauss (https://github.com/cclauss ) to
collaborators. https://github.com/nodejs/node/pull/27554
PR-URL: https://github.com/nodejs/node/pull/27578
2019-05-07 20:38:46 +02:00
Myles Borins
d370d126c3
module: throw on require('./path.mjs');
...
This is an extremely important part of the ESM implementation
that should have been unflagged as a breaking change in v12.0.0
to allow us to unflag ESM in Node.js 12.x before LTS. Assuming we
can get consensus on this behavior I would argue that this Semver-Major
behavior change could be viewed as a Semver-Patch fix in v12.0.1
PR-URL: https://github.com/nodejs/node/pull/27417
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2019-05-03 12:14:36 -07:00
Myles Borins
411063c6f5
module: add createRequire method
...
This is an abstraction on top of creatRequireFromPath that can accept
both paths, URL Strings, and URL Objects.
PR-URL: https://github.com/nodejs/node/pull/27405
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-05-03 12:12:30 -07:00
Gilles De Mey
e5c8be2bd0
module: allow passing a directory to createRequireFromPath
...
Fixes: https://github.com/nodejs/node/issues/23710
PR-URL: https://github.com/nodejs/node/pull/23818
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-05-01 17:34:12 -07:00