0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
Commit Graph

1463 Commits

Author SHA1 Message Date
Refael Ackermann
1fc4255221 tools: python: ignore instead of select flake8 rules
PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-04-13 20:33:06 -04:00
Refael Ackermann
a16a0fe962 tools: python: activate more flake8 rules
PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-04-13 20:33:01 -04:00
Refael Ackermann
0befda6970 tools: python: update flake8 rules
* Tree-factor location of some *.py files for easy demarcation of
  areas to exclude.

PR-URL: https://github.com/nodejs/node/pull/25614
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2019-04-13 20:32:55 -04:00
Joyee Cheung
dfd7e99425
src: make a Environment-independent proxy class for NativeModuleLoader
This patch splits `NativeModuleLoader` into two parts - a singleton
that only relies on v8 and `node::Mutex` and a proxy class for
the singleton (`NativeModuleEnv`) that provides limited access to
the singleton as well as C++ bindings for the Node.js binary.
`NativeModuleLoader` is then no longer aware of `Environment`.

PR-URL: https://github.com/nodejs/node/pull/27160
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-13 17:24:51 +08:00
Jon Kunkee
06c10cdc4c build,win: teach GYP MSVS generator about MARMASM
The toolchain for ARM64 Windows includes support for assembly code, but
with a very different syntax from MASM and NASM. This change teaches
GYP how to emit the right XML tags in VCXPROJ files to support
compiling assembly files with the new tool.

PR-URL: https://github.com/nodejs/node/pull/26020
Refs: https://github.com/nodejs/node/issues/25998
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-11 17:44:10 +01:00
Refael Ackermann
0a25ace9c3 tools: move cpplint configuration to .cpplint
PR-URL: https://github.com/nodejs/node/pull/27098
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-08 08:30:29 -04:00
Refael Ackermann
cd2987f83f tools: refloat 4 Node.js patches to cpplint.py
* Add 3 Node.js checks
* Adjest cpplint.py header rules to Node.js convention

Cherry-pick 12c8b4d154
Original commit message:
    This commit is a suggestion for adding a rule for NULL usages in the
    code base. This will currently report a number of errors which could be
    ignored using // NOLINT (readability/null_usage)

    PR-URL: https://github.com/nodejs/node/pull/17373
    Reviewed-By: Jon Moss <me@jonathanmoss.me>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Timothy Gu <timothygu99@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>

Refs: 12c8b4d154

Cherry-pick fc81e80191
Original commit message:

    Update cpplint.py to check for inline headers when the corresponding
    header is already included.

    PR-URL: https://github.com/nodejs/node/pull/21521
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>

Refs: fc81e80191

Cherry-pick cbc3dd997e
Original commit message:

    src, tools: add check for left leaning pointers

    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>

Refs: cbc3dd997e

Cherry-pick 902998190a
Original commit message:

    tools: fix cpplint.py header rules

    THIS COMMIT SHOULD GO WITH THE NEXT. IT WILL FIND NEW LINT.

    PR-URL: https://github.com/nodejs/node/pull/26306
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

Refs: 902998190a

PR-URL: https://github.com/nodejs/node/pull/27098
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-08 08:30:24 -04:00
Refael Ackermann
1302e0174a tools: bump cpplint.py to 1.4.4
Refs: https://github.com/cpplint/cpplint/releases/tag/1.4.4

PR-URL: https://github.com/nodejs/node/pull/27098
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-04-08 08:30:18 -04:00
Vse Mozhet Byt
1afec97130 doc: link bigint type to MDN instead of proposal
PR-URL: https://github.com/nodejs/node/pull/27101
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-07 22:50:35 +03:00
Joyee Cheung
de23055536
lib: remove env: node in eslint config for lib files
This patch removes the redundant `require-globals` custom
eslint rule by removing `env: node` in the eslint config
and whitelist the globals that can be accessed in native
modules instead of black listing them. This makes sense
for our `lib/` files because here we are creating the
Node.js environment instead of running in a normal user
land Node.js environment.

PR-URL: https://github.com/nodejs/node/pull/27082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-04-06 12:04:36 +08:00
gengjiawen
d0e2650d03 src: add NOLINT to js_native_.*
* add filter to not lint NOLINT rules

PR-URL: https://github.com/nodejs/node/pull/26884
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-04-05 08:59:00 -04:00
Ben Noordhuis
608878c956
build: fix inspector dependency resolution
It was reported that parallel builds on Windows sometimes error because
of missing intermediate files.

On closer inspection I noticed that some files are copied from src/ to
the intermediate build directory in a way where they don't participate
in dependency resolution. Put another way, the build system doesn't
know to wait for the copy to complete because we don't tell it to.

Fix that by not copying around files but instead making the script that
processes them a little smarter about where to find them and where to
store the results.

PR-URL: https://github.com/nodejs/node/pull/27026
Fixes: https://github.com/nodejs/node/issues/27025
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-04 16:02:23 +02:00
Joyee Cheung
e1d55a0cbc
src: port bootstrap/cache.js to C++
This allows us to query the categories of modules in C++
so we can implement the code cache generator in C++ that
does not depend on a Node.js binary.

PR-URL: https://github.com/nodejs/node/pull/27046
Refs: https://github.com/nodejs/node/issues/21563
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-04-04 11:16:10 +08:00
Richard Lau
8bfce89926 tools: fix test.py --time
PR-URL: https://github.com/nodejs/node/pull/27007
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-04-02 08:34:23 -04:00
cjihrig
bf347f537a
tools: update ESLint to 5.16.0
Update ESLint to 5.16.0

PR-URL: https://github.com/nodejs/node/pull/27005
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-04-01 09:11:00 -04:00
Refael Ackermann
d379e453e2 build,win: silence MSVC warning C4129 for V8
Currently we get 13,799 of those per build

PR-URL: https://github.com/nodejs/node/pull/27017
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-31 09:41:01 -04:00
Daijiro Wachi
ef0701d31f
tools: update dependencies in lint-md-cli-rollup
Summary
+ Update `@zeit/ncc` to `^0.16.1` from `^0.15.2`
+ Update `unified-engine` to `^6.0.1` from `^5.1.0`
+ Run `npm audit fix`
+ Run `npm run build-node`

Refs:
+ https://github.com/unifiedjs/unified-engine/releases/tag/6.0.0
+ https://github.com/unifiedjs/unified-engine/releases/tag/6.0.1
+ https://github.com/zeit/ncc/releases/tag/0.16.0
+ https://github.com/zeit/ncc/releases/tag/0.16.1

PR-URL: https://github.com/nodejs/node/pull/26889
Refs: https://github.com/unifiedjs/unified-engine/releases/tag/6.0.0
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-03-30 13:22:03 +01:00
Refael Ackermann
3b5773fee3 build,deps: move gypfiles out 2/2 - moving
* move all used files to `tools/v8_gypfiles` directory
* fix references in node configuration

PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-28 16:39:16 -04:00
Refael Ackermann
fff922afee deps,build: compute torque_outputs in v8.gyp
PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-28 16:39:00 -04:00
Ruben Bridgewater
b08a867d60
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-27 17:20:06 +01:00
cclauss
6df9f84f61 tools: windows_boxstarter "choco install python -y" for Python 3
PR-URL: https://github.com/nodejs/node/pull/26424
Refs: https://github.com/nodejs/node/issues/25789#issuecomment-469238697
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-26 17:59:16 -04:00
gengjiawen
8209caec39 tools: remove eslint rule no-let-in-for-declaration
PR-URL: https://github.com/nodejs/node/pull/26715
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-26 09:46:41 -07:00
cjihrig
2b89ac6818
tools: update ESLint to 5.15.3
Update ESLint to 5.15.3

PR-URL: https://github.com/nodejs/node/pull/26746
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-03-23 12:02:40 -04:00
cjihrig
1ceb6d8e9b tools: update ESLint to 5.15.2
Update ESLint to 5.15.2

PR-URL: https://github.com/nodejs/node/pull/26687
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-03-18 07:25:31 +01:00
Rich Trott
72f578327a tools: update lint-md.js to lint rfc name format
Update lint-md.js to lint for "RFC1234" and similar variants that should
be written as "RFC 1234".

PR-URL: https://github.com/nodejs/node/pull/26727
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2019-03-17 23:14:22 -07:00
Rich Trott
2f9c9eebb4 tools: tidy function arguments in eslint rules
Remove unused arguments from function invocations in ESLint custom
rules.

PR-URL: https://github.com/nodejs/node/pull/26668
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-16 20:00:55 -07:00
Ujjwal Sharma
e0b3de1e90
deps: bump minimum icu version to 63
Bump minimum version of ICU needed to build node to 63.

Refs: 30a350f298
Co-authored-by: Steven R Loomis <srloomis@us.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/25852
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
2019-03-14 18:51:07 +01:00
James M Snell
5f38797ea5
v8: integrate node-heapdump into core
Adds `v8.writeHeapSnapshot(filename)` with impl adapted
from the `node-heapdump` module.

Also, adds a v8.getHeapSnapshot() alternative that returns
a Readable Stream

PR-URL: https://github.com/nodejs/node/pull/26501
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-03-13 15:50:32 +00:00
Refael Ackermann
902998190a tools: fix cpplint.py header rules
THIS COMMIT SHOULD GO WITH THE NEXT. IT WILL FIND NEW LINT.

PR-URL: https://github.com/nodejs/node/pull/26306
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-03-12 09:56:59 -04:00
Rod Vagg
0d94c23c49 deps,tools: include SipHash in LICENSE
PR-URL: https://github.com/nodejs/node/pull/26367
Refs: https://github.com/nodejs/node/issues/23259
Refs: https://darksi.de/12.hashwick-v8-vulnerability/
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-03-12 13:10:54 +11:00
cjihrig
2176d63055
tools: update ESLint to 5.15.1
Update ESLint to 5.15.1

PR-URL: https://github.com/nodejs/node/pull/26447
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-10 17:20:49 -04:00
Sam Ruby
cba2c7a874 tools: update to mdast-util-to-hast v3.0.2
See https://github.com/syntax-tree/mdast-util-to-hast/pull/21

Note: I updated all of the tools/doc dependencies, not just this one,
and removed the previous workaround that was in place until this change
landed.

