summaryrefslogtreecommitdiff
path: root/tools/doc
AgeCommit message (Collapse)Author
2018-07-21tools: build API TOC using raw headersSam Ruby
Markdown interprets the syntax for optional arguments as a form of a link, so instead of trying to build up the contents using the node value, use grab the raw original markup instead. Fixes regression noted in https://github.com/nodejs/node/pull/21490#issuecomment-406785023 PR-URL: https://github.com/nodejs/node/pull/21922 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-20tools: create HTML docs with unified/remark/rehypeSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-13doc: add "Edit on GitHub" linkRich Trott
Proof of concept for an "Edit on GitHub" link, inspired by the Serverless docs. One issue is that the link is to the version of the docs on the master branch even if the person was reading a different version of the doc. I don't consider that a big problem, although we can always remove the link if it turns out to be a big problem. I don't think there is a good solution. PRs need to be opened against the master branch generally. Having a bunch of PRs against staging branches is probably not what we want. If there's an update to one version of the doc, there will usually be an update to other versions. PR-URL: https://github.com/nodejs/node/pull/21703 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2018-07-09tools: build all.json by combining generated JSONSam Ruby
Notes: 1) Removed a number of root properties that did not seem relevant: source, desc, and introduced_in. There no longer is a source, and the other two are from the first include and do not reflect the entire API. 2) As with https://github.com/nodejs/node/issues/20100, the current "desc" properties sometimes contained in-page links, other times referenced another page, and often did not match the links in the original HTML or JSON file. I chose to standardize on external links as "desc" values are isolated snippets as opposed to all.html which can be viewed as a standalone and self contained document. 3) Eliminated preprocessing for @include entirely, including the test case for this function. 4) _toc.md was renamed to index.md. 5) index comments no longer appear in embedded TOCs (left hand side column in the generated documentation. PR-URL: https://github.com/nodejs/node/pull/21637 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-05n-api: restrict exports by versionKyle Farnung
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: https://github.com/nodejs/node/pull/19962 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-07-02tools: build all.html by combining generated HTMLSam Ruby
Combine the toc and api contents from the generated doc/api/*.html files. This ensures that the single page version of the documentation exactly matches the individual pages. PR-URL: https://github.com/nodejs/node/pull/21568 Fixes: https://github.com/nodejs/node/issues/20100 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-07-02doc: fix some linksVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/21619 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-08tools: remove unused global types from type-parserRich Trott
`tools/doc/type-parser.js` has several global types that are not used. Remove the unused global types. PR-URL: https://github.com/nodejs/node/pull/21135 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-06-07doc: document BigInt support in fs.StatsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/20220 Fixes: https://github.com/nodejs/node/issues/12115 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-06-06worker: implement `MessagePort` and `MessageChannel`Anna Henningsen
Implement `MessagePort` and `MessageChannel` along the lines of the DOM classes of the same names. `MessagePort`s initially support transferring only `ArrayBuffer`s. Thanks to Stephen Belanger for reviewing this change in its original form, to Benjamin Gruenbaum for reviewing the added tests in their original form, and to Olivia Hugger for reviewing the documentation in its original form. Refs: https://github.com/ayojs/ayo/pull/98 PR-URL: https://github.com/nodejs/node/pull/20876 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-05-29tools: update tools/doc/package-lock.jsonRich Trott
The package-lock.json file is out of sync with the checked-in node_modules. `make doc-only` updates package-lock.json appropriately. PR-URL: https://github.com/nodejs/node/pull/20970 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-05-26tools: fix sorting in doc/type-parser.jsVse Mozhet Byt
This section groups type links by their home modules and sort these groups alphabetically, so `modules` types should go before the `net` types. PR-URL: https://github.com/nodejs/node/pull/20976 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-23doc: removed LTS label from v4 in doc version pickerChris Young
Fixes: https://github.com/nodejs/node/issues/20903 PR-URL: https://github.com/nodejs/node/pull/20904 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-17tools, doc: wrap manpage links in code elementsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20785 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: Luigi Pinca <luigipinca@gmail.com>
2018-05-17tools, doc: fix stability index isssuesVse Mozhet Byt
1. Do not autolink in doc stability section. 2. Do not add void wrapping elements to docs. PR-URL: https://github.com/nodejs/node/pull/20731 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-16tools: eliminate intermediate module in doctoolsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20701 Fixes: https://github.com/nodejs/node/issues/20685 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-05-14tools: overhaul tools/doc/html.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20613 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-09doc, tools: unify stability signaturesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-08tools: add v10 to alternative version docs menuVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20586 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-05-07tools: remove redundant code in doc/html.jsVse Mozhet Byt
This PR reduces code by 40 lines and docs size by ~7.5 KB. Only <div class="signature">...</div> wrappers are removed from docs, no other changes are found in results. PR-URL: https://github.com/nodejs/node/pull/20514 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-02tools: dedupe property access in doc/type-parserVse Mozhet Byt
There is no need to get this property twice in this rather hot spot: if there is no such key, the `typeUrl` will be `undefined`, which suffices for the boolean check in the next line. For consistency, `undefined` can also be made the default value. PR-URL: https://github.com/nodejs/node/pull/20387 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-28tools: remove redundant RegExp flagVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20309 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-28tools: simplify HTML generationVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20307 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-24tools: modernize and optimize doc/addon-verify.jsVse Mozhet Byt
Modernize: * Replace `var` with `const` / `let`. * Replace common functions with arrow functions. * Use destructuring. * Use `String.prototype.padStart()`, `String.prototype.endsWith()`. Optimize: * Reduce function calls. * Reduce intermediate variables. * Cache retrieved object properties. * Move RegExp declaration out of a cycle. * Simplify RegExps. * Replace RegExp with string when string suffices. * Remove conditions that cannot be false. * Replace for..in with `Object.keys().forEach()`. Also, eliminate needlessly complicated function chains: * `ondone` callback only checks errors; * if there is an error, it is called once and throws, then script exits; * if there are no errors, it is noop; * so there is no need to wrap it into `once()` function * and there is no need to call it without errors; * we can eliminate it and replace with `throw` where an error occurs; * we can also replace `onprogress` callback with `console.log` in place; * at last, we can eliminate `waiting` counter and `once()` utility. The new script produces results identical to the old ones. PR-URL: https://github.com/nodejs/node/pull/20188 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-22tools: improve heading type detection in json.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20074 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-04-17trace_events: adds a new trace_events apiJames M Snell
Removes the requirement to use `--trace-events-enabled` to enable trace events. Tracing is enabled automatically if there are any enabled categories. Adds a new `trace_events` module with an API for enabling/disabling trace events at runtime without a command line flag. ```js const trace_events = require('trace_events'); const categories = [ 'node.perf', 'node.async_hooks' ]; const tracing = trace_events.createTracing({ categories }); tracing.enable(); // do stuff tracing.disable(); ``` Multiple `Tracing` objects may exist and be enabled at any point in time. The enabled trace event categories is the union of all enabled `Tracing` objects and the `--trace-event-categories` flag. PR-URL: https://github.com/nodejs/node/pull/19803 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-04-16doc: unify and compact some fragments in fs.mdVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20050 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-16doc: update tools/doc/README.mdVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20047 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-04-15doc: unify section structuresVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20028 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-12doc: add and unify even more return valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19955 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-11doc, tools: make type parsing more strictVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19881 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@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-09doc: add and unify return statements in crypto.mdVse Mozhet Byt
Conform return statements to the style guide and tool parsers. Also bring back a description fragment that seems to be erroneously deleted in https://github.com/nodejs/node/commit/1e07acd476309e7ddc4981160b89731b61a31179 PR-URL: https://github.com/nodejs/node/pull/19853 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-04-08tools: overhaul tools/doc/json.jsVse Mozhet Byt
Modernize: * Replace `var` with `const` / `let`. * Wrap `switch` cases with `const`/`let` in blocks. * Replace common functions with arrow functions. * Replace string concatenation with template literals. * Shorthand object literals. * Use destructuring and spread. Optimize: * Move RegExp declaration out of loops. * Replace `.match()` with `.test()` in boolean context. * Replace RegExp with string when string suffices. * Make RegExp more strict to reject unrelated cases. * Make RegExp do the trimming to eliminate many `.trim()` calls. * Cache retrieved object properties. * Remove conditions that cannot be false. * Remove code that seems obsolete (it means a state that cannot happen or is not typical). Clarify: * Sync code examples in comments with the actual source state. * Expand some one-letter variable names. * Rename confusingly similar variables. * Move variable declarations closer to their context. * Remove non-actual commented out code. * Unify blank lines between top-level blocks. Fix: * Fix conditions that cannot be true. Guard: * Throw on unexpected state more often. PR-URL: https://github.com/nodejs/node/pull/19832 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
2018-04-04doc,tools: formalize, unify, codify default valuesVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19737 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-03-30tools: dry utility function in tools/doc/json.jsVse Mozhet Byt
Also, move a declaration of unrelated variable closer to its only context. PR-URL: https://github.com/nodejs/node/pull/19692 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2018-03-30tools: fix comment nits in tools/doc/*.js filesVse Mozhet Byt
* Unify first letters case. * Unify periods. * Delete excess spaces. * Add some blank lines as logical delimiters. * Remove obvious comments. * Combine short lines, rewrap lines more logically. * Fix typos. * "XXX" -> "TODO:", OSX -> macOS. PR-URL: https://github.com/nodejs/node/pull/19696 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-03-28tools: fix nits in tools/doc/type-parser.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19612 Reviewed-By: Shingo Inoue <leko.noor@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
2018-03-26doc: rename HTTP2 to HTTP/2Timothy Gu
Previously, "HTTP/2" was strictly used to describe the protocol, and HTTP2 the module. This distinction is deemed unnecessary, and consistency between the two terms is enforced. PR-URL: https://github.com/nodejs/node/pull/19603 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.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: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2018-03-25tools: simplify tools/doc/preprocess.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19539 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-03-25tools: fix nits in tools/doc/common.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19599 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-25tools: shorten metadata parsingTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19512 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-25tools: make metadata parsing less permissiveTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/19512 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-03-21tools: fix nits in tools/doc/preprocess.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19473 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-03-20tools: fix logic nit in tools/doc/generate.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/19475 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-02-21doc: fix nits in tools/doc/README.mdVse Mozhet Byt
* Sync format schemes with the current doc state. * Lowercase primitive types. * Fix typos and unify the style. * Remove tautological info. PR-URL: https://github.com/nodejs/node/pull/18874 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-07tools: add FileHandle to doc/type-parser.jsVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/18601 Refs: https://github.com/nodejs/node/pull/18407 Refs: https://github.com/nodejs/node/pull/18444 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-02-01doc: linkify missing typesVse Mozhet Byt
Also, alphabetize all types in type-parser.js and fix some nits in type formats. PR-URL: https://github.com/nodejs/node/pull/18444 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-01-28doc: unify type linkificationVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/18407 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-01-25Revert "tools: simplify tools/doc/addon-verify.js"Rod Vagg
This reverts commit c6682636be4955e2181c00e7d4868fbf6682a5c5. Reverted along with d9b59def7 as this breaks compilation from downloadable source tarballs. Ref: https://github.com/nodejs/node/pull/17407 PR-URL: https://github.com/nodejs/node/pull/18287 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>