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>
Currently, the lint-addon-docs targets recipe will always be run.
This commit makes lint-addon-docs a phony target and adds a new
target named tools/.doclintstamp what will be an actual file,
similar to what the lint-cpp target does.
PR-URL: https://github.com/nodejs/node/pull/24993
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
When run locally [flake8](http://flake8.pycqa.org) was creating false positives by scanning the __.git__ directory. This PR prevents that behavior.
PR-URL: https://github.com/nodejs/node/pull/24802
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
bench-addons-build is not needed by test-ci.
PR-URL: https://github.com/nodejs/node/pull/24342
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit uses the BUILDTYPE for the benchmark targets that currently
explicitly use Release as the build type.
The motivation for this change is allows switching between debug builds
and release builds using the bench-addons-clean/bench-addons-build
targets.
PR-URL: https://github.com/nodejs/node/pull/24033
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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>
This patch:
- Creates a new test suite `wpt` that can be used to run a subset
of Web Platform Tests
- Adds a `WPTRunner` in `test/common/wpt.js` that can run the WPT
subset in `test/fixtures/wpt` with a vm and the WPT harness
while taking the status file in `test/wpt/status` into account.
Here we use a new format of status file (in JSON) to handle specific
requirements (like ICU requirements) in the tests and to handle
expected failures and TODOs.
- Adds documentation on how the runner and the update automation works
- Runs the WHATWG URL tests and the console tests with the new test
runner.
With this patch we eliminates the need of copy-pasting with manual
modifications to update a large chunk of our WPT subset previously
maintained in `test/parallel`. Now the tests run in `test/wpt` can
be automatically updated with `git node wpt` without modifications
by the actual WPT harness instead of our home-grown mock.
There are still a few URL tests left that need to be migrated in the
upstream to be placed in .js instead of .html - we currently still use
the legacy harness mock in the test files.
PR-URL: https://github.com/nodejs/node/pull/24035
Refs: https://github.com/nodejs/node/issues/23192
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Right now `node -p process.versions.openssl` always gets run
in the Makefile even when it's not needed by the target
(e.g. `make clean`, `make test-only`). This patch makes it
a run time call instead of part of the global expansion.
PR-URL: https://github.com/nodejs/node/pull/24115
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
This commit makes the all prerequisites order-only to prevent this
target's rules to be executed every time which is currently the case as
the all target is a phony target and will be executed every time.
PR-URL: https://github.com/nodejs/node/pull/23951
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Also makes sure that the napi benchmark is built before running jstest.
Skipped on windows since n-api benchmarks aren't built there yet.
PR-URL: https://github.com/nodejs/node/pull/23585
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Changes in command line options for nyc resulted in the
coverage target no longer working.
Pin the major version of nyc and update the options to
get it working again.
PR-URL: https://github.com/nodejs/node/pull/23769
Fixes: https://github.com/nodejs/node/issues/23690
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
All the sub targets have internal parallelism, so no performance loss.
Also `make` doesn't to a good enough job of combining the output
streams, or eliminate races.
PR-URL: https://github.com/nodejs/node/pull/23733
Fixes: https://github.com/nodejs/node/issues/22006
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
This commit the verbosity of cpplint to be toggled by using the V
variable. The default setting is verbose but by passing an empty string
cpplint will be quiet.
PR-URL: https://github.com/nodejs/node/pull/23217
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit adds the --quiet flag to cpplint for the lint-addon-docs
target to be consistent with the lint-cpp target.
PR-URL: https://github.com/nodejs/node/pull/23217
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
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>
Run `node_js2c` and `mkssldef` as actions and not as targets makes sure
they are run only once, just before processing the rest of `node_lib`.
This helps `make` based dependency change detection be more accurate.
Add comments with tagrget names for readability.
Use `process_outputs_as_sources` for automatic inclution of outputs.
PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit adds the --quiet flag to cpplint to avoid informational
output like:
Done processing src/node.cc
...
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>
Remove unnecessary @echo commands from Makefile.
These were originally comments but were changed to @echo in 6bc43aeea7.
They aren't terribly useful so let's remove them.
PR-URL: https://github.com/nodejs/node/pull/23129
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Displaying a message about building addons before building docs can be
confusing when troubleshooting. (This just happened to me.) Move the
message about building addons to just before the step for building
addons.
PR-URL: https://github.com/nodejs/node/pull/23114
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/22935
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The executed command is very verbose and removing that from the
output improves the overall experience.
PR-URL: https://github.com/nodejs/node/pull/22904
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
!Should go with next commit!
* renaming so that IDEs can properly detect this as python
* Add dependency to Makefile
PR-URL: https://github.com/nodejs/node/pull/22450
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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>
On a aarch64 system I can run the complete build with tests without
specifying the Makefile variable DESTCPU.
But when running the tar-headers target DESTCPU is passed to configure:
$(PYTHON) ./configure \
--prefix=/ \
--dest-cpu=$(DESTCPU) \
...
The value of DESTCPU in this case will be aarch64 which will cause
configure to fail:
configure: error: option --dest-cpu: invalid choice: 'aarch64'
(choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x')
In the configure script there is a matching of __aarch64__ to arm64:
$ python -c 'from configure import host_arch_cc; print host_arch_cc()'
arm64
In our case it would be nice to have consitent behaviour for both of
these cases on aarch64.
This commit changes DESTCPU to arm64 to be consistent with the
configure script. DESTCPU is used in $(TARBALL)-headers and in
$(BINARYTAR) but I'm not sure about the implications of making the
change purposed and hope others might chime in and provide some
guidance.
PR-URL: https://github.com/nodejs/node/pull/22548
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
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>
This reverts commit 4e2fa8b0dc.
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>
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>
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>
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 88bff82624 ("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>
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>
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>
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>
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>
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>