PR-URL: https://github.com/nodejs/node/pull/22140
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-10 10:26:29 -04:00
Ruben Bridgewater
f8763bb077
benchmark,doc,lib,test: capitalize comments
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-03-10 00:44:40 +01:00
Refael Ackermann
1acf3b155f tools: update generated lint-md.js
PR-URL: https://github.com/nodejs/node/pull/26441
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-08 19:02:41 -05:00
Refael Ackermann
8da6cec203 tools: update node-lint-md-cli-rollup version 2
PR-URL: https://github.com/nodejs/node/pull/26441
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2019-03-08 19:02:41 -05:00
Rich Trott
254635198a tools: use dmn@2.2.1 to remove unneeded files
PR-URL: https://github.com/nodejs/node/pull/26462
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-03-07 20:48:53 -08:00
Rich Trott
83c06d8f7b tools: update dmn to 2.2.1 in update scripts
dmn 2.2.1 cleans more files than earlier versions.

PR-URL: https://github.com/nodejs/node/pull/26462
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-03-07 20:48:50 -08:00
Yang Guo
ede1a7ceb4 tools: fix test.py --shell
This fixes the necessary plumbing to make the --shell argument
have its intended effect.

PR-URL: https://github.com/nodejs/node/pull/26449
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-08 04:03:52 +01:00
Rich Trott
9f2bde5da5 tools: update remark-preset-lint-node to 1.5.0
This update includes an additional check for `End-of-life`. For
consistency, we use `End-of-Life` everywhere.

PR-URL: https://github.com/nodejs/node/pull/26442
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-03-06 15:50:46 -08:00
shisama
70beb76f92
tools: add no-var lint rule for tools directory
PR-URL: https://github.com/nodejs/node/pull/26398
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-07 00:35:02 +01:00
Masashi Hirano
ce8f01cf0c
tools: replace var to let/const
PR-URL: https://github.com/nodejs/node/pull/26398
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-07 00:35:01 +01:00
Anna Henningsen
713046d9eb
tools: add mailmap support for Co-authored-by tags
Support `.mailmap` for manually added `Author:` and
`Co-authored-by:` tags.

PR-URL: https://github.com/nodejs/node/pull/26383
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2019-03-06 00:04:55 +01:00
Rich Trott
20c2ca8cc9 tools: apply stricter linting to tools directory
Enable ESLint rules for trailing commas and arrow callbacks in tools
directory. These rules are also in place in the benchmark directory.

PR-URL: https://github.com/nodejs/node/pull/26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-04 11:06:42 -08:00
Rich Trott
5fa642a917 tools: refactor tools JS code
* standardize on arrow functions for callbacks
* standaradize on trailing commas for multiline arrays

PR-URL: https://github.com/nodejs/node/pull/26394
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-04 11:06:23 -08:00
Pavel Feldman
d775d74698 tools: roll inspector_protocol to f67ec5
Fixes: https://github.com/nodejs/node/issues/25808

PR-URL: https://github.com/nodejs/node/pull/26303
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-04 11:44:49 -05:00
Guy Bedford
b2abda9ba0 bootstrap: experimental --frozen-intrinsics flag
PR-URL: https://github.com/nodejs/node/pull/25685
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-04 16:34:33 +02:00
Jon Kunkee
26cfaf4c18 win,build: update Windows build documentation
PR-URL: https://github.com/nodejs/node/pull/25995
Reviewed-By: João Reis <reis@janeasystems.com>
2019-03-04 12:25:39 +00:00
Rich Trott
d3d79d9f86 tools: rebuild lint-md.js
Update lint-md.js from updated rollup modules.

PR-URL: https://github.com/nodejs/node/pull/26393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-03 22:27:16 -08:00
Rich Trott
d9536f73e5 tools: update node-lint-md-cli-rollup lockfile
This includes an update for chownr from 1.0.1 to 1.1.1, which means a
fix for the issue described in
https://github.com/isaacs/chownr/issues/14. While not a
user-facing issue, it seems like a good idea to patch promptly anyway.

PR-URL: https://github.com/nodejs/node/pull/26393
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-03 22:27:13 -08:00
cjihrig
17b7fa75c3
tools: update ESLint to 5.15.0
Update ESLint to 5.15.0

PR-URL: https://github.com/nodejs/node/pull/26391
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-03 22:04:24 -05:00
Rich Trott
60a148ad2e tools: update extend to 3.0.2
Update `extend` to 3.0.2 as 3.0.1 is susceptible to a low-severity
security issue.

Refs: https://snyk.io/vuln/npm:extend:20180424

PR-URL: https://github.com/nodejs/node/pull/26392
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-02 18:58:09 -08:00
Rich Trott
536e062c2c
tools: update babel-eslint to 10.0.1
Update babel-eslint to 10.0.1.

PR-URL: https://github.com/nodejs/node/pull/26347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-02 14:05:15 +01:00
Rich Trott
f11e8b959d tools: update eslint-plugin-markdown to 1.0.0
For eslint-plugin-markdown, we had been using an RC but can now use the
most recent stable release of 1.0.0, as it has the bugfix that caused us
to start using the RC in the first place.

There are a few other updates in this commit too because it was
performed by running `update-eslint.sh`. This did not update ESLint
itself but did update some dependencies.

PR-URL: https://github.com/nodejs/node/pull/26345
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-01 22:55:28 -08:00
Rich Trott
e0c39218d9 tools: use latest rather than next for markdown linting plugin
eslint-plugin-markdown is being installed @next to get a bugfix for
https://github.com/eslint/eslint-plugin-markdown/issues/69 but that
bugfix is in 1.0.0. Go back to installing @latest rather than @next.

PR-URL: https://github.com/nodejs/node/pull/26345
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-01 22:55:09 -08:00
Ruben Bridgewater
9edce1e12a
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments.

PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2019-02-28 18:31:10 +01:00
gengjiawen
8137668c53 src: apply clang-tidy rule modernize-deprecated-headers
PR-URL: https://github.com/nodejs/node/pull/26159
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-27 05:35:53 +01:00
Rich Trott
ccd6b12fec tools: update markdown linter
Update remark-preset-lint-node to 1.4.0. This adds `End-Of-Life` as a
prohibited string, favoring `End-of-Life` for consistency.

Refs: https://github.com/nodejs/node/pull/26251

PR-URL: https://github.com/nodejs/node/pull/26281
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-25 19:37:38 -08:00
Richard Lau
4804a18812 build: tidy up comments in create_expfile.sh
Fixes spelling, adds punctuation and rewords some sentences for
readability in the comments of `tools/create_expfile.sh`.

PR-URL: https://github.com/nodejs/node/pull/26220
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-22 12:42:32 -05:00
Jon Kunkee
dec3dadd32 deps: backport ICU fix for ARM64 Windows
ICU 63 as ingested by Node.js does not quite support ARM64 Windows
because its OBJ file IMAGE_FILE_MACHINE_TYPE field logic defaults to
x86 instead of Unknown. This change backports the ICU 64.1 fix for
this.

ICU Issue: https://unicode-org.atlassian.net/browse/ICU-20382
ICU Commit: unicode-org/icu@11e538b

PR-URL: https://github.com/nodejs/node/pull/26090
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-20 19:32:32 -05:00
cjihrig
14c089b50e
tools: update ESLint to 5.14.1
Update ESLint to 5.14.1

PR-URL: https://github.com/nodejs/node/pull/26190
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-02-20 12:25:10 -05:00
cjihrig
77b39c2eb2
tools: update ESLint to 5.14.0
Update ESLint to 5.14.0

PR-URL: https://github.com/nodejs/node/pull/26142
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2019-02-17 21:56:18 -05:00
Yang Guo
d1d9daba46
test: add --test-root option to test.py
This way we can specify a custom path for the test folder, e.g.
when building addons separately from the source tree.

PR-URL: https://github.com/nodejs/node/pull/26093
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-17 18:57:12 +01:00
Refael Ackermann
6ac80f0e2b build,src: add PCH to node.gypi
PR-URL: https://github.com/nodejs/node/pull/25931
Reviewed-By: João Reis <reis@janeasystems.com>
2019-02-14 15:14:44 -05:00
Refael Ackermann
cd5c7bf240 build,deps: use PCH also for v8_initializers
* rename files to represent reuse

PR-URL: https://github.com/nodejs/node/pull/25931
Reviewed-By: João Reis <reis@janeasystems.com>
2019-02-14 15:14:42 -05:00
Refael Ackermann
82b798907d build,tools: add more headers to V8 PCH file
* Use relative path for easy reuse in other projects

PR-URL: https://github.com/nodejs/node/pull/25931
Reviewed-By: João Reis <reis@janeasystems.com>
2019-02-14 15:14:41 -05:00
Vse Mozhet Byt
0a4c69a5c5 doc: fix some nits in perf_hooks
PR-URL: https://github.com/nodejs/node/pull/26022
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-12 05:14:57 +02:00
James M Snell
bcdd228f90
perf_hooks: implement histogram based api
Add a sampling-based event loop delay monitor.

```js
const { monitorEventLoopDelay } = require('perf_hooks');

const h = monitorEventLoopDelay();

h.enable();

h.disable();

console.log(h.percentiles);
console.log(h.min);
console.log(h.max);
console.log(h.mean);
console.log(h.stddev);
console.log(h.percentile(50));
```

PR-URL: https://github.com/nodejs/node/pull/25378
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-08 09:20:18 -08:00
Michaël Zasso
582c12260e
deps: update acorn to 6.0.7
acorn and acorn-walk are now published as two different packages. Put
them both in subdirectories of `deps/acorn`.
Adapt the REPL's recoverable error detection to use the new API for
extending acorn parsers.

PR-URL: https://github.com/nodejs/node/pull/25844
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-02-08 15:34:10 +01:00
Robin Neatherway
106dd1e345 lib: fix a few minor issues flagged by lgtm
* Confusing (but correct) regex using `A-z` character range by
  accident
* Add the status argument to afterShutdown

PR-URL: https://github.com/nodejs/node/pull/25873
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2019-02-06 11:09:29 -05:00
Yang Guo
dfe5f8f288 test: do not fail SLOW tests if they are not slow
PR-URL: https://github.com/nodejs/node/pull/25868
Refs: https://github.com/nodejs/node/issues/25867
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
2019-02-04 11:46:29 -05:00
Rich Trott
7540f9dbe8 tools: update ESLint to 5.13.0
PR-URL: https://github.com/nodejs/node/pull/25877
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-02-03 16:46:26 -08:00
Rich Trott
b322b76dad tools: update dmn in update-estlint.sh
Version 2.1.0 of dmn will get rid of .map and .ts files.

