Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-03-30tools: simplify eslint comma-dangle configuration (tools)Rich Trott
Remove the comma-dangle settings in tools/.eslintrc.yaml. They are duplicated in .eslintrc.js. PR-URL: https://github.com/nodejs/node/pull/37883 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-30doc,tools: use only one level 1 header per pageRich Trott
Increment the header levels from markdown files when producing HTML documents. This is both better semantically (as the two h1 headers in current docs are not actually equivalent level semantically--the second belongs below/inside the first) and better for accessibility. (It is valid HTML to have multiple h1 headers in a document, but it can be bad for screen reader experience.) PR-URL: https://github.com/nodejs/node/pull/37839 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-30tools: improve macos-firewall.sh outputRich Trott
The output of tools/macos-firewall.sh can cause people to think it didn't work. Update things slightly to make the output mildly more informative. Refs: https://github.com/nodejs/node/issues/37233#issuecomment-802201046 PR-URL: https://github.com/nodejs/node/pull/37846 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-24tools: make genv8constants.py Python3-compatibleMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/37835 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-24deps: add ngtcp2 and nghttp3James M Snell
Reintroduces the ngtcp2 and nghttp3 dependencies, building those by default if the vendored-in openssl (with QUIC support) is used or the shared openssl defines `OPENSSL_INFO_QUIC`. Upates the version metadata to reflect whether ngtcp2 and nghttp3 are present. ngtcp2 as of https://github.com/ngtcp2/ngtcp2/commit/2381f7f7b633602d83ad3de997153df730b1f649 nghttp3 as of https://github.com/ngtcp2/nghttp3/commit/66ad30f0a8f5164f87fbc83b37628f8f6d9ba608 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37682 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-03-24tools: partially detect quic support in shared_opensslJames M Snell
If the shared openssl does not have the `OPENSSL_INFO_QUIC` define, then it definitely does not have the QUIC apis. This is only a partially accurate check because it does not detect if the shared openssl was actually *built* without the OPENSSL_NO_QUIC define set. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37682 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-03-18tools: update ESLint to 7.22.0cjihrig
Update ESLint to 7.22.0 PR-URL: https://github.com/nodejs/node/pull/37734 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-16tools: use bundled npm in update scriptsRuy Adorno
The scripts `./tools/update-babel-eslint.sh` and `./tools/update-eslint.sh` are relying on the version of `npm` found in the local-defined `$PATH` env. This changeset proposes to modify these scripts to run the version of npm bundled in the current branch (found at `./deps/npm`) - in order to: a) Standardize the version of npm that should be use to install these deps, avoids the pitfall of having an inadverted user run these scripts with an unsupported/incompatible npm version. b) Given that npm7 has a different install algorithm than npm6 that takes into account and install peer dependencies, it might be a safer choice to ensure what version of npm should be use during this transitional period in which users might still have npm6 by default in their local system. c) Avoids the possible extra churn of having different resulting files being shuffled around between installs due to usage of a disparate version of the npm cli. PR-URL: https://github.com/nodejs/node/pull/37613 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-16tools: update glob-parent to 5.1.2Rich Trott
In the markdown linting rollup script, update glob-parent to 5.1.2. Refs: https://app.snyk.io/vuln/SNYK-JS-GLOBPARENT-1016905 PR-URL: https://github.com/nodejs/node/pull/37646 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-03-16tools: check version number in YAML comments from changelogsAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/37599 Refs: https://github.com/nodejs/remark-preset-lint-node/pull/172 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-16tools,doc: add support for several flavors of JS code snippetsAntoine du Hamel
Enable code example using both modern ESM syntax and legacy CJS syntax. It adds a toggle on the web interface to let users switch from one JavaScript flavor to the other. PR-URL: https://github.com/nodejs/node/pull/37162 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-03-16tools: fix object name in prefer-assert-methods.jsTobias Nießen
PR-URL: https://github.com/nodejs/node/pull/37544 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-16tools: update remark-preset-lint-node to 2.1.1Rich Trott
PR-URL: https://github.com/nodejs/node/pull/37604 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-16tools: fix compiler warning in inspector_protocolDarshan Sen
error: comparison of integer expressions of different signedness: ‘int’ and ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] 2562 | if (!success || std::numeric_limits<int32_t>::max() < | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ 2563 | token_start_internal_value_) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ PR-URL: https://github.com/nodejs/node/pull/37573 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-03-16tools: make update-eslint.sh work with npm@7Luigi Pinca
Install `eslint-plugin-markdown` at the same level of `eslint` without cd'ing into `eslint` directory, otherwise the following error is raised: ``` npm ERR! code ERESOLVE npm ERR! Cannot destructure property 'name' of 'node' as it is null. ``` PR-URL: https://github.com/nodejs/node/pull/37566 Fixes: https://github.com/nodejs/node/issues/37560 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-03-16tools: add ESLint rule no-array-destructuringAntoine du Hamel
Iterating over arrays should be avoided because it relies on user-mutable global methods (`Array.prototype[Symbol.iterator]` and `%ArrayIteratorPrototype%.next`), we should instead use other alternatives. This commit adds a rule that disallow array destructuring syntax in favor of object destructuring syntax. Note that you can ignore this rule if you are using the array destructuring syntax over a safe iterable, or actually want to iterate over a user-provided object. PR-URL: https://github.com/nodejs/node/pull/36818 Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-16tools: update eslint-plugin-markdown configurationcjihrig
This commit updates the linting setup to work with eslint-plugin-markdown@2.0.0. This also allows the update-eslint script to continue to function properly without changes. PR-URL: https://github.com/nodejs/node/pull/37549 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-16tools: update ESLint to 7.21.0Luigi Pinca
PR-URL: https://github.com/nodejs/node/pull/37546 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-02-16tools: refactor prefer-primordialsAntoine du Hamel
Use optional chaining to improve code readability and remove use of `Array.prototype.reduce`. PR-URL: https://github.com/nodejs/node/pull/36018 Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2021-02-16tools: update ESLint to 7.20.0cjihrig
Update ESLint to 7.20.0 PR-URL: https://github.com/nodejs/node/pull/37339 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-16doc: optimize HTML renderingAntoine du Hamel
Defer rendering sections of docs until they are displayed on the user's screen. PR-URL: https://github.com/nodejs/node/pull/37301 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-02-16perf_hooks: introduce createHistogramJames M Snell
Adds a new `perf_hooks.createHistogram()` API for creating histogram instances that allow user recording. Makes Histogram instances cloneable via MessagePort. This allows, for instance, an event loop delay monitor to be running on the main thread while the histogram data can be monitored actively from a worker thread. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/37155 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-02-16tools: fix lint-pr-url messageAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/37304 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-16tools: avoid pending deprecation in doc generatorMichaël Zasso
`unist-util-find` depends on `lodash.iteratee` which uses `process.binding()`. Let's remove this dependency which is used in one place to do a very simple thing. PR-URL: https://github.com/nodejs/node/pull/37267 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-02-16tools: add GitHub Action linter for pr-urlAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/37221 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-16tools: bump remark-present-lint-node from 2.0.0 to 2.0.1Rich Trott
This is a prerequisite for https://github.com/nodejs/node/pull/37259. PR-URL: https://github.com/nodejs/node/pull/37270 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-02-16tools: fix d8 macOS buildMichaël Zasso
libv8_base doesn't exist anymore. PR-URL: https://github.com/nodejs/node/pull/37211 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-02-16src: put (de)serialization code into node_snapshotable.h/ccJoyee Cheung
So that it's easier to find the corresponding code. PR-URL: https://github.com/nodejs/node/pull/37114 Refs: https://github.com/nodejs/node/pull/36943 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2021-02-16tools: update ESLint to 7.19.0cjihrig
Update ESLint to 7.19.0 PR-URL: https://github.com/nodejs/node/pull/37159 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-02-02doc: remove TOC summary for pages with no TOCRich Trott
Remove the table of contents summary for pages with no table of contents. Currently, this affects at least index.html. PR-URL: https://github.com/nodejs/node/pull/37043 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-02-02quic: remove quicJames M Snell
PR-URL: https://github.com/nodejs/node/pull/37067 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2021-02-02tools: remove commented code from stability.jscjihrig
PR-URL: https://github.com/nodejs/node/pull/37092 Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-02-02crypto: experimental (Ed/X)25519/(Ed/X)448 supportJames M Snell
Implements initial experimental support for Curve25519 and Curve448 support for both ECDH and sign/verify in Web Crypto. Introduced as a Node.js-specific extension to Web Crypto. Signed-off-by: James M Snell <jasnell@gmail.com> Fixes: https://github.com/nodejs/node/issues/36076 PR-URL: https://github.com/nodejs/node/pull/36879 Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2021-01-25tools: cleanup old ICU version-specific fixesMichaël Zasso
Our current minimum ICU is 67, so we don't need to support those anymore PR-URL: https://github.com/nodejs/node/pull/36980 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-01-25deps: update ICU to 68.2Michaël Zasso
Refs: https://github.com/unicode-org/icu/releases/tag/release-68-2 PR-URL: https://github.com/nodejs/node/pull/36980 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-01-25tools,doc: list the stability status of each APIZijian Liu
Fixes: https://github.com/nodejs/node/issues/23723 PR-URL: https://github.com/nodejs/node/pull/36223 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-25buffer: introduce BlobJames M Snell
The `Blob` object is an immutable data buffer. This is a first step towards alignment with the `Blob` Web API. Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/36811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-01-22tools: update ESLint to 7.18.0cjihrig
Update ESLint to 7.18.0 PR-URL: https://github.com/nodejs/node/pull/36955 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-01-22tools: add support for top-level await syntax in linterAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/36911 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-01-22doc: wrap TOC in a <details> tagMattia Pontonio
PR-URL: https://github.com/nodejs/node/pull/36896 Fixes: https://github.com/nodejs/node/issues/36885 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-01-12tools: update all lint-md rollup dependenciesMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/36843 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-12tools: update doc tool dependenciesMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/36844 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-12crypto: introduce X509Certificate APIJames M Snell
Introduces the `crypto.X509Certificate` object. ```js const { X509Certificate } = require('crypto'); const x509 = new X509Certificate('{pem encoded cert}'); console.log(x509.subject); ``` Fixes: https://github.com/nodejs/node/issues/29181 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/36804 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2021-01-12tools: fix md5 hash for ICU 68.1 srcRichard Lau
Correct md5sum hash for the tarball version of the ICU 68.1 source. The previously recorded md5sum hash was for the zip version. PR-URL: https://github.com/nodejs/node/pull/36777 Fixes: https://github.com/nodejs/node/issues/36776 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
2021-01-12tools: update ESLint to 7.17.0cjihrig
Update ESLint to 7.17.0 PR-URL: https://github.com/nodejs/node/pull/36726 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Yash Ladha <yash@yashladha.in>
2021-01-12tools: revise install.py for minor improvementsRich Trott
* Use an with block for reading the config file. Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files * Use explicit blank return to make it clear that the return value is not actually used and that it is being used for flow control only.. PR-URL: https://github.com/nodejs/node/pull/36626 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Christian Clauss <cclauss@me.com>
2021-01-12tools: update gyp-next to v0.7.0Michaël Zasso
Refs: https://github.com/nodejs/gyp-next/releases/tag/v0.7.0 PR-URL: https://github.com/nodejs/node/pull/36580 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
2021-01-12tools: correct usage message for genv8constants.pyRich Trott
PR-URL: https://github.com/nodejs/node/pull/36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-12tools: call close() explicitly in genv8constants.pyRich Trott
PR-URL: https://github.com/nodejs/node/pull/36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-01-12tools: use `is None` consistently in PythonRich Trott
We use `is None` instead of `== None` everywhere (which mostly just means test.py) except in one place in genv8constants.py. Switch to `is None` in genv8constants.py. This is slightly more efficient, although I can't imagine that makes a measurable difference here. PR-URL: https://github.com/nodejs/node/pull/36606 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>