summaryrefslogtreecommitdiff
path: root/doc/api/modules.md
AgeCommit message (Collapse)Author
2019-11-30doc: add missing 'added' versions to module.builtinModulesThomas Watson
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-12doc: fix some recent doc nitsVse Mozhet Byt
* 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-08module: conditional exports with flagged conditionsGuy Bedford
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-10-30doc: fix an error in resolution algorithm stepsAlex Zherdev
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-29doc: fix numbering in require algorithmJan Krems
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-26doc: delete "a number of" things in the docsRich Trott
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-26doc: remove dashesRich Trott
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-24module: resolve self-referencesJan Krems
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-112019-10-11, Version 12.12.0 (Current)Ruben Bridgewater
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-10doc: escape brackets not used as markdown reference linksNick Schonning
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-10esm: unflag --experimental-exportsGuy Bedford
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-05esm: remove proxy for builtin exportsBradley Farias
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-03doc: unify place of stability notesVse Mozhet Byt
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-09-16doc: use consistent unordered list styleNick Schonning
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-10doc: indent child list items for remark-lintNick Schonning
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-03doc: change the 'txt' to 'console' for a commandMaledong
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-08-12module: pkg exports validations and fallbacksGuy Bedford
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-01module: exports error as MODULE_NOT_FOUNDGuy Bedford
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-07-23module: implement "exports" proposal for CommonJSJan Krems
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-06-23doc: remove "note that" from modules.mdRich Trott
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-02doc: clarify wording in modules.mdAlex Temny
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-05-20doc: improve createRequire() examplecjihrig
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-072019-05-07, Version 12.2.0 (Current)Michaël Zasso
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-03module: throw on require('./path.mjs');Myles Borins
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-03module: add createRequire methodMyles Borins
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-01module: allow passing a directory to createRequireFromPathGilles De Mey
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-04-01doc: add information about modules cache behaviorRuben Bridgewater
This publicly documents that adding native module names will resolve the added entry instead of the native module. It also updates the description why extensions are deprecated. PR-URL: https://github.com/nodejs/node/pull/26971 Refs: https://github.com/nodejs/node/pull/25362 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-27module: throw an error for invalid package.json main entriesRuben Bridgewater
We currently ignore invalid `main` entries in package.json files. This does not seem to be very user friendly as it's certainly an error if the `main` entry is not a valid file name. So instead of trying to resolve the file otherwise, throw an error immediately to improve the user experience. To keep it backwards compatible `index.js` files in the same directory as the `package.json` will continue to be resolved instead but that behavior is now deprecated. PR-URL: https://github.com/nodejs/node/pull/26823 Fixes: https://github.com/nodejs/node/issues/26588 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-03-10benchmark,doc,lib,test: capitalize commentsRuben Bridgewater
PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2019-01-08doc: make modules.md more accurateVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/25357 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-10tools: capitalize sentencesRuben Bridgewater
This adds the `capitalized-comments` eslint rule to verify that actual sentences use capital letters as starting letters. It ignores special words and all lines below 62 characters. PR-URL: https://github.com/nodejs/node/pull/24808 Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-28doc: sort bottom-of-file markdown linksSam Roberts
Reapply https://github.com/nodejs/node/pull/12726 It would be nice to have the sort check applied as part of doc testing, but this change doesn't implement that. PR-URL: https://github.com/nodejs/node/pull/24679 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-26doc: clarify symlink resolution for __filenameRich Trott
Make it more explicit that symlinks are resolved in `__filename`. Refs: https://github.com/nodejs/node/issues/22602#issuecomment-440906602 PR-URL: https://github.com/nodejs/node/pull/24587 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-10-31doc: use Node.js instead of NodeRich Trott
Per branding guidelines from the Foundation, use Node.js and not Node. PR-URL: https://github.com/nodejs/node/pull/23967 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-10-23doc: add review suggestions to require()erickwendel
PR-URL: https://github.com/nodejs/node/pull/23605 Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-102018-10-10, Version 10.12.0 (Current)Michaël Zasso
Notable changes: * assert * The diff output is now a tiny bit improved by sorting object properties when inspecting the values that are compared with each other. https://github.com/nodejs/node/pull/22788 * cli * The options parser now normalizes `_` to `-` in all multi-word command-line flags, e.g. `--no_warnings` has the same effect as `--no-warnings`. https://github.com/nodejs/node/pull/23020 * Added bash completion for the `node` binary. To generate a bash completion script, run `node --completion-bash`. The output can be saved to a file which can be sourced to enable completion. https://github.com/nodejs/node/pull/20713 * crypto * Added support for PEM-level encryption. https://github.com/nodejs/node/pull/23151 * Added an API asymmetric key pair generation. The new methods `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be used to generate public and private key pairs. The API supports RSA, DSA and EC and a variety of key encodings (both PEM and DER). https://github.com/nodejs/node/pull/22660 * fs * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If this option is set to true, non-existing parent folders will be automatically created. https://github.com/nodejs/node/pull/21875 * http2 * Added a `'ping'` event to `Http2Session` that is emitted whenever a non-ack `PING` is received. https://github.com/nodejs/node/pull/23009 * Added support for the `ORIGIN` frame. https://github.com/nodejs/node/pull/22956 * Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect protocol support to allow use of WebSockets over HTTP/2. https://github.com/nodejs/node/pull/23284 * module * Added `module.createRequireFromPath(filename)`. This new method can be used to create a custom require function that will resolve modules relative to the filename path. https://github.com/nodejs/node/pull/19360 * process * Added a `'multipleResolves'` process event that is emitted whenever a `Promise` is attempted to be resolved multiple times, e.g. if the `resolve` and `reject` functions are both called in a `Promise` executor. https://github.com/nodejs/node/pull/22218 * url * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These methods can be used to correctly convert between file: URLs and absolute paths. https://github.com/nodejs/node/pull/22506 * util * Added the `sorted` option to `util.inspect()`. If set to `true`, all properties of an object and Set and Map entries will be sorted in the returned string. If set to a function, it is used as a compare function. https://github.com/nodejs/node/pull/22788 * The `util.instpect.custom` symbol is now defined in the global symbol registry as `Symbol.for('nodejs.util.inspect.custom')`. https://github.com/nodejs/node/pull/20857 * Added support for `BigInt` numbers in `util.format()`. https://github.com/nodejs/node/pull/22097 * V8 API * A number of V8 C++ APIs have been marked as deprecated since they have been removed in the upstream repository. Replacement APIs are added where necessary. https://github.com/nodejs/node/pull/23159 * Windows * The Windows msi installer now provides an option to automatically install the tools required to build native modules. https://github.com/nodejs/node/pull/22645 * Workers * Debugging support for Workers using the DevTools protocol has been implemented. https://github.com/nodejs/node/pull/21364 * The public `inspector` module is now enabled in Workers. https://github.com/nodejs/node/pull/22769 * Added new collaborators: * digitalinfinity - Hitesh Kanwathirtha PR-URL: https://github.com/nodejs/node/pull/23313
2018-10-01Replace vague 'may not' with definitive 'will not'Mike MacCana
This vagueness of 'may' has caused a great deal of confusion. See https://stackoverflow.com/questions/8887318 PR-URL: https://github.com/nodejs/node/pull/23143 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-14module: add createRequireFunction methodGus Caplan
PR-URL: https://github.com/nodejs/node/pull/19360 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-09-02doc: clarify fallback behavior of module requireTomCoded
PR-URL: https://github.com/nodejs/node/pull/22494 Fixes: https://github.com/nodejs/node/issues/22464 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-08-29doc: remove redundant 'Example:' and similar notesVse Mozhet Byt
Some nits were also fixed in passing. PR-URL: https://github.com/nodejs/node/pull/22537 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-11doc: fix module.children descriptionTravis Fischer
Updates the module.children description in the docs to match current functionality in that it will only contain the modules required for the first time by this module. Fixes: https://github.com/nodejs/node/issues/9371 PR-URL: https://github.com/nodejs/node/pull/21672 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-12doc: add global node_modules to require.resolve()musgravejw
PR-URL: https://github.com/nodejs/node/pull/20534 Fixes: https://github.com/nodejs/node/issues/18926 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-03doc: add more missing backticksVse Mozhet Byt
Also, fix some other nits in passing (formatting, punctuation, typos, redundancy, obsoleteness). PR-URL: https://github.com/nodejs/node/pull/20438 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-02doc: add missing periods or colonsVse Mozhet Byt
Some other formatting nits were fixed and some superfluous descriptions were simplified in passing. PR-URL: https://github.com/nodejs/node/pull/20401 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-29doc: remove redundant empty linesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20398 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-11doc: add quotes for event names + fix similar nitsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19915 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-09doc: specify definite Array typesVse Mozhet Byt
Replace `{Array}` with `{type[]}`. PR-URL: https://github.com/nodejs/node/pull/19895 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-04doc: fix various nitsVse Mozhet Byt
* Replace 2 hyphens (--) by spaced m-dashes (—) as per STYLE_GUIDE.md. * Space infix operators. * Unify quotes in inline code spans (use only single quotes). * Unify `* Returns:` (eliminate deviations). * Dedupe spaces. PR-URL: https://github.com/nodejs/node/pull/19743 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-24doc: add `require.main` to `require` propertiesVse Mozhet Byt
`require.main` was documented in a non-standard way. With this PR, the previous section is left as is to not break all the possible link references inside and outside Node.js docs. A standard section is added to the `require` properties with a reference to the old description. PR-URL: https://github.com/nodejs/node/pull/19573 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-02-23doc: remove extraneous "for example" textRich Trott
No need to announce obvious example code as being example code. Remove unneeded "for example" text as one small way to try to keep the docs more concise.. PR-URL: https://github.com/nodejs/node/pull/18890 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>