PR-URL: https://github.com/nodejs/node/pull/25877
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
2019-02-03 16:46:19 -08:00
Sakthipriyan Vairamani (thefourtheye)
5e0a3261f0
tools: make test.py Python 3 compatible
PR-URL: https://github.com/nodejs/node/pull/25767
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: cclauss <cclauss@me.com>
Reviewed-By: gengjiawen <technicalcute@gmail.com>
2019-02-02 00:24:54 +01:00
Joyee Cheung
c2359bdad6
process: expose process.features.inspector
Instead of using process.config.variables.v8_enable_inspector
to detect whether inspector is enabled in the build.

PR-URL: https://github.com/nodejs/node/pull/25819
Refs: https://github.com/nodejs/node/issues/25343
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 05:41:45 +08:00
Daniel Bevenius
f4510c4148 test, tools: suppress addon function cast warnings
Currently, there are a number of compiler warnings generated when
building the addons on Linux, for example:

make[1]: Entering directory '/node/test/addons/zlib-binding/build'
  CXX(target) Release/obj.target/binding/binding.o
  SOLINK_MODULE(target) Release/obj.target/binding.node
  COPY Release/binding.node
make[1]: Leaving directory '/node/test/addons/zlib-binding/build'
In file included from ../binding.cc:1:
/node/src/node.h:515:51: warning:
cast between incompatible function types from
'void (*)(v8::Local<v8::Object>,
          v8::Local<v8::Value>,
          v8::Local<v8::Context>)' to
'node::addon_context_register_func' {aka
'void (*)(v8::Local<v8::Object>,
          v8::Local<v8::Value>,
          v8::Local<v8::Context>,
          void*)'} [-Wcast-function-type]
(node::addon_context_register_func) (regfunc), \
					   ^
/node/src/node.h:533:3:
note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../binding.cc:58:1:
note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
 NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME, Initialize)
 ^~~~~~~~~~~~~~~~~~~~~~~~~

This commit adds the flag -Wno-cast-function-type to suppress these
warnings. With this change the warnings are not displayed anymore and
the output matches that of osx when running
'make -j8 test/addons/.buildstamp'.

PR-URL: https://github.com/nodejs/node/pull/25663
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-01 14:08:20 +01:00
Refael Ackermann
4d193008d7 tools: refloat Node.js patches to cpplint.py
* Preserve 3 node-core checks
* Preserve patch to `FileInfo.RepositoryName`
* Remove TAP to logfile (unused)

PR-URL: https://github.com/nodejs/node/pull/25771
Fixes: https://github.com/nodejs/node/issues/25760
Refs: 3d8f6f876d/cpplint.py
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-30 18:19:52 -05:00
Refael Ackermann
3dca9e0a57 tools: bump cpplint.py to 3d8f6f876d
PR-URL: https://github.com/nodejs/node/pull/25771
Fixes: https://github.com/nodejs/node/issues/25760
Refs: 3d8f6f876d/cpplint.py
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-30 18:19:45 -05:00
Michael Dawson
c06653efdb test: enable marking of failing coverage tests
Enable marking of coverage tests so that we can
allow some tests to fail without blocking the generation
of coverage data. This will later allow us to
fail the coverage job if other kinds of errors occur and
to capture which tests we believe are not running properly
with coverage enabled.

PR-URL: https://github.com/nodejs/node/pull/25671
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-01-29 08:18:06 +01:00
gengjiawen
08100bf632
tools: make test.py Queue part Python 3 compatible
Signed-off-by: gengjiawen <technicalcute@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/25701
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-01-29 00:21:01 +01:00
Sakthipriyan Vairamani (thefourtheye)
48149876dd tools: make mkssldef.py Python 3 compatible
This patch replaces the usage of `map` in such a way that it will be
compatible with Python 3.

PR-URL: https://github.com/nodejs/node/pull/25584
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-28 12:24:38 +01:00
Sakthipriyan Vairamani (thefourtheye)
b31b84d312 build: make compress_json python3 compatible
This patch replaces a usage of `map` with list comprehension,
which makes the script Python 3 compatiable.

PR-URL: https://github.com/nodejs/node/pull/25582
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-01-28 10:46:56 +01:00
Sakthipriyan Vairamani (thefourtheye)
907ff0a47d build: make install.py python 3 compatiable
This patch replaces usage of `filter` in such a way that it will be
compatible with Python 3. Also, this patch replaces the usage of `map`
to do a side-effect work with normal `for` loop.

PR-URL: https://github.com/nodejs/node/pull/25583
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2019-01-23 05:45:31 +01:00
Anna Henningsen
9e9890a8ff
tools: improve valgrind support
- Generate and use a list of suppressions that reduce noisiness for
  known (non-)issues.
- Use `--zero-fill-buffers` for tests, as they sometimes use
  `Buffer.allocUnsafe()` and valgrind reports that as usage
  of uninitialized memory.

PR-URL: https://github.com/nodejs/node/pull/25498
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-21 20:16:14 +01:00
cjihrig
af102c6d27
tools: update ESLint to 5.12.1
Update ESLint to 5.12.1

PR-URL: https://github.com/nodejs/node/pull/25573
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2019-01-20 20:31:03 -05:00
cjihrig
cf9bcdeabe
tools: lint for use of internalBinding()
Use of process.binding() has largely been replaced by
internalBinding(). This commit updates the custom crypto
check ESLint rule to check for both process.binding() and
internalBinding().

Refs: https://github.com/nodejs/node/pull/24952
PR-URL: https://github.com/nodejs/node/pull/25395
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-01-11 16:17:33 -05:00
Vse Mozhet Byt
c69ea3b1d5 doc: fix, unify, formalize, and amplify vm.md
`vm` module API heavily reuses common code, but the doc seems
to be a bit out of date: some options are listed in wrong places,
some options and history entries are missed.

Also some fragments need to be formalized and unified.

PR-URL: https://github.com/nodejs/node/pull/25422
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-01-11 22:21:44 +02:00
cjihrig
4c9ea8f3fb tools: update crypo check rule
This commit updates the custom crypto-check ESLint rule to
detect require() calls that come before any hasCrypto
checks.

PR-URL: https://github.com/nodejs/node/pull/25399
Refs: https://github.com/nodejs/node/pull/25388
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-11 10:56:56 +01:00
Daniel Bevenius
a55cddd8ce tools: add openssl-cli to macos-firewall.sh
Currently, there is a new popup asking to accept incoming connections
for openssl-cli when running tests on macos. I believe the reason
for this not being noticed before is that test-tls-securepair-client.js
was moved recently from the pummel directory to sequential.

This commit adds openssl-cli to the firewall script.

PR-URL: https://github.com/nodejs/node/pull/25385
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-11 05:29:22 +01:00
Anna Henningsen
63d4cae009
worker: remove --experimental-worker flag
Having an experimental feature behind a flag makes change
if we are expecting significant breaking changes to its API.

Since the Worker API has been essentially stable since
its initial introduction, and no noticeable doubt about
possibly not keeping the feature around has been voiced,
removing the flag and thereby reducing the barrier to experimentation,
and consequently receiving feedback on the implementation,
seems like a good idea.

PR-URL: https://github.com/nodejs/node/pull/25361
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-01-09 00:31:33 +01:00
Vse Mozhet Byt
27a03b84c4 doc: make modules.md more accurate
PR-URL: https://github.com/nodejs/node/pull/25357
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-01-08 01:16:51 +02:00
cjihrig
ec5884a94f
tools: update ESLint to 5.12.0
Update ESLint to 5.12.0.

PR-URL: https://github.com/nodejs/node/pull/25347
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2019-01-07 08:49:17 -05:00
Anna Henningsen
b91093f0e5
doc: add documentation for brotli support
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:48 +01:00
Hackzzila
b857d713f5
deps,tools: update license-builder.sh and LICENSE
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2019-01-05 21:36:45 +01:00
Thomas Chung
ee592c3562
test: set umask explicitly
Some tests which create files and check file permissions assume the
umask is compatible with 022, and break when set to something like 007.
Explicitly set umask to 022

PR-URL: https://github.com/nodejs/node/pull/25213
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-02 15:01:38 +01:00
Ujjwal Sharma
48a88c824f doc: include license for src/large_pages in LICENSE
Include License for src/large_pages (MIT licensed by Intel), to the main
LICENSE file and make required changes to the tools/license-builder.sh
script.

Fixes: https://github.com/nodejs/node/issues/25238

PR-URL: https://github.com/nodejs/node/pull/25246
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-30 19:43:35 -08:00
Juan José Arboleda
a2f81df5a7 tools: replace NULL with nullptr
PR-URL: https://github.com/nodejs/node/pull/25179
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-30 19:38:07 -08:00
cjihrig
ad10cc57ee
tools: remove custom buffer-constructor lint rule
This rule is no longer needed. ESLint's built in
no-buffer-constructor rule is enabled instead.

PR-URL: https://github.com/nodejs/node/pull/25261
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-30 19:17:44 -05:00
Anna Henningsen
4100001624
lib: remove unintended access to deps/
This brings DEP0084 to End-of-Life. It is unlikely that this
has received much public usage in the first place, so removing
should be okay.

PR-URL: https://github.com/nodejs/node/pull/25138
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-12-30 20:17:19 +01:00
cjihrig
1d3a414519
tools: update ESLint to 5.11.1
Update ESLint to 5.11.1.

PR-URL: https://github.com/nodejs/node/pull/25236
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-29 13:36:31 -05:00
cjihrig
db2b612614
tools: update ESLint to 5.11.0
Update ESLint to 5.11.0.

PR-URL: https://github.com/nodejs/node/pull/25191
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-25 00:06:33 -05:00
Rich Trott
0fffd47f26 tools: alphabetize IGNORED_SUITES in tools/test.py
PR-URL: https://github.com/nodejs/node/pull/25182
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-24 06:12:32 -08:00
Tobias Nießen
823d86c47c crypto: add key object API
This commit makes multiple important changes:

