aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2018-09-06tools: update dmn to 2.0.0Rich Trott
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-05tools: add [src] links to async_hooks.htmlSam Ruby
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-02tools: add [src] links to assert.htmlSam Ruby
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-02doc: Remove 'dnt_helper.js'MaleDong
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-08-31build: do not copy v8-inspector* headers ar part of installAlexey Kozyatinskiy
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-29tools: Include links to source code in documentationSam Ruby
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-26doc: support 'removed' field in doc YAML sectionsSarat Addepalli
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-25tools: add missing package-lock to clang-formatMichaël Zasso
`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-24process: add allowedNodeEnvironmentFlags propertyChristopher Hiller
`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-25gyp: muffle xcodebuild warningsUjjwal Sharma
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-23tools: update ESLint to 5.4.0Rich Trott
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-18src: perform integrity checks on built-in code cacheJoyee Cheung
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-13fs: readdir optionally returning type informationBryan English
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-13tools: fix header escaping regressionSam Ruby
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-10inspector: add inspector_protocol as a direct dependencyAndrey Lushnikov
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-08tools: do not autolink section to itselfVse Mozhet Byt
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-07tools: update ESLint to 5.3.0Rich Trott
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-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-01tools: update to using dmn 1.0.11Rich Trott
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-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-31tools,test: remove unused config hooksJon Moss
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-29tools: patch gyp to avoid xcrun errorsUjjwal Sharma
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-29tools: update cpplint to check for inline headersUjjwal Sharma
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-28tools: update ESLint to 5.2.0Yuta Hiroto
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-28tools: convert addon-verify to remarkSam Ruby
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-27tools: define xrange() in Python 3cclauss
__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-27build,win,v8: allow precompiling objects-inl.hJoão Reis
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-27build: create V8 code cache after script is runJoyee Cheung
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-26tools: fix docs and run known_issues by defaultJon Moss
- 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-26tools: remove obsolete entries from licenseRich Trott
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-26tools: flatten apidoc headersSam Ruby
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-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-24doc: specify `options` parameter type in zlib.mdVse Mozhet Byt
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-22tools: validate apidoc linksSam Ruby
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-21tools: build API TOC using raw headersSam Ruby
Markdown interprets the syntax for optional arguments as a form of a link, so instead of trying to build up the contents using the node value, use grab the raw original markup instead. Fixes regression noted in https://github.com/nodejs/node/pull/21490#issuecomment-406785023 PR-URL: https://github.com/nodejs/node/pull/21922 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-20tools: create HTML docs with unified/remark/rehypeSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-19tools: improve update-eslint.shRich Trott
* 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-19tools: make getnodeversion.py python3-compatiblesilverwind
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-19tools: properly convert .gypi in install.pyMichael Achenbach
It was breaking during install when .gypi strings had quotes in them. e.g.: 'foo': 'bar="baz"'
2018-07-14src,tools: use https://nodejs.org URL when possible.XhmikosR
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-13doc: add "Edit on GitHub" linkRich Trott
Proof of concept for an "Edit on GitHub" link, inspired by the Serverless docs. One issue is that the link is to the version of the docs on the master branch even if the person was reading a different version of the doc. I don't consider that a big problem, although we can always remove the link if it turns out to be a big problem. I don't think there is a good solution. PRs need to be opened against the master branch generally. Having a bunch of PRs against staging branches is probably not what we want. If there's an update to one version of the doc, there will usually be an update to other versions. PR-URL: https://github.com/nodejs/node/pull/21703 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2018-07-12tools: avoid global install of dmn for lint updateRich Trott
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-12tools: add no-duplicate-requires ruleGus Caplan
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-09tools: build all.json by combining generated JSONSam Ruby
Notes: 1) Removed a number of root properties that did not seem relevant: source, desc, and introduced_in. There no longer is a source, and the other two are from the first include and do not reflect the entire API. 2) As with https://github.com/nodejs/node/issues/20100, the current "desc" properties sometimes contained in-page links, other times referenced another page, and often did not match the links in the original HTML or JSON file. I chose to standardize on external links as "desc" values are isolated snippets as opposed to all.html which can be viewed as a standalone and self contained document. 3) Eliminated preprocessing for @include entirely, including the test case for this function. 4) _toc.md was renamed to index.md. 5) index comments no longer appear in embedded TOCs (left hand side column in the generated documentation. PR-URL: https://github.com/nodejs/node/pull/21637 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-05n-api: restrict exports by versionKyle Farnung
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: https://github.com/nodejs/node/pull/19962 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-07-02tools: build all.html by combining generated HTMLSam Ruby
Combine the toc and api contents from the generated doc/api/*.html files. This ensures that the single page version of the documentation exactly matches the individual pages. PR-URL: https://github.com/nodejs/node/pull/21568 Fixes: https://github.com/nodejs/node/issues/20100 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-07-02doc: fix some linksVse Mozhet Byt
PR-URL: https://github.com/nodejs/node/pull/21619 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-06-27src: move context bootstrap to jsGus Caplan
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-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-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>