summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* src,tools: use https://nodejs.org URL when possible.XhmikosR2018-07-143-3/+3
| | | | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/21719 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* doc: add "Edit on GitHub" linkRich Trott2018-07-132-1/+10
| | | | | | | | | | | | | | | | | | | | | 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>
* tools: avoid global install of dmn for lint updateRich Trott2018-07-121-5/+2
| | | | | | | | | | | | | | When updating ESLint, use npx to run dmn rather than installing dmn globally. PR-URL: https://github.com/nodejs/node/pull/21744 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* tools: add no-duplicate-requires ruleGus Caplan2018-07-121-0/+70
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/21712 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
* tools: build all.json by combining generated JSONSam Ruby2018-07-095-54/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* n-api: restrict exports by versionKyle Farnung2018-07-052-0/+8
| | | | | | | | | | | | | | | | * 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>
* tools: build all.html by combining generated HTMLSam Ruby2018-07-021-0/+73
| | | | | | | | | | | 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>
* doc: fix some linksVse Mozhet Byt2018-07-021-1/+1
| | | | | | | | | 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>
* src: move context bootstrap to jsGus Caplan2018-06-271-0/+4
| | | | | | PR-URL: https://github.com/nodejs/node/pull/21518 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* build: speed up startup with V8 code cacheJoyee Cheung2018-06-272-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch speeds up the startup time and reduce the startup memory footprint by using V8 code cache when comiling builtin modules. The current approach is demonstrated in the `with-code-cache` Makefile target (no corresponding Windows target at the moment). 1. Build the binary normally (`src/node_code_cache_stub.cc` is used), by now `internalBinding('code_cache')` is an empty object 2. Run `tools/generate_code_cache.js` with the binary, which generates the code caches by reading source code of builtin modules off source code exposed by `require('internal/bootstrap/cache').builtinSource` and then generate a C++ file containing static char arrays of the code cache, using a format similar to `node_javascript.cc` 3. Run `configure` with the `--code-cache-path` option so that the newly generated C++ file will be used when compiling the new binary. The generated C++ file will put the cache into the `internalBinding('code_cache')` object with the module ids as keys 4. The new binary tries to read the code cache from `internalBinding('code_cache')` and use it to compile builtin modules. If the cache is used, it will put the id into `require('internal/bootstrap/cache').compiledWithCache` for bookkeeping, otherwise the id will be pushed into `require('internal/bootstrap/cache').compiledWithoutCache` This patch also added tests that verify the code cache is generated and used when compiling builtin modules. The binary with code cache: - Is ~1MB bigger than the binary without code cahe - Consumes ~1MB less memory during start up - Starts up about 60% faster PR-URL: https://github.com/nodejs/node/pull/21405 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
* test: remove outdated, non-functioning testAnatoli Papirovski2018-06-241-20/+0
| | | | | | | | | | | | | | | | | | | The timers directory test, utilizing FakeTime, has not worked in quite a while and is not truly testing Node.js behaviour. If a similar test is necessary it would be better suited to libuv on which Node.js relies for timers functionality. PR-URL: https://github.com/nodejs/node/pull/20894 Fixes: https://github.com/nodejs/node/issues/10154 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
* tools: update ESLint to 5.0.0cjihrig2018-06-244393-46865/+155387
| | | | | | | This is a new major release of ESLint. PR-URL: https://github.com/nodejs/node/pull/20855 Reviewed-By: Rich Trott <rtrott@gmail.com>
* build: build addon tests in parallelAnna Henningsen2018-06-111-0/+58
| | | | | | | | | | | | Use a JS script to build addons rather than a shell command embedded in the Makefile, because parallelizing is hard in sh and easy in JS. PR-URL: https://github.com/nodejs/node/pull/21155 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: add option to use custom template with js2c.pyShelley Vohr2018-06-111-0/+4
| | | | | PR-URL: https://github.com/nodejs/node/pull/21187 Reviewed-By: Anna Henningsen <anna@addaleax.net>
* tools,gyp: fix regex for version matchingRich Trott2018-06-081-1/+1
| | | | | | | | | | | | Tool versions can be 10 and higher. Float patch from node-gyp to accommodate this fact of life. PR-URL: https://github.com/nodejs/node/pull/21216 Refs: https://github.com/nodejs/node-gyp/commit/293092c362febffe19f72712467565045e08e8f1 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* tools: remove unused global types from type-parserRich Trott2018-06-081-6/+3
| | | | | | | | | | `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>
* doc: document BigInt support in fs.StatsJoyee Cheung2018-06-071-0/+2
| | | | | | PR-URL: https://github.com/nodejs/node/pull/20220 Fixes: https://github.com/nodejs/node/issues/12115 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* test,tools: refactor custom ESLint for readabilityRich Trott2018-06-061-3/+1
| | | | | | | | | Refactor the test and the source for the `lowercase-name-for-primitive` custom ESLint rule for readability. PR-URL: https://github.com/nodejs/node/pull/21134 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* src, tools: add check for left leaning pointersDaniel Bevenius2018-06-071-0/+27
| | | | | | | | | | | | This commit adds a rule to cpplint to check that pointers in the code base lean to the left and not right, and also fixes the violations reported. PR-URL: https://github.com/nodejs/node/pull/21010 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* test: create new directory v8-updatesMatheus Marchini2018-06-061-1/+2
| | | | | | | | | | `v8-updates` holds all tests related to V8 updates, for example, testing for postmortem metadata chages. PR-URL: https://github.com/nodejs/node/pull/20783 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* worker: rename to worker_threadsAnna Henningsen2018-06-061-1/+1
| | | | | | | | | | | 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>
* test,tools: enable running tests under workersAnna Henningsen2018-06-062-0/+18
| | | | | | | | | | | | | | | Enable running tests inside workers by passing `--worker` to `tools/test.py`. A number of tests are marked as skipped, or have been slightly altered to fit the different environment. 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>
* worker: implement `MessagePort` and `MessageChannel`Anna Henningsen2018-06-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* tools: update tools/doc/package-lock.jsonRich Trott2018-05-291-0/+31
| | | | | | | | | | 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>
* tools: fix sorting in doc/type-parser.jsVse Mozhet Byt2018-05-261-2/+2
| | | | | | | | | | | 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>
* doc: removed LTS label from v4 in doc version pickerChris Young2018-05-231-1/+1
| | | | | | | | | | | | | 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>
* test: fix tests that fail under coverageBenjamin Coe2018-05-221-0/+9
| | | | | | | | | | | | | | | | Make test runner capable of skipping tests, which makes it possible to skip the failing test/message/core_line_numbers.js test. Make nyc no longer generate compact instrumentation (this causes significantly different code output, which leads to failing test assertions). PR-URL: https://github.com/nodejs/node/pull/20794 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
* tools: update prohibited-strings md lintingRich Trott2018-05-182-366/+407
| | | | | | | | | | | | | | Update to remark-lint-prohibited-strings 1.0.3 to avoid false positives with GitHub team names which must be lowercased no matter what our prohibited-strings rules say about a particular string. PR-URL: https://github.com/nodejs/node/pull/20742 Refs: https://github.com/nodejs/node/pull/20740 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: stricter eslint rule for globalsRuben Bridgewater2018-05-182-35/+50
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/20567 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
* tools, doc: wrap manpage links in code elementsVse Mozhet Byt2018-05-171-1/+1
| | | | | | | | | 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>
* tools, doc: fix stability index isssuesVse Mozhet Byt2018-05-171-6/+15
| | | | | | | | | | 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>
* tools: eliminate intermediate module in doctoolsVse Mozhet Byt2018-05-162-17/+2
| | | | | | | 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>
* tools: fix "the the" typos in commentsMasashi Hirano2018-05-164-4/+4
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/20716 Fixes: https://github.com/nodejs/node/issues/20682 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: hide symbols for builtin JS files in binaryAnna Henningsen2018-05-141-0/+4
| | | | | | | | | | | | | | | Do not expose symbols like `node::internal_process_next_tick_value`, `node::internal_process_next_tick_key` in the created `node` binary by wrapping them in an anonymous namespace. PR-URL: https://github.com/nodejs/node/pull/20634 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
* tools: make C++ linter reject `template<`Anna Henningsen2018-05-141-0/+4
| | | | | | | | | | | | | | | This one is more or less just for me. :) PR-URL: https://github.com/nodejs/node/pull/20675 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* tools: overhaul tools/doc/html.jsVse Mozhet Byt2018-05-141-307/+213
| | | | | PR-URL: https://github.com/nodejs/node/pull/20613 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: use macOS as operating system nameRich Trott2018-05-101-0/+0
| | | | | | | | | | | As of 2016, the operating system is macOS. Remove use of "macosx". PR-URL: https://github.com/nodejs/node/pull/20579 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: remove `--quiet` from run-valgrind.pyAnna Henningsen2018-05-101-3/+0
| | | | | | | | | This should no longer be an issue, now that we clean up resources when exiting. PR-URL: https://github.com/nodejs/node/pull/19377 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
* doc, tools: unify stability signaturesVse Mozhet Byt2018-05-091-2/+1
| | | | | | | 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>
* tools: add eslint check for skipIfEslintMissingRichard Lau2018-05-082-1/+61
| | | | | | | | | | | | | | | Add a custom eslint rule to check for `common.skipIfEslintMissing()` to allow tests to run from source tarballs that do not include eslint. Fix up rule tests that were failing the new check. Refs: https://github.com/nodejs/node/issues/20336 PR-URL: https://github.com/nodejs/node/pull/20372 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: add v10 to alternative version docs menuVse Mozhet Byt2018-05-081-0/+1
| | | | | | | | 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>
* tools: remove redundant code in doc/html.jsVse Mozhet Byt2018-05-071-52/+12
| | | | | | | | | | | 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>
* tools: fix TypeError from `test.py --time`Richard Lau2018-05-021-1/+1
| | | | | | | | | | Calculated durations are timedelta objects but the FormatTime function is expecting a number in seconds. PR-URL: https://github.com/nodejs/node/pull/20368 Fixes: https://github.com/nodejs/node/issues/20341 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* tools: dedupe property access in doc/type-parserVse Mozhet Byt2018-05-021-2/+2
| | | | | | | | | | | | | 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>
* tools: remove redundant RegExp flagVse Mozhet Byt2018-04-281-1/+1
| | | | | | | | 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>
* tools: simplify HTML generationVse Mozhet Byt2018-04-282-67/+23
| | | | | | | 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>
* tools: add log output to crashesRuben Bridgewater2018-04-271-3/+1
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/20295 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
* tools: show stdout/stderr for timed out testsRich Trott2018-04-261-1/+1
| | | | | | | | | | | | | | | | | When a test times out, the contents of stdout and stderr can often be highly valuable in debugging. Provide that information. Refs: https://github.com/nodejs/node/issues/19906#issuecomment-382073888 PR-URL: https://github.com/nodejs/node/pull/20260 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
* tools: modernize and optimize doc/addon-verify.jsVse Mozhet Byt2018-04-241-61/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* test: fix test when NODE_OPTIONS env var is set to --trace-warningsAshok2018-04-231-0/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/20027 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>