1. A new key object API is introduced. The KeyObject class itself is
   not exposed to users, instead, several new APIs can be used to
   construct key objects: createSecretKey, createPrivateKey and
   createPublicKey. The new API also allows to convert between
   different key formats, and even though the API itself is not
   compatible to the WebCrypto standard in any way, it makes
   interoperability much simpler.

2. Key objects can be used instead of the raw key material in all
   relevant crypto APIs.

3. The handling of asymmetric keys has been unified and greatly
   improved. Node.js now fully supports both PEM-encoded and
   DER-encoded public and private keys.

4. Conversions between buffers and strings have been moved to native
   code for sensitive data such as symmetric keys due to security
   considerations such as zeroing temporary buffers.

5. For compatibility with older versions of the crypto API, this
   change allows to specify Buffers and strings as the "passphrase"
   option when reading or writing an encoded key. Note that this
   can result in unexpected behavior if the password contains a
   null byte.

PR-URL: https://github.com/nodejs/node/pull/24234
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-24 14:50:16 +01:00
Sam Roberts
3535a8705a
tools: update certdata.txt
This is the certdata.txt[0] from NSS 3.41, released on 2018-12-03.

This is the version of NSS that will ship in Firefox 65 on 2018-12-11.

[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_41_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: https://github.com/nodejs/node/pull/25113
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-21 15:54:41 +01:00
Joyee Cheung
0858e5d9d8
src: always compile and store code cache for native modules
This patch changes the NativeModuleLoader to always try to find
code cache for native modules when it compiles them, and always
produce and store the code cache after compilation. The cache
map is protected by a mutex and can be accessed by different
threads - including the worker threads and the main thread. Hence any
thread can reuse the code cache if the native module has already
been compiled by another thread - in particular the cache of the
bootstrappers and per_context.js will always be hit when a new thread
is spun.

This results in a ~6% startup overhead in the worst case
(when only the main thread is launched without requiring any additional
native module - it now needs to do the extra work of finding and
storing caches), which balances out the recent improvements by moving
the compilation to C++, but it also leads to a ~60% improvement in
the best case (when a worker thread is spun and requires a lot of native
modules thus hitting the cache compiled by the main thread).

PR-URL: https://github.com/nodejs/node/pull/24950
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-18 18:02:11 +08:00
Joyee Cheung
ceb6635223
src: remove code cache integrity check
In preparation of sharing code cache among different threads -
we simply rely on v8 to reject invalid cache, since there isn't
any serious consequence when the cache is invalid anyway.

PR-URL: https://github.com/nodejs/node/pull/24950
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-18 18:02:08 +08:00
Joyee Cheung
9190e4ecdf tools: make apilinks building more robust
1. Move the apilinks.json file into out/doc so it gets cleaned when
  running `make docclean`
2. When the apilinks.json generated is empty, throw a specific error
  so it's easier to understand what's wrong
3. Write to a file passed through CLI arguments instead writing to
  stdout in apilinks.js so the build process is more robust in
  the case of a bad binary

PR-URL: https://github.com/nodejs/node/pull/25019
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-18 05:14:24 +01:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments
above 50 characters.

PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-12-17 17:14:35 +01:00
cclauss
50cf6e7ddf test: do not lint macros files (again)
PR-URL: https://github.com/nodejs/node/pull/24886
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-11 12:16:40 +01:00
cclauss
ad7ddfbca1 tools: prepare ./tools/compress_json.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24889
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-10 19:46:50 -08:00
cclauss
5906530834 tools: prepare tools/testp.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24890
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-12-10 15:32:16 -08:00
Joyee Cheung
44a5fe1457
process: specialize building and storage of process.config
Instead of treating config.gypi as a JavaScript file, specialize
the processing in js2c and make the serialized result a real JSON
string (with 'true' and 'false' converted to boolean values) so
we don't have to use a custom deserializer during bootstrap.

In addition, store the JSON string separately in NativeModuleLoader,
and keep it separate from the map of the builtin source code, so
we don't have to put it onto `NativeModule._source` and delete it
later, though we still preserve it in `process.binding('natives')`,
which we don't use anymore.

This patch also makes the map of builtin source code and the
config.gypi string available through side-effect-free getters
in C++.

PR-URL: https://github.com/nodejs/node/pull/24816
Reviewed-By: Gus Caplan <me@gus.host>
2018-12-11 06:40:09 +08:00
cclauss
a91293d4d9 tools: prepare tools/icu/icutrim.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24888
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-12-10 08:37:54 -08:00
Ruben Bridgewater
1f85ea979c
tools: capitalize sentences
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-12-10 17:07:18 +01:00
cjihrig
cc8250fab8
tools: update ESLint to 5.10.0
Update ESLint to 5.10.0.

PR-URL: https://github.com/nodejs/node/pull/24903
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-12-10 08:47:26 -05:00
cclauss
26b58eabc6
tools: prepare tools/js2c.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24798
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-07 17:55:24 +01:00
cclauss
7468c56742 tools: prepare tools/specialize_node_d.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24797
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-06 22:45:08 -08:00
cclauss
29204f4ebc tools: prepare tools/test.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24799
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-12-07 07:22:52 +01:00
cclauss
ae3ee28abd tools: prepare tools/genv8constants.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24801
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-06 10:36:54 -08:00
cclauss
b8fbe69db1
tools: prepare tools/install.py for Python 3
PR-URL: https://github.com/nodejs/node/pull/24800
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-12-06 10:30:04 +01:00
Refael Ackermann
2fab5d552e build,win: pack the install-tools scripts for dist
PR-URL: https://github.com/nodejs/node/pull/24233
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-12-05 18:58:30 -08:00
Rich Trott
630fed8f07 tools: replace rollup with ncc
Replace rollup + plugins + config file with zeit/ncc package designed to
do the particular task that we're leveraging rollup for but with
zero-ish configuration. (rollup can do a whole lot more, but we're using
a tiny portion of its functionality.)

PR-URL: https://github.com/nodejs/node/pull/24813
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-12-05 14:02:17 -08:00
João Reis
76afdffdf4 win: do not use Boxstarter to install tools
Use Chocolatey directly in the tools installation script.

PR-URL: https://github.com/nodejs/node/pull/24677
Fixes: https://github.com/nodejs/node/issues/23838
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-05 20:54:06 +00:00
Gabriel Schulhof
938e11882b test: partition N-API tests
Partition test/addons-napi into test/js-native-api and test/node-api to
isolate the Node.js-agnostic portion of the N-API tests from the
Node.js-specific portion.

PR-URL: https://github.com/nodejs/node/pull/24557
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-12-04 13:58:17 -08:00
Ruben Bridgewater
5b90902b8b build: add line break as soon tests are done
PR-URL: https://github.com/nodejs/node/pull/24748
Refs: https://github.com/nodejs/node/pull/24486
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03 07:20:25 +01:00
Ruben Bridgewater
3099647902 build: fix line length off by one error
While running the test suite the progress bar shows former line
endings if the new line is shorter than the former line. The length
was calculated without the line ending. It is now an empty string
to prevent the off by one error instead of using extra whitespace.

PR-URL: https://github.com/nodejs/node/pull/24748
Refs: https://github.com/nodejs/node/pull/24486
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-12-03 07:20:13 +01:00
Rod Vagg
76faccccbb tools: don't use GH API for commit message checks
Fixes: https://github.com/nodejs/node/issues/24567

PR-URL: https://github.com/nodejs/node/pull/24574
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-11-30 23:09:41 -08:00
Rod Vagg
f34ca9f783 tools: only sign release if promotion successful
Ref: https://github.com/nodejs/build/pull/1596

PR-URL: https://github.com/nodejs/node/pull/24669
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-30 21:23:01 -08:00
Rod Vagg
84c2157a60 tools: check for git tag before promoting release
PR-URL: https://github.com/nodejs/node/pull/24670
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-30 21:22:04 -08:00
Bartosz Sosnowski
9920dbcaf3 build, tools, win: add .S files support to GYP
Makes GYP properly handle .S files.

Fixes: https://github.com/nodejs/node-v8/issues/89

PR-URL: https://github.com/nodejs/node/pull/24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-29 11:09:03 +01:00
Daijiro Wachi
8ce0d4fdf1 tools: update remark-preset-lint-node to v1.3.1
PR-URL: https://github.com/nodejs/node/pull/24642
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-28 06:53:32 -08:00
Rich Trott
6f64cda1ee tools,doc: fix version picker bug in html.js
The processing of strings like `8.x` into a major version number and a
minor version number results in minor versions that are `NaN`. In that
situation, since the picker will link to the latest docs in the
major version, include the version in the version picker.

Fixes: https://github.com/nodejs/node/issues/23979
PR-URL: https://github.com/nodejs/node/pull/24638
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-27 19:14:54 -08:00
cclauss
b507783bc1 tools: use print() function on both Python 2 and 3
PR-URL: https://github.com/nodejs/node/pull/24486
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-11-25 18:58:58 -05:00
Guy Bedford
1d3e40d9aa build: fix Python detection when depot_tools are in PATH in Windows
PR-URL: https://github.com/nodejs/node/pull/22539
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-11-21 13:02:28 -08:00
Timothy Gu
2a7432dade readline: add support for async iteration
Co-authored-by: Ivan Filenko <ivan.filenko@protonmail.com>
Fixes: https://github.com/nodejs/node/issues/18603
Refs: https://github.com/nodejs/node/pull/18904
PR-URL: https://github.com/nodejs/node/pull/23916
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-11-20 15:41:16 -08:00
Joyee Cheung
7778c035a0
src: use STL containers instead of v8 values for static module data
Instead of putting the source code and the cache in v8::Objects,
put them in per-process std::maps. This has the following benefits:

- It's slightly lighter in weight compared to storing things on the
  v8 heap. Also it may be slightly faster since the preivous v8::Object
  is already in dictionary mode - though the difference is very small
  given the number of native modules is limited.
- The source and code cache generation templates are now much simpler
  since they just initialize static arrays and manipulate STL
  constructs.
- The static native module data can be accessed independently of any
  Environment or Isolate, and it's easy to look them up from the
  C++'s side.
- It's now impossible to mutate the source code used to compile
  native modules from the JS land since it's completely separate
  from the v8 heap. We can still get the constant strings from
  process.binding('natives') but that's all.

A few drive-by fixes:

- Remove DecorateErrorStack in LookupAndCompile - We don't need to
  capture the exception to decorate when we encounter
  errors during native module compilation, as those errors should be
  syntax errors and v8 is able to decorate them well. We use
  CompileFunctionInContext so there is no need to worry about
  wrappers either.
- The code cache could be rejected when node is started with v8 flags.
  Instead of aborting in that case, simply keep a record in the
  native_module_without_cache set.
- Refactor js2c.py a bit, reduce code duplication and inline Render()
  to make the one-byte/two-byte special treatment easier to read.

PR-URL: https://github.com/nodejs/node/pull/24384
Fixes: https://github.com/Remove
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-20 01:17:15 +08:00
Rich Trott
3cac82f55e tools: update to remark-lint-preset-node@1.2.0
Adds linting for number of spaces after a list indicator. (Expects
exactly 1 space.)

PR-URL: https://github.com/nodejs/node/pull/24391
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-11-18 23:50:08 -08:00
Daniel Bevenius
23e692813f test: skip test that use --tls-v1.x flags
Currently, configuring --without-ssl will cause the following test to
fail:

=== release test-https-agent-additional-options ===
Path: parallel/test-https-agent-additional-options
out/Release/node: bad option: --tls-v1.1
Command: out/Release/node --tls-v1.1
  /node/test/parallel/test-https-agent-additional-options.js

=== release test-https-agent-session-eviction ===
Path: parallel/test-https-agent-session-eviction
out/Release/node: bad option: --tls-v1.0

Command: out/Release/node --tls-v1.0
  /node/test/parallel/test-https-agent-session-eviction.js

This commit adds a check for the --tls-v.x flags and skips them if node
was built without crypto support.

PR-URL: https://github.com/nodejs/node/pull/24376
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2018-11-18 13:26:08 +01:00
Gabriel Schulhof
596bd5f1bb src: factor out Node.js-agnostic N-APIs
Split the Node.js ECMAScript API (N-EAPI?) into its own header and
implementation files. The motivation is that the ECMAScript API stand
on its own so it might be embedded separately, implementation and all.

Portions of the implementation used by both files are stored in
`node_api_impl.h`.

The checked boxes below indicate that the given API remains in
`node_api.h`, whereas the lack of a checkbox indicates that the API was
moved to `node_ecma_api.h`.

* [x] NAPI_MODULE
* [x] NAPI_MODULE_INIT
* [x] napi_acquire_threadsafe_function
* [x] napi_add_env_cleanup_hook
* [x] napi_async_destroy
* [x] napi_async_init
* [x] napi_call_threadsafe_function
* [x] napi_cancel_async_work
* [x] napi_close_callback_scope
* [x] napi_create_async_work
* [x] napi_create_buffer
* [x] napi_create_buffer_copy
* [x] napi_create_external_buffer
* [x] napi_create_threadsafe_function
* [x] napi_delete_async_work
* [x] napi_fatal_error
* [x] napi_fatal_exception
* [x] napi_get_buffer_info
* [x] napi_get_node_version
* [x] napi_get_threadsafe_function_context
* [x] napi_get_uv_event_loop
* [x] napi_is_buffer
* [x] napi_make_callback
* [x] napi_module_register
* [x] napi_open_callback_scope
* [x] napi_queue_async_work
* [x] napi_ref_threadsafe_function
* [x] napi_release_threadsafe_function
* [x] napi_remove_env_cleanup_hook
* [x] napi_unref_threadsafe_function
* [ ] napi_add_finalizer
* [ ] napi_adjust_external_memory
* [ ] napi_call_function
* [ ] napi_close_escapable_handle_scope
* [ ] napi_close_handle_scope
* [ ] napi_coerce_to_bool
* [ ] napi_coerce_to_number
* [ ] napi_coerce_to_object
* [ ] napi_coerce_to_string
* [ ] napi_create_array
* [ ] napi_create_arraybuffer
* [ ] napi_create_array_with_length
* [ ] napi_create_bigint_int64
* [ ] napi_create_bigint_uint64
* [ ] napi_create_bigint_words
* [ ] napi_create_dataview
* [ ] napi_create_double
* [ ] napi_create_error
* [ ] napi_create_external
* [ ] napi_create_external_arraybuffer
* [ ] napi_create_function
* [ ] napi_create_int32
* [ ] napi_create_int64
* [ ] napi_create_object
* [ ] napi_create_promise
* [ ] napi_create_range_error
* [ ] napi_create_reference
* [ ] napi_create_string_latin1
* [ ] napi_create_string_utf16
* [ ] napi_create_string_utf8
* [ ] napi_create_symbol
* [ ] napi_create_typedarray
* [ ] napi_create_type_error
* [ ] napi_create_uint32
* [ ] napi_define_class
* [ ] napi_define_properties
* [ ] napi_delete_element
* [ ] napi_delete_property
* [ ] napi_delete_reference
* [ ] napi_escape_handle
* [ ] napi_get_and_clear_last_exception
* [ ] napi_get_arraybuffer_info
* [ ] napi_get_array_length
* [ ] napi_get_boolean
* [ ] napi_get_cb_info
* [ ] napi_get_dataview_info
* [ ] napi_get_element
* [ ] napi_get_global
* [ ] napi_get_last_error_info
* [ ] napi_get_named_property
* [ ] napi_get_new_target
* [ ] napi_get_null
* [ ] napi_get_property
* [ ] napi_get_property_names
* [ ] napi_get_prototype
* [ ] napi_get_reference_value
* [ ] napi_get_typedarray_info
* [ ] napi_get_undefined
* [ ] napi_get_value_bigint_int64
* [ ] napi_get_value_bigint_uint64
* [ ] napi_get_value_bigint_words
* [ ] napi_get_value_bool
* [ ] napi_get_value_double
* [ ] napi_get_value_external
* [ ] napi_get_value_int32
* [ ] napi_get_value_int64
* [ ] napi_get_value_string_latin1
* [ ] napi_get_value_string_utf16
* [ ] napi_get_value_string_utf8
* [ ] napi_get_value_uint32
* [ ] napi_get_version
* [ ] napi_has_element
* [ ] napi_has_named_property
* [ ] napi_has_own_property
* [ ] napi_has_property
* [ ] napi_instanceof
* [ ] napi_is_array
* [ ] napi_is_arraybuffer
* [ ] napi_is_dataview
* [ ] napi_is_error
* [ ] napi_is_exception_pending
* [ ] napi_is_promise
* [ ] napi_is_typedarray
* [ ] napi_new_instance
* [ ] napi_open_escapable_handle_scope
* [ ] napi_open_handle_scope
* [ ] napi_reference_ref
* [ ] napi_reference_unref
* [ ] napi_reject_deferred
* [ ] napi_remove_wrap
* [ ] napi_resolve_deferred
* [ ] napi_run_script
* [ ] napi_set_element
* [ ] napi_set_named_property
* [ ] napi_set_property
* [ ] napi_strict_equals
* [ ] napi_throw
* [ ] napi_throw_error
* [ ] napi_throw_range_error
* [ ] napi_throw_type_error
* [ ] napi_typeof
* [ ] napi_unwrap
* [ ] napi_wrap

PR-URL: https://github.com/nodejs/node/pull/23786
Reviewed-By: Yazhong Liu <yorkiefixer@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-11-17 14:38:51 -08:00
Refael Ackermann
3d4b281792 build,tools: update make-v8.sh for ppc64le
PR-URL: https://github.com/nodejs/node/pull/24293
Fixes: https://github.com/nodejs/build/issues/1536
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-11-16 14:26:46 -05:00
Daijiro Wachi
62d053b707 tools: fix make lint-md-rollup and run it
PR-URL: https://github.com/nodejs/node/pull/24333
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-16 04:20:40 +01:00
Daijiro Wachi
195b7c2880 tools: update remark-lint to v6.0.3 from v6.0.2
PR-URL: https://github.com/nodejs/node/pull/24333
Refs: https://github.com/remarkjs/remark-lint/releases/tag/6.0.3
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-16 04:20:27 +01:00
Daijiro Wachi
eeed6d9858 tools: update remark version to v10 from v8
Including the below two updates:
+ https://github.com/remarkjs/remark/releases/tag/9.0.0
+ https://github.com/remarkjs/remark/releases/tag/10.0.0

PR-URL: https://github.com/nodejs/node/pull/24333
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-11-16 04:20:13 +01:00
Joyee Cheung
bd765d61d7
src: compile native modules and their code cache in C++
This patch refactors out a part of NativeModule.prototype.compile
(in JS land) into a C++ NativeModule class, this enables a
couple of possibilities:

1. By moving the code to the C++ land, we have more opportunity
  to specialize the compilation process of the native modules
  (e.g. compilation options, code cache) that is orthogonal to
  how user land modules are compiled
2. We can reuse the code to compile bootstrappers and context
  fixers and enable them to be compiled with the code cache later,
  since they are not loaded by NativeModule in the JS land their
  caching must be done in C++.
3. Since there is no need to pass the static data to JS for
  compilation anymore, this enables us to use
  (std::map<std::string, const char*>) in the generated
  node_code_cache.cc and node_javascript.cc later, and scope
  every actual access to the source of native modules to a
  std::map lookup instead of a lookup on a v8::Object in
  dictionary mode.

This patch also refactor the code cache generator and tests
a bit and trace the `withCodeCache` and `withoutCodeCache`
in a Set instead of an Array, and makes sure that all the cachable
builtins are tested.

PR-URL: https://github.com/nodejs/node/pull/24221
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-11-15 02:30:40 +08:00
João Reis
3856d8a14c win: add customization warning to tools script
PR-URL: https://github.com/nodejs/node/pull/24348
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-11-14 17:33:29 +00:00
cjihrig
d72d43f9bf tools: update ESLint to 5.9.0
Update ESLint to 5.9.0.

PR-URL: https://github.com/nodejs/node/pull/24280
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-12 14:14:31 -08:00
Rich Trott
b5420c9577 test: move benchmark tests out of main test suite
Move benchmark tests (which are slow) out of the main test suite. We can
hopefully add them to node-daily-master so that they are still run daily
on CI.

PR-URL: https://github.com/nodejs/node/pull/24265
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-10 22:44:26 -08:00
Fedor Indutny
d4654d89be deps: introduce llhttp
llhttp is modern, written in human-readable TypeScript, verifiable, and
is very easy to maintain.

See: https://github.com/indutny/llhttp

PR-URL: https://github.com/nodejs/node/pull/24059
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-11-10 17:54:21 -05:00
Refael Ackermann
d0e593e11e
build,tools: update make-v8.sh for s390x
PR-URL: https://github.com/nodejs/node/pull/23839
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-09 16:13:46 -08:00
Rich Trott
c3809ffc24 tools: enable 80-char line length markdown linting
PR-URL: https://github.com/nodejs/node/pull/24094
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-07 09:27:33 -08:00
Richard Lau
7489ee8b6f tools: add script to lint first PR commit message
Decouple first commit in pull request linting from Travis by using
the GitHub API to work out the first commit.

The shell script obtains the pull request number in one of the
following ways:
 1) supplied on the command line (use this to test against any PR)
 2) derived from the HEAD commit via the GitHub API

