summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2018-08-22build: use `npm ci`Refael Ackermann
* remove obsolete `node_modules/js-yaml/package.json` target * remove `@touch` since `npm ci` is always destructive PR-URL: https://github.com/nodejs/node/pull/22399 Refs: https://github.com/nodejs/node/pull/21802 Refs: https://github.com/nodejs/node/pull/21490 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-08-22Revert "build: extract common code from NODE_EXE/_G_EXE"Daniel Bevenius
This reverts commit 4e2fa8b0dc1acd95f558cd5f123711b9cc936c72. Refs: https://github.com/nodejs/node/issues/22457 PR-URL: https://github.com/nodejs/node/pull/22458 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-22build: extract common code from NODE_EXE/_G_EXEDaniel Bevenius
This commit extracts common parts of the NODE_EXE, and NODE_G_EXE recipes into a canned reciepe to reduce some code duplication. PR-URL: https://github.com/nodejs/node/pull/22310 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-20build: move available-node variable to topDaniel Bevenius
Currently node_use_openssl uses the available-node variable before it is defined causing the conditions that use it before that point to evaluate incorrectly. As an example running the target test/addons/.docbuildstamp will currently be skipped: $ make test/addons/.docbuildstamp Skipping .docbuildstamp (no crypto) With this commit the target will only be skipped if configured --without-ssl. PR-URL: https://github.com/nodejs/node/pull/22356 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-20build: touch tools/doc/node_modules after runDaniel Bevenius
Currently, tools/doc/node_modules is not touched after running npm install resulting in npm install being run every time. I missed this while testing commit 88bff82624628df261a429386d81565023062e44 ("build: make tools/doc/node_modules non-phony"). PR-URL: https://github.com/nodejs/node/pull/22350 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-08-20build: add test-doc to test targetDaniel Bevenius
This commit adds the test-doc target to the test recipe so that docs are built and linters run. This used to happen but was removed at some point. PR-URL: https://github.com/nodejs/node/pull/22294 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-20build: use echo command instead of shell commentsDaniel Bevenius
Currently, there are a few recipes where comments are indented and being passed to the shell. This commit updates these comments to use the echo command instead, which is the more common approach used in other recipes in the makefile. PR-URL: https://github.com/nodejs/node/pull/22293 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-18tools: simplify ESLint invocation in MakefileRich Trott
Makefile currently enforces .eslintrc.js linting on the command line but it is already enforced in the .estlintignore file. This also simplifies an arguably-related comment in .estlinrc.js. PR-URL: https://github.com/nodejs/node/pull/22348 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-12tools,build: apply markdown linting to test dirRich Trott
Enable markdown linting of the test directory. This change is applied only to Makefile and not vcbuild.bat because we do not currently lint anything outside of the doc directory using vcbuild.bat. In the Makefile, the other targets are called "misc" but that feature does not currently exist in vcbuild.bat. Adding it would be good, but outside the scope of this change. PR-URL: https://github.com/nodejs/node/pull/22221 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-08-11build: add CONFIG_FLAGS to with-code-cache targetDaniel Bevenius
This commit adds CONFIG_FLAGS to allow the with-code-cache target to be used with a debug build. The motivation for this is to make it easier to debug a build with the code cache enabled. The suggested usage: $ make BUILDTYPE=Debug with-code-cache The BUILDTYPE option is not needed if ./configure was already configured with --debug. PR-URL: https://github.com/nodejs/node/pull/22207 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-10build: make tools/doc/node_modules non-phonyDaniel Bevenius
This commit makes the target tools/doc/node_modules a non-phony target and also adds tools/doc/package.json as a prerequisite to it to avoid running it unnecessary. This is currently causing the target test/addons/.docbuildstamp to be always be executed as it has tools/doc/node_modules as a prerequisite. PR-URL: https://github.com/nodejs/node/pull/22189 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-10build: add crypto check to build targetsDaniel Bevenius
Currently when configured without-ssl the build will fail when trying to run the tools/doc/node_modules, and .docbuildstamp make targets: internal/util.js:97 throw new ERR_NO_CRYPTO(); ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at assertCrypto (internal/util.js:97:11) at crypto.js:31:1 ... at Object.<anonymous> (/node/deps/npm/node_modules/uuid/lib/rng.js:4:14) at Module._compile (internal/modules/cjs/loader.js:689:30) ... make[1]: *** [tools/doc/node_modules] Error 1 This commit adds crypto check to these targets to allow the build to pass. PR-URL: https://github.com/nodejs/node/pull/22148 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-10build: extract common parts from addon .buildstampDaniel Bevenius
This commit extracts common parts from the targets test/addons/.buildstamp, and test/addons-napi/.buildstamp to reduce some duplication. PR-URL: https://github.com/nodejs/node/pull/22171 Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-03tools: add `make format-cpp` to run clang-format on C++ diffsJoyee Cheung
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-01test: remove test/gc, integrate into parallelAnna Henningsen
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-07-25tools: produce JSON documentation using unified/remark/rehypeSam Ruby
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-23build: remove redundant Makefile targetRich Trott
The only target that uses the `tools/doc/node_modules/js-yaml/package.json` target is `doc-only`. As a result of a recent change, it has `tools/doc/node_modules` as a prerequisite, which does the exact same npm install as `tools/doc/node_modules/js-yaml/package.json`. Remove `tools/doc/node_modules/js-yaml/package.json` as unnecessary. PR-URL: https://github.com/nodejs/node/pull/21915 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-20tools: create HTML docs with unified/remark/rehypeSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-19build: add new benchmark targetsKenny Yuan
Adding new build targets: 'bench-addons' & 'bench-addons-clean'. With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking. PR-URL: https://github.com/nodejs/node/pull/20905 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-19build: move to `npm ci` where possibleRich Trott
Recent events (involving a maliciously published version of a popular module's dependency) have reinvigorated my interest in seeing us move to `npm ci` instead of `npm install`. This moves us to `npm ci` where possible in Makefile and vcbuild.bat. PR-URL: https://github.com/nodejs/node/pull/21802 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-16build: account for pure C sources in `build-addons-napi`Anna Henningsen
PR-URL: https://github.com/nodejs/node/pull/21797 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-07-09tools: build all.json by combining generated JSONSam Ruby
Notes: 1) Removed a number of root properties that did not seem relevant: source, desc, and introduced_in. There no longer is a source, and the other two are from the first include and do not reflect the entire API. 2) As with https://github.com/nodejs/node/issues/20100, the current "desc" properties sometimes contained in-page links, other times referenced another page, and often did not match the links in the original HTML or JSON file. I chose to standardize on external links as "desc" values are isolated snippets as opposed to all.html which can be viewed as a standalone and self contained document. 3) Eliminated preprocessing for @include entirely, including the test case for this function. 4) _toc.md was renamed to index.md. 5) index comments no longer appear in embedded TOCs (left hand side column in the generated documentation. PR-URL: https://github.com/nodejs/node/pull/21637 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-05benchmark: add n-api function args benchmarkKenny Yuan
This benchmark suite is added to measure the performance of n-api function call with various type/number of arguments. The cases in this suite are carefully selected to efficiently show the performance trend. PR-URL: https://github.com/nodejs/node/pull/21555 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-07-02tools: build all.html by combining generated HTMLSam Ruby
Combine the toc and api contents from the generated doc/api/*.html files. This ensures that the single page version of the documentation exactly matches the individual pages. PR-URL: https://github.com/nodejs/node/pull/21568 Fixes: https://github.com/nodejs/node/issues/20100 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-06-29build: remove requirement to re-run ./configureAnna Henningsen
Instead of requiring `./configure` to be run again after the file changed, first try to re-run the configure script with the arguments with which it was originally run. Usually, those arguments will either contain no flags, or all flags that were passed are still supported. PR-URL: https://github.com/nodejs/node/pull/21371 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-27build: speed up startup with V8 code cacheJoyee Cheung
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-25build: fail on instrumentation errorsBenjamin Coe
nyc was silently failing to instrument new language features, resulting in a failure to instrument console.js. Refs: https://github.com/nodejs/node/issues/20952 PR-URL: https://github.com/nodejs/node/pull/21071 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rebecca Turner <me@re-becca.org> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-06-24test: remove outdated, non-functioning testAnatoli Papirovski
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-24build: add crypto check to markdown lint targetDaniel Bevenius
Currently, if configured --without-ssl the following error will be repored by remark-cli: Running Markdown linter on misc docs... internal/util.js:100 throw new ERR_NO_CRYPTO(); ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at assertCrypto (internal/util.js:100:11) at crypto.js:31:1 at NativeModule.compile (internal/bootstrap/loaders.js:235:7) at Function.NativeModule.require (internal/bootstrap/loaders.js:155:18) at Function.Module._load (internal/modules/cjs/loader.js:530:25) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (/node/tools/remark-cli/node_modules/math-random/node.js:1:76) at Module._compile (internal/modules/cjs/loader.js:702:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10) make[1]: *** [tools/.miscmdlintstamp] Error 1 make: *** [lint] Error 2 This commit adds a check for crypto to avoid this error when node has been configured without crypto support. The alternative was to try to fix this in randomatic but that lead to another dependency failing (uuid) and felt like this might be simpler. PR-URL: https://github.com/nodejs/node/pull/21326 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-06-19benchmark: create napi benchmark directoryRich Trott
Move C++ benchmark useful for NAPI to its own directory. This will isolate the benchmark so it can be excluded from testing that applies to all other benchmarks but not this one. PR-URL: https://github.com/nodejs/node/pull/21046 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-16tools: lint doc/*.md filesRich Trott
Makefile tasks only lint doc/**/*.md files but omit files that match doc/*.md. This change adds these previously-omitted files to the list of files to be linted. PR-URL: https://github.com/nodejs/node/pull/21361 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-06-11build: build addon tests in parallelAnna Henningsen
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-08build: stop distclean from deleting v8 filesUjjwal Sharma
Stop `make distclean` from deleting files in the `deps/v8/testing/gmock` folder, thus avoiding deleting version-controlled files important for v8. Fixes: https://github.com/nodejs/node/issues/21163 PR-URL: https://github.com/nodejs/node/pull/21164 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-06-07n-api: improve runtime perf of n-api func callKenny Yuan
Added a new struct CallbackBundle to eliminate all GetInternalField() calls. The principle is to store all required data inside a C++ struct, and then store the pointer in the JavaScript object. Before this change, the required data are stored in the JavaScript object in 3 or 4 seperate pointers. For every napi fun call, 3 of them have to be fetched out, which are 3 GetInternalField() calls; after this change, the C++ struct will be directly fetched out by using v8::External::Value(), which is faster. Profiling data show that GetInternalField() is slow. On an i7-4770K (3.50GHz) box, a C++ V8-binding fun call is 8 ns, before this change, napi fun call is 36 ns; after this change, napi fun call is 20 ns. The above data are measured using a modified benchmark in 'benchmark/misc/function_call'. The modification adds an indicator of the average time of a "chatty" napi fun call (max 50M runs). This change will speed up chatty case 1.8x (overall), and will cut down the delay of napi mechanism to approx. 0.5x. Background: a simple C++ binding function (e.g. receiving little from JS, doing little and returning little to JS) is called 'chatty' case for JS<-->C++ fun call routine. This improvement also applies to getter/setter fun calls. PR-URL: https://github.com/nodejs/node/pull/21072 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
2018-06-06test: create new directory v8-updatesMatheus Marchini
`v8-updates` holds all tests related to V8 updates, for example, testing for postmortem metadata chages. PR-URL: https://github.com/nodejs/node/pull/20783 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-06-06tools: ensure doc-only doesn't update package-lockMyles Borins
Currently `make doc-only` is updating the package-lock.json which is breaking our release build. This adds the flags `--no-package-lock` when running `npm install` to ensure the package-lock.json is not changed unintentionally by running make PR-URL: https://github.com/nodejs/node/pull/21015 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-22test: fix tests that fail under coverageBenjamin Coe
Make test runner capable of skipping tests, which makes it possible to skip the failing test/message/core_line_numbers.js test. Make nyc no longer generate compact instrumentation (this causes significantly different code output, which leads to failing test assertions). PR-URL: https://github.com/nodejs/node/pull/20794 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2018-05-18build: use nyc's merge commandBenjamin Coe
a 'merge' command has recently been added to nyc, eliminating the need for the istanbul-merge library. PR-URL: https://github.com/nodejs/node/pull/20760 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-05-14build: always use BUILDTYPE binary to run JS testsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/20362 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-05-05build: check for different deprecation signaturesRuben Bridgewater
Right now we strictly test for `DEP00XX`. We are already above that number of deprecations and it is better to have a wildcard for the first three numbers. Only the last character has to match the X to print a warning. PR-URL: https://github.com/nodejs/node/pull/20384 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-04-28tools: simplify HTML generationVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/20307 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-04-24build: use -9 with `kill` in MakefileRich Trott
Fixes: https://github.com/nodejs/node/issues/20194 PR-URL: https://github.com/nodejs/node/pull/20195 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-23build: normalise test.py calls to use PARALLEL_ARGSChris Miller
PR-URL: https://github.com/nodejs/node/pull/20124 Fixes: https://github.com/nodejs/node/issues/20065 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-04-11tools: fix make test-v8Michaël Zasso
PR-URL: https://github.com/nodejs/node/pull/19201 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-11build: update node.gyp to reference gypfiles/v8.gypJoyee Cheung
Refs: https://github.com/v8/v8/commit/f9934aa9cf77b76c5fa78137e32939f30d9e2f81 Fixes: https://github.com/nodejs/node-v8/issues/36 PR-URL: https://github.com/nodejs/node/pull/19201 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-04-04build: introduce make jstestJoyee Cheung
Add a `make jstest` target that runs tests written in JavaScript (excluding documentation tests which are run in `make test-doc`). PR-URL: https://github.com/nodejs/node/pull/19324 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com>
2018-04-03build: make lint-ci work properly on Linux makeRod Vagg
PR-URL: https://github.com/nodejs/node/pull/19746 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-03-06build: lint .eslintrc.js fileRich Trott
Update default files to be linted with ESLint to include .eslintrc.js. PR-URL: https://github.com/nodejs/node/pull/19122 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-03-05build: fix gocvr version used for coverageMichael Dawson
Fix the gcovr version to a fixed version and uses patches specific to that version. This avoids us being broken by changes in the gcovr repo. Using file name for patches specific to the version level will allow us to move up when necessary without breaking coverage for earlier versions of Node.js PR-URL: https://github.com/nodejs/node/pull/19094 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2018-02-28build: fix coverage after gcovr updatekillagu
PR-URL: https://github.com/nodejs/node/pull/18958 Fixes: https://github.com/nodejs/node/issues/18938 Ref: https://github.com/nodejs/build/pull/1145 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>