PR-URL: https://github.com/nodejs/node/pull/24030
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-11-04 00:22:30 -07:00
João Reis
ab2778d763 win: add prompt to tools installation script
Fixes: https://github.com/nodejs/Release/issues/369

PR-URL: https://github.com/nodejs/node/pull/23987
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-11-03 19:35:39 -07:00
Rob Reynolds
5833fa989d win: clarify Boxstarter behavior on install tools
Clarify the behavior of what Boxstarter may do when it runs on a box
to install all the necessary tools so that there are no surprises to
the end user when the script is run.

Currently there is no interface that warns the user that Boxstarter
will reboot the machine possibly multiple times depending on how many
dependencies need to be installed and doesn't mention a need to disable
UAC. For folks who see what may look like a reboot loop, we feel it is
necessary to make them aware that UAC will be disabled and they will
need to take action to re-enable UAC manually if they interfere/stop
the script from finishing.

PR-URL: https://github.com/nodejs/node/pull/23987
Fixes: https://github.com/nodejs/Release/issues/369
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-11-03 19:34:57 -07:00
Richard Lau
a8e98f8ea9 tools: update alternative docs versions
Add `11.x` and mark `10.x` as `lts`.

PR-URL: https://github.com/nodejs/node/pull/23980
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-02 01:04:57 -04:00
Ouyang Yadong
5689d55392 doc: add types and their corresponding return values
This commit supplements some types and their corresponding return
values in docs, including `AsyncResource`, `DiffieHellman`,
`ECDH`, `https.Server`, `repl.REPLServer`.

PR-URL: https://github.com/nodejs/node/pull/23998
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-11-02 00:36:40 +02:00
Joyee Cheung
010a3f8c23
test: run code cache test by default and test generator
- Add the code cache tests to the default test suite, and test
  the bookkeeping when the binary is not built with the code cache.
- Test the code cache generator to make sure we do not accidentally
  break it - until we enable code cache in the CI.

Refs: https://github.com/nodejs/node/issues/21563
PR-URL: https://github.com/nodejs/node/pull/23855
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-30 14:38:27 +08:00
cjihrig
2f1c356d7a tools: update ESLint to 5.8.0
Update ESLint to 5.8.0.

PR-URL: https://github.com/nodejs/node/pull/23904
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-10-29 07:49:16 +01:00
cclauss
0c39290201 build: add lint-py which uses flake8
PR-URL: https://github.com/nodejs/node/pull/21952
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-24 17:19:28 -04:00
Steven R. Loomis
6786ff4d36 deps: icu 63.1 bump (CLDR 34)
- Full release notes: http://site.icu-project.org/download/63

Fixes: https://github.com/nodejs/node/issues/22344

PR-URL: https://github.com/nodejs/node/pull/23715
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-10-24 08:27:36 -07:00
Steven R. Loomis
d8f2d27261 tools, icu: actually failover if there are multiple URLs
Building on #23269, if multiple ICU download URLs are present, try the
next one in case of error.

Part of the ICU 63.1 bump, but independent code-wise.
https://github.com/nodejs/node/issues/23244

PR-URL: https://github.com/nodejs/node/pull/23715
Fixes: https://github.com/nodejs/node/issues/22344
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-10-24 08:27:19 -07:00
Steven R. Loomis
d8b6a1d4f6 doc: document and warn if the ICU version is too old
Fixes: https://github.com/nodejs/node/issues/19657

PR-URL: https://github.com/nodejs/node/pull/23766
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-10-23 13:37:48 -07:00
Steven R. Loomis
4194b051e8 deps: icu: apply workaround patch
ICU 62.1 had a bug where certain orders of operations would not
work with the minimum significant digit setting. Fixed in
ICU 63.1. Applied the following patch from v8.

https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1128503

ICU Bug:
https://unicode-org.atlassian.net/browse/ICU-20063

Fixes: https://github.com/nodejs/node/issues/22156

PR-URL: https://github.com/nodejs/node/pull/23764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-23 13:32:40 -07:00
Sakthipriyan Vairamani (thefourtheye)
1d152b6e51 tools: prefer filter to remove empty strings
Ref: https://github.com/nodejs/node/pull/23585#issuecomment-430585490

Python's `list.remove` will throw if the element is not found and also
it removes only the first occurrence.

This patch replaces the use of `list.remove` with a `filter` which
solves both of the above mentioned problems.

PR-URL: https://github.com/nodejs/node/pull/23727
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-18 18:23:59 -04:00
Refael Ackermann
deaddd212c tools,test: add list of slow tests
they will be skipped if run with `--flaky-tests=skip`

PR-URL: https://github.com/nodejs/node/pull/23251
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-10-16 11:09:58 -04:00
Refael Ackermann
ec4f70e59a tools,test: cleanup and dedup code
* Hoist common code to base class
  (`GetTestStatus`, and the `section` property to `TestConfiguration`)
* Replace ListSet with the built in set
* Remove ClassifiedTest
* Inline PrintReport
* How cases_to_run are filtered

PR-URL: https://github.com/nodejs/node/pull/23251
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-10-16 11:09:53 -04:00
cjihrig
ea9df8b4a4
tools: update ESLint to 5.7.0
Update ESLint to 5.7.0.

PR-URL: https://github.com/nodejs/node/pull/23629
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-14 20:11:22 -04:00
Refael Ackermann
be346d9d32 tools,icu: read full ICU version info from file
* ATM on every ICU version bump we need to update these data. Reading
  it from a file makes it independant of `configre.py` changes.
* Update guide.

PR-URL: https://github.com/nodejs/node/pull/23269
Refs: https://github.com/nodejs/node/issues/23245
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-10-11 20:19:50 -04:00
Rich Trott
54ce229d30 tools: update node-lint-md-cli-rollup
Update node-lint-md-cli-rollup. This silences some minor warnings that
appear with `npm audit`. It also updates remark-preset-lint-node to
1.0.3 (from 1.0.2).

PR-URL: https://github.com/nodejs/node/pull/23358
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-10-11 16:58:33 -07:00
Brandon Smith
13340d47fc benchmark,doc,lib,src,test,tools: fix typos
PR-URL: https://github.com/nodejs/node/pull/23302
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-09 16:53:12 +03:00
Steven R. Loomis
a4ffa0cb94 tools: fix ICU shrinker and docs
- tools: path to ICU datafile moved
- docs: configure is now configure.py

Fixes: https://github.com/nodejs/node/issues/23245

PR-URL: https://github.com/nodejs/node/pull/23266
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-04 14:27:07 -07:00
Anna Henningsen
d0fc382c4b
tools: allow input for TTY tests
Since faking TTY input is not otherwise fake-able, we need
support in the test runner for it.

PR-URL: https://github.com/nodejs/node/pull/23053
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04 09:20:22 -07:00
Sakthipriyan Vairamani (thefourtheye)
17a0cd2bab
Revert "tools,gyp: don't force build actions with multiple outputs"
This reverts commit 5d8373a498.

Fixes: https://github.com/nodejs/node/issues/23255

PR-URL: https://github.com/nodejs/node/pull/23257
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04 08:53:49 -07:00
Daniel Bevenius
f01adb5454 deps: add no-strict-aliasing to ICU cflags
This commit adds -Wno-strict-aliasing to the icu_implementation target.
The motivation for this is that this flags is enabled when building with
macosx, and will make the output a little cleaner when building on
other operating systems.

PR-URL: https://github.com/nodejs/node/pull/23112
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-10-04 12:27:02 +02:00
Ben Noordhuis
df6a1306e8 doc: remove GA tracking
The Google Analytics tracking wasn't wholly uncontroversial and hasn't
been used in practice. Remove it.

PR-URL: https://github.com/nodejs/node/pull/23083
Fixes: https://github.com/nodejs/node/issues/22652
Refs: https://github.com/nodejs/node/pull/6601
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-04 07:18:23 +02:00
Refael Ackermann
5d8373a498 tools,gyp: don't force build actions with multiple outputs
Don't add `force_append` (FORCE_DO_CMD) to the intermediate sentinal.
Adding it makes the action run alway, even when there are no changes.
(refack): AFAICT because `*.intermediate` files don't have build rules.

PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-02 17:53:14 -04:00
Refael Ackermann
731a72f387 tools,gyp: cosmetic change to GYP make generator outputs
Puts the compilation target upfront for easy reading.

PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-02 17:53:14 -04:00
Richard Lau
b3b3f53a33 build: exclude npm test directories on Windows
npm test directories are excluded on other platforms by
`tools/install.py`. Do the same on Windows.

Fixes: https://github.com/nodejs/node/issues/22901

PR-URL: https://github.com/nodejs/node/pull/23001
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-10-02 13:19:49 -04:00
Daniel Bevenius
b8a98a807f tools: fix cpplint --quiet option
Currently, the --quiet option for cpplint will generate the following
error:
$ tools/cpplint.py  --quiet src/node.cc
Traceback (most recent call last):
  File "tools/cpplint.py", line 6529, in <module>
    main()
  File "tools/cpplint.py", line 6497, in main
    filenames = ParseArguments(sys.argv[1:])
  File "tools/cpplint.py", line 6437, in ParseArguments
    logger.addHandler(logging.FileHandler(val, mode='wb'))
  File "/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/python2.7/logging/__init__.py", line 941, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 21] Is a directory: '/Users/danielbevenius/work/nodejs/node

This commit moves the FileHandler that currently exists in the quiet
option to the logfile clause. It looks like this issue came about when
merging in commit fee4d3ab90 ("tools:
merge custom cpplint with cpplint v1.3.0").

PR-URL: https://github.com/nodejs/node/pull/23075
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-01 10:35:33 +02:00
cjihrig
bb00eda910 tools: update ESLint to 5.6.1
Update ESLint to 5.6.1.

PR-URL: https://github.com/nodejs/node/pull/23149
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-10-01 09:46:40 +02:00
João Reis
d6a6df9ece win,msi: display license notes before installing tools
PR-URL: https://github.com/nodejs/node/pull/23044
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-26 18:43:01 +01:00
João Reis
0461dd9b94 win,msi: install Boxstarter from elevated shell
Boxstarter asks for elevation to install packages, but not to install
Boxstarter itself. Thus, run all the commands from an elevated
PowerShell.

Refs: https://github.com/nodejs/node/pull/22645
PR-URL: https://github.com/nodejs/node/pull/22988
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-26 18:39:43 +01:00
Tobias Nießen
b78ba93aae
win,msi: highlight installation of 3rd-party tools
Currently, the installation wizard more or less silently installs
third-party software (Boxstarter + Chocolatey). This adds some text
to the MSI installation dialog and to the Boxstarter installation
script.

PR-URL: https://github.com/nodejs/node/pull/23003
Refs: https://github.com/nodejs/node/pull/22645
Refs: https://github.com/nodejs/node/pull/22988
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-09-24 23:26:18 +02:00
James M Snell
9d71e6a607 src: deprecate global COUNTER_* and remove perfctr
To support Performance Counters on Windows, a number of
global `COUNTER_` methods were added that are undocumented
and really only intended to be used internally by Node.js.

Unfortunately, the perfctr support apparently hasn't even
worked for quite a while and no one has even complained.

This removes the perfctr support and replaces the global
functions with deprecated non-ops for now, with the intent
of removing those outright in the next major release cycle.

PR-URL: https://github.com/nodejs/node/pull/22485
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: João Reis <reis@janeasystems.com>
2018-09-19 11:07:01 +02:00
Christopher Hiller
fee4d3ab90 tools: merge custom cpplint with cpplint v1.3.0
Merged https://github.com/cpplint/cpplint/blob/master/cpplint.py with
our customized version to enable better IDE/editor integration.

Made file executable.

PR-URL: https://github.com/nodejs/node/pull/22864
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2018-09-18 07:56:56 +02:00
Kyle Farnung
988be43e33 tools,win: fix find_python error
On a machine without `python.exe` in the PATH the script was failing
with:

```console
> .\vcbuild.bat
Looking for Python 2.x
2> was unexpected at this time.
```

Escaping the `>` seems to resolve it.

PR-URL: https://github.com/nodejs/node/pull/22797
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-17 16:50:47 -07:00
Rich Trott
ece642937b tools: update ESLint to 5.6.0
Update ESLint to 5.6.0.

PR-URL: https://github.com/nodejs/node/pull/22882
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-09-16 10:21:57 -07:00
Anna Henningsen
175a88f094
tools: implement update-authors in JS
Replace the previous Perl script with a Node.js variant
that explicitly supports `Author:` and, in particular,
GitHub’s standard `Co-authored-by:` metadata tags.

PR-URL: https://github.com/nodejs/node/pull/22771
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-14 18:58:25 +02:00
Tobias Nießen
1f5261b7c8
tools: fix doc tool behavior for version arrays
Even though the doc tool supports version arrays in theory, it fails to
sort them properly causing the tool to crash.

PR-URL: https://github.com/nodejs/node/pull/22766
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@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-09-12 11:47:08 +02:00
João Reis
39937938d7 win,msi: install tools for native modules
Add a dialog during installation with information about native
modules that can optionally run a Boxstarter script at the end of the
installation. This script can also be run from Start menu.

Fixes: https://github.com/nodejs/node/issues/22311
PR-URL: https://github.com/nodejs/node/pull/22645
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-09-12 03:17:48 +01:00
Refael Ackermann
e4dd213516 tools: use lint-md.js
* remove unused `tools/remark-cli`
* vcbuild tested with `vcbuild nobuild noprojgen lint-md-build lint-md`

PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:30 -04:00
Refael Ackermann
fe6c74c2a5 tools: make lint-md-rollup & checkin lint-md.js
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:23 -04:00
Refael Ackermann
7fcc178be1 tools: relocate remark-preset-lint-node
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:18 -04:00
Refael Ackermann
2120dac8ab tools: update node-lint-md-cli-rollup
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:12 -04:00
Refael Ackermann
d3442f261a tools: vendor in node-lint-md-cli-rollup
PR-URL: https://github.com/nodejs/node/pull/20109
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11 14:12:07 -04:00
Ruben Bridgewater
623dcb7bd9
tools: update eslint to v5.5.0
PR-URL: https://github.com/nodejs/node/pull/22720
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-09-11 14:16:17 +02:00
Kyle Farnung
3bdc61d4d1 tools,doc: apilinks should handle root scenarios
* Prevent crash when setting root properties
* Allow return outside of function

PR-URL: https://github.com/nodejs/node/pull/22721
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-09-09 17:48:56 -07:00
Sam Ruby
8737683ba0 tools: add [src] links to child-process.html
handle exports. as an alternative to module.exports

PR-URL: https://github.com/nodejs/node/pull/22706
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-08 13:42:41 -04:00
Clemens Hammacher
e6cdf24bb5
tools: remove lldbinit file from install script
V8 removed the lldbinit file.

Refs: https://crrev.com/c/1127892

PR-URL: https://github.com/nodejs/node/pull/21983
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-07 21:07:43 +02:00
Michaël Zasso
267b0b5f3d
tools: fix compilation after V8 upgrade
V8 now requires ICU's regular expressions.

PR-URL: https://github.com/nodejs/node/pull/21983
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-09-07 21:07:38 +02:00
Rich Trott
7a50dbadd9 tools: update dmn to 2.0.0
New version of dmn with better support for case-sensitive file systems.
Use it in the update-* scripts.

PR-URL: https://github.com/nodejs/node/pull/22733
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-09-06 13:06:54 -07:00
Sam Ruby
441391b9eb tools: add [src] links to async_hooks.html
handle ES2015 Class, contructor, and instance methods

unrelated: update Makefile so that generated HTML is out of date whenever
tools/doc/apilinks.js is updated.

PR-URL: https://github.com/nodejs/node/pull/22656
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-05 12:46:51 +02:00
Sam Ruby
5da155398e tools: add [src] links to assert.html
Parse `const assert = module.exports = ok;` as exporting a constructor
named `assert`.

PR-URL: https://github.com/nodejs/node/pull/22601
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-02 10:14:03 -04:00
MaleDong
ec75ba6f0a
doc: Remove 'dnt_helper.js'
This file is totally useless, because it's an inner-used helper that is
for publishment of doc files.

PR-URL: https://github.com/nodejs/node/pull/22595
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-09-02 12:47:09 +02:00
Alexey Kozyatinskiy
4b47d2907d
build: do not copy v8-inspector* headers ar part of install
These headers are exposed from V8 for embedder and should not be
used by native addons.

Fixes https://github.com/nodejs/node/issues/22415

PR-URL: https://github.com/nodejs/node/pull/22586
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-08-31 18:57:55 +02:00
Sam Ruby
60465700ed tools: Include links to source code in documentation
Parse source code using acorn; extracting exports.  When producing
documentation, match exports to headers.  When a match is found, add a [src]
link.

This first commit handles simple exported classes and functions, and does so
without requiring any changes to the source code or markdown.  Subsequent
commits will attempt to match more headers, and some of these changes are
likely to require changes to the source code and/or markdown.

PR-URL: https://github.com/nodejs/node/pull/22405
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-08-29 22:20:46 -04:00
Sarat Addepalli
c917540f22 doc: support 'removed' field in doc YAML sections
PR-URL: https://github.com/nodejs/node/pull/22100
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-08-26 10:35:33 +03:00
Michaël Zasso
e10290cc67
tools: add missing package-lock to clang-format
`npm ci` fails where there is no package-lock.json.
Also add the `node_modules` directory to .gitignore.

PR-URL: https://github.com/nodejs/node/pull/22500
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-25 17:09:59 +02:00
Christopher Hiller
80143f616d process: add allowedNodeEnvironmentFlags property
`process.allowedNodeEnvironmentFlags` provides an API to validate and
list flags as specified in `NODE_OPTIONS` from user code.

Refs: https://github.com/nodejs/node/issues/17740
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>

PR-URL: https://github.com/nodejs/node/pull/19335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-08-24 18:15:19 -07:00
Ujjwal Sharma
16cffb0d48
gyp: muffle xcodebuild warnings
Muffle xcodebuild warnings by introducing an alternative quieter
alternative to GetStdout, called GetStdoutQuiet, and call it selectively
in particularly noisy xcodebuild commands.

Co-authored-by: Gibson Fahnestock <gibfahn@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/21999
Original-PR-URL: https://github.com/nodejs/node-gyp/pull/1370
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-25 04:41:56 +05:30
Rich Trott
adaaba0094 tools: update ESLint to 5.4.0
Update ESLint from 5.3.0 to 5.4.0.

PR-URL: https://github.com/nodejs/node/pull/22454
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-08-23 21:40:22 -07:00
Joyee Cheung
7cbbb27c07
src: perform integrity checks on built-in code cache
Currently V8 only checks that the length of the source code is the
same as the code used to generate the hash, so we add an additional
check here:

1. During compile time, when generating node_javascript.cc and
   node_code_cache.cc, we compute and include the hash of the
  (unwrapped) JavaScript source in both.
2. At runtime, we check that the hash of the code being compiled
  and the hash of the code used to generate the cache
  (inside the wrapper) is the same.

This is based on the assumptions:

1. `internalBinding('code_cache_hash')` must be in sync with
   `internalBinding('code_cache')` (same C++ file)
2. `internalBinding('natives_hash')` must be in sync with
   `process.binding('natives')` (same C++ file)
3. If `internalBinding('natives_hash')` is in sync with
   `internalBinding('natives_hash')`, then the (unwrapped)
   code used to generate `internalBinding('code_cache')`
   should be in sync with the (unwrapped) code in
   `process.binding('natives')`

There will be, however, false positives if the wrapper used
to generate the cache is different from the one used at run time,
and the length of the wrapper somehow stays the same.
But that should be rare and can be eased once we make the
two bootstrappers cached and checked as well.

PR-URL: https://github.com/nodejs/node/pull/22152
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
2018-08-18 05:21:52 +08:00
Bryan English
c7944a7a7b fs: readdir optionally returning type information
readdir and readdirSync now have a "withFileTypes" option, which, when
enabled, provides an array of DirectoryEntry objects, similar to Stats
objects, which have the filename and the type information.

Refs: https://github.com/nodejs/node/issues/15699

PR-URL: https://github.com/nodejs/node/pull/22020
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
2018-08-13 19:18:45 -07:00
Sam Ruby
59f8276a6b tools: fix header escaping regression
quick fix for #22065

Preferred long term fix can be found at:
https://github.com/nodejs/node/pull/22140

PR-URL: https://github.com/nodejs/node/pull/22084
Fixes: https://github.com/nodejs/node/issues/22065
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-13 09:14:42 -06:00
Andrey Lushnikov
e0395247c8 inspector: add inspector_protocol as a direct dependency
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.

This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.

This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe

PR-URL: https://github.com/nodejs/node/pull/21975
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
2018-08-10 18:03:43 -07:00
Vse Mozhet Byt
5fded26e9e tools: do not autolink section to itself
Fix a regression in the new doc generation toolchain.

PR-URL: https://github.com/nodejs/node/pull/22138
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-08 20:56:08 +03:00
Rich Trott
6ad12d47f5 tools: update ESLint to 5.3.0
PR-URL: https://github.com/nodejs/node/pull/22134
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-08-07 22:28:45 -07:00
Joyee Cheung
0da144f4d4
tools: add make format-cpp to run clang-format on C++ diffs
This patch adds a `make format-cpp` shortcut to the Makefile
that runs clang-format on the C++ diffs, and a
`make format-cpp-build` to install clang-format from
npm.

To format staged changes:

```
$ make format-cpp
```

To format HEAD~1...HEAD (latest commit):

```
$ CLANG_FORMAT_START=`git rev-parse HEAD~1` make format-cpp
```

To format diff between master and current branch head (master...HEAD):

```
$ CLANG_FORMAT_START=master make format-cpp
```

Most of the .clang-format file comes from running

```
$ clang-format --dump-config --style=Google
```

with clang-format built with llvm/trunk 328768 (npm version 1.2.3)

The clang-format version is fixed because different version of
clang-format may format the files differently.

PR-URL: https://github.com/nodejs/node/pull/21997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-08-03 19:40:23 +08:00
Rich Trott
a3e511b971 tools: update to using dmn 1.0.11
dmn 1.0.11 is available. Update update-eslint.sh to use it. Update
update-babel-eslint.sh to use it too via npx. Add removeNPMAbsolutePaths
to the latter while we're at it.

PR-URL: https://github.com/nodejs/node/pull/22035
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: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-01 22:46:34 -07:00
Anna Henningsen
02badc424f
test: remove test/gc, integrate into parallel
There’s no reason to have a separate addon just for
testing GC anymore.

PR-URL: https://github.com/nodejs/node/pull/22001
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-01 18:04:56 +02:00
Jon Moss
3b23b4d7c0 tools,test: remove unused config hooks
Removes a couple of unused/empty functions inside of `tools/test.py`

PR-URL: https://github.com/nodejs/node/pull/22010
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-31 10:26:04 -04:00
Ujjwal Sharma
51812ff12b
tools: patch gyp to avoid xcrun errors
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: https://github.com/nodejs/node/issues/12531

PR-URL: https://github.com/nodejs/node/pull/21520
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-29 20:27:31 +05:30
Ujjwal Sharma
fc81e80191
tools: update cpplint to check for inline headers
Update cpplint.py to check for inline headers when the corresponding
header is already included.

PR-URL: https://github.com/nodejs/node/pull/21521
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-29 19:13:00 +05:30
Yuta Hiroto
8c6d1a0686 tools: update ESLint to 5.2.0
PR-URL: https://github.com/nodejs/node/pull/21817
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-28 06:05:49 -07:00
Sam Ruby
3ffd6892c4 tools: convert addon-verify to remark
This is the last use of the remark *module*. tools/remark-cli and
tools/remark-preset-lint-node remain.

PR-URL: https://github.com/nodejs/node/pull/21978
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-28 10:40:35 +03:00
cclauss
bade0fedcd
tools: define xrange() in Python 3
__xrange()__ was removed in Python 3 in favor of __range()__.
This PR ensures similar functionality on both Python 2 and Python 3.

Discovered via https://travis-ci.com/nodejs/node/builds/79706150
(https://github.com/nodejs/node/pull/21942).

PR-URL: https://github.com/nodejs/node/pull/21945
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-27 21:18:53 +02:00
João Reis
48e5b350b3 build,win,v8: allow precompiling objects-inl.h
This makes compiling v8_base much faster on Windows.

Sharding is disabled because the header would have to be precompiled
for each shard but is only once. The library is much smaller, so
sharding is unnecessary.

This is enabled by default, but disabled for CI and releases.

PR-URL: https://github.com/nodejs/node/pull/21772
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2018-07-27 00:43:43 -07:00
Joyee Cheung
186c2fb6d8
build: create V8 code cache after script is run
This patch makes it possible to generate the code cache
for the builtins directly from the original script object
(instead of compiling a new one) and after the script has
been run (via `NativeModule.require`). Before this patch
only the top level functions (the wrapped ones)
are included in the cache, after this patch the inner
functions in those modules will be included as well.

Also blacklists modules from dependencies like V8 and
node-inspect since we cannot guarantee that they are suitable
to be executed directly.

PR-URL: https://github.com/nodejs/node/pull/21567
Refs: https://github.com/nodejs/node/issues/21563
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-07-27 14:51:27 +08:00
Jon Moss
b1b2f7c1fc tools: fix docs and run known_issues by default
- Updates `test/README.md` with new suites
- Fixes some outdated `IGNORED_SUITES` listings
- Allows for `test/known_issues` suite to be run by default

PR-URL: https://github.com/nodejs/node/pull/21910
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-26 20:48:29 -04:00
Rich Trott
40a413edf7 tools: remove obsolete entries from license
The LICENSE file has a few entries for things that no longer ship with
the code base. They are installed via npm instead. Remove them from the
license file.

Running the license builder on a fresh checkout will
result in errors until this change lands, since the necessary
information is not in the source tree until the `npm install` happens.

PR-URL: https://github.com/nodejs/node/pull/21979
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-26 16:08:30 -07:00
Sam Ruby
83474ae1e3 tools: flatten apidoc headers
ensure optional parameters are not treated as markedown links by
replacing the children of headers nodes with a single text node
containing the raw markup;

Fixes issue identified in
https://github.com/nodejs/node/pull/21490#issuecomment-406859983

PR-URL: https://github.com/nodejs/node/pull/21936
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-26 00:27:59 +03:00
Sam Ruby
f41dd5592e tools: produce JSON documentation using unified/remark/rehype
PR-URL: https://github.com/nodejs/node/pull/21697
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-25 21:33:06 +03:00
Vse Mozhet Byt
811598bcda doc: specify options parameter type in zlib.md
Also, delete now redundant notes and links.

PR-URL: https://github.com/nodejs/node/pull/21920
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-24 17:01:15 +03:00
Sam Ruby
78039b5f87 tools: validate apidoc links
PR-URL: https://github.com/nodejs/node/pull/21889
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-22 19:33:55 +03:00
Sam Ruby
46de34b8c2 tools: build API TOC using raw headers
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-21 22:20:10 +03:00
Sam Ruby
946686521d tools: create HTML docs with unified/remark/rehype
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-20 13:37:40 -07:00
Rich Trott
6ca5a8ac0c tools: improve update-eslint.sh
* Pin version numbers when using `npx`. This means we can be careful
  about updating what we run. (Thinking about the recent eslint-scope
  thing.)
* Add removeNPMAbsolutePaths to get rid of unused fields in package.json
  files. These unused fields can cause unnecessary churn, as at least
  one contains an absolute path that will be different for each
  developer.

PR-URL: https://github.com/nodejs/node/pull/21819
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2018-07-19 22:42:36 -07:00
silverwind
287521d298
tools: make getnodeversion.py python3-compatible
PR-URL: https://github.com/nodejs/node/pull/21872
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-19 19:19:30 +02:00
Michael Achenbach
5e5ffc81fa tools: properly convert .gypi in install.py
It was breaking during install when .gypi strings had quotes in
them. e.g.: 'foo': 'bar="baz"'
2018-07-19 11:52:16 +02:00
XhmikosR
998f9ffd42
src,tools: use https://nodejs.org URL when possible.
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>
2018-07-14 11:57:59 +02:00
Rich Trott
61cd101e12 doc: add "Edit on GitHub" link
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-13 20:37:05 -07:00
Rich Trott
19bc893c75 tools: avoid global install of dmn for lint update
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>
2018-07-12 23:04:05 -07:00
Gus Caplan
8cae9b2ff8
tools: add no-duplicate-requires rule
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>
2018-07-12 16:11:11 -05:00
Sam Ruby
0c743b5f77 tools: build all.json by combining generated JSON
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-09 22:57:33 +03:00
Kyle Farnung
8476053c13 n-api: restrict exports by version
* 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-05 10:19:27 -07:00
Sam Ruby
f85962fe4d tools: build all.html by combining generated HTML
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-02 21:33:30 +03:00
Vse Mozhet Byt
2ae45240a2 doc: fix some links
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-07-02 18:08:17 +03:00
Gus Caplan
d13cdd9c48
src: move context bootstrap to js
PR-URL: https://github.com/nodejs/node/pull/21518
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-27 17:11:19 -05:00
Joyee Cheung
4750ce26f2
build: speed up startup with V8 code cache
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>
2018-06-27 21:11:31 +08:00
Anatoli Papirovski
6f63f8d730
test: remove outdated, non-functioning test
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>
2018-06-24 21:34:59 -07:00
cjihrig
7a3bbbf41b
tools: update ESLint to 5.0.0
This is a new major release of ESLint.

PR-URL: https://github.com/nodejs/node/pull/20855
Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-06-24 12:43:54 -04:00
Anna Henningsen
cea10baa22
build: build addon tests in parallel
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>
2018-06-11 20:09:28 +02:00