Commit Graph

1812 Commits

Author SHA1 Message Date
Rich Trott
85811d1ade tools: fix lint-md autolinking
Update a transitive dependency in lint-md to fix an autolink bug in the
formatter that causes a lot of our files (particularly changelogs) to be
misformatted when run through the automatic formatter.

Refs: 7555d45f9a

PR-URL: https://github.com/nodejs/node/pull/40181
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-09-25 10:23:30 -07:00
Rich Trott
6077473111 tools: implement markdown formatting
Markdown formatter is now available via `mark format-md` (or
`vcbuild format-md` on Windows).

PR-URL: https://github.com/nodejs/node/pull/40181
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2021-09-25 10:23:20 -07:00
Rich Trott
8d83c47029 tools: re-implement lint-md without unified-args
`unified-args` ignores settings in the preset, expecting them to be in
remarkrc files or passed on the command line instead. Realizing that
we always send the same configuration options via the command-line
anyway, this removes `unified-args`. This means the preset settings are
now respected and it removes nearly 30000 lines of code in the resulting
rollup file.

I wasn't sure I was going to want to keep rollup so I started
re-implementing this without it, but ended up putting a minimal rollup
back as it still saves about 90000 lines of code vs. checking in
`node_modules`.

PR-URL: https://github.com/nodejs/node/pull/40180
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-25 03:51:52 +00:00
Rich Trott
51d2623034 tools: update remark-preset-lint-node to 3.1.0
Update remark-preset-lint-node from 3.0.1 to 3.1.0. This is a necessary
step before we can use the lint preset to format markdown files.

PR-URL: https://github.com/nodejs/node/pull/40166
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-22 22:28:46 +00:00
Rich Trott
24cc239cad tools: fix find-inactive-collaborators for recent README change
I missed this change in 420cdc7cf9.

PR-URL: https://github.com/nodejs/node/pull/40163
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-09-22 21:24:28 +00:00
Rich Trott
0c95dead55 doc: update tools .md files for upcoming lint/formatting
Looks like only one .md file in `tools` needs to be changed.

PR-URL: https://github.com/nodejs/node/pull/40155
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-21 16:58:58 -07:00
Michaël Zasso
f367af4434 tools: extend default yamllint config
PR-URL: https://github.com/nodejs/node/pull/40150
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-09-21 17:03:51 +00:00
Rich Trott
420cdc7cf9 doc: prepare README.md for stricter linting
PR-URL: https://github.com/nodejs/node/pull/40137
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-09-20 12:01:25 +00:00
Rich Trott
b0d5eecdd9 tools,doc: fix misrendering of consecutive JS blocks
Our markdown-to-html tool was assuming that any consecutive JS blocks
were ESM vs CJS alternatives, but that is not always the case, resulting
in both a confusing interface and invalid HTML.

PR-URL: https://github.com/nodejs/node/pull/40146
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-19 07:58:17 +00:00
Michaël Zasso
2b080cb23f tools: update doc generator dependencies
PR-URL: https://github.com/nodejs/node/pull/40042
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-09-18 16:32:44 +02:00
Antoine du Hamel
8122d243ae readline: introduce promise-based API
PR-URL: https://github.com/nodejs/node/pull/37947
Fixes: https://github.com/nodejs/node/issues/37287
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2021-09-16 23:16:37 +02:00
Rich Trott
64266419c4 tools: update ansi-regex in lint-md rollup
Update ansi-regex from 6.0.0 to 6.0.1.

Refs: https://snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908

PR-URL: https://github.com/nodejs/node/pull/40112
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-09-15 08:30:06 +00:00
Michaël Zasso
dce7511062 tools: update all dependencies of markdown linter
PR-URL: https://github.com/nodejs/node/pull/40035
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-09-12 17:51:12 +00:00
Michaël Zasso
8c905b81c1 tools: update remark-html to v13.0.2
PR-URL: https://github.com/nodejs/node/pull/40043
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-09-09 02:08:03 +00:00
Antoine du Hamel
f26c2ce0a1 tools: add support for import assertions in linter
PR-URL: https://github.com/nodejs/node/pull/39924
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-09-03 07:44:26 -07:00
Michaël Zasso
4595a0e5f6 tools: update gyp-next to v0.10.0
PR-URL: https://github.com/nodejs/node/pull/39857
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-09-01 23:11:30 +02:00
Michaël Zasso
3cc328a648 build: adapt v8_pch.h to V8 9.3
A header was moved.

Refs: 7f5383e8ad

PR-URL: https://github.com/nodejs/node/pull/39469
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-08-30 21:03:23 +02:00
Michaël Zasso
bcc449de4a tools: update V8 gypfiles for 9.3
PR-URL: https://github.com/nodejs/node/pull/39469
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-08-30 21:03:19 +02:00
foxxyz
6fdd5827f0 doc: anchor link parity between markdown and html-generated docs
Main changes:

- Replace current HTML anchor generation to match
  header anchor generation in Github markdown.
- Remove unnecessary double namespacing on generated anchors/links (E.G.
  `esm.md#loaders` instead of `esm.md#esm_loaders`).
- Anchors/links are automatically prefixed with their respective modules
  when concatenated for usage in `all.html`.

Benefits:

- All anchor links within and between markdown API docs actually work.
- Adding new anchor links no longer requires contributors to generate
  the HTML docs first to look up the correct anchors.
- Anchors are much shorter.
- All previous anchor links are preserved by generating hidden legacy
  anchors.

PR-URL: https://github.com/nodejs/node/pull/39304
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-30 00:40:20 +02:00
Maël Nison
46598b88bf deps: add corepack
Corepack provides shims for Yarn and pnpm in order to soften the
developer experience when working on Node projects.

Refs: https://github.com/nodejs/node/issues/15244
Refs: https://github.com/nodejs/TSC/issues/904

PR-URL: https://github.com/nodejs/node/pull/39608
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-25 07:55:32 -07:00
Rich Trott
67f96dd85e tools: use find-inactive-collaborators to modify README.md
Update find-inactive-collaborators to move inactive collaborators to the
emeriti section of README.md.

PR-URL: https://github.com/nodejs/node/pull/39825
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-25 04:22:24 +00:00
Jiawen Geng
28113ed92e tools: update gyp-next to v0.9.5
PR-URL: https://github.com/nodejs/node/pull/39818
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-08-23 07:48:13 +00:00
Rich Trott
11109470b7 tools: fix markdown linting
This updates remark-preset-lint-node to 3.0.1, which actually works
unlike the 3.0.0 version we're using. (Sorry about 3.0.0 not actually
linting!)

It also updates rollup and the rollup config. So this uses the
latest everything as of this writing.

PR-URL: https://github.com/nodejs/node/pull/39832
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-22 04:13:32 +00:00
Antoine du Hamel
af45be715a tools: update markdown linter dependencies and move to ESM
PR-URL: https://github.com/nodejs/node/pull/39801
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-21 06:16:34 -07:00
Rich Trott
f6ee27fe67 tools: update rollup to latest version in markdown linter
PR-URL: https://github.com/nodejs/node/pull/39797
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-20 02:25:25 +00:00
Rich Trott
f7a2aec650 tools: update markdown lint dependencies
PR-URL: https://github.com/nodejs/node/pull/39770
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-08-17 13:31:28 +00:00
Rich Trott
75bd4da553 tools: bump remark-preset-lint-node to 3.0.0
PR-URL: https://github.com/nodejs/node/pull/39755
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-08-15 12:53:13 +00:00
Rich Trott
1150cfe6eb tools: update path-parse in markdown linter package-lock file
Refs: https://github.com/advisories/GHSA-hj48-42vr-x3v9

PR-URL: https://github.com/nodejs/node/pull/39729
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-08-13 05:56:38 +00:00
Richard Lau
8c954103ab tools: fix more build warnings in inspector_protocol
PR-URL: https://github.com/nodejs/node/pull/39725
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-12 14:45:48 -07:00
Darshan Sen
a48b9c330a tools: cherry-pick ffb34b6d5d
Original commit message:

    tools: fix compiler warning in inspector_protocol

    error: comparison of integer expressions of different signedness:
    ‘int’ and ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
     2562 |           if (!success || std::numeric_limits<int32_t>::max() <
          |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
     2563 |                               token_start_internal_value_) {
          |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    PR-URL: https://github.com/nodejs/node/pull/37573
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/39725
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-12 14:45:46 -07:00
bcoe
87d6fd7e69 fs: add recursive cp method
Introduces recursive cp method, based on fs-extra implementation.

PR-URL: https://github.com/nodejs/node/pull/39372
Fixes: https://github.com/nodejs/node/issues/35880
Refs: https://github.com/nodejs/tooling/issues/98
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ian Sutherland <ian@iansutherland.ca>
2021-08-11 19:53:32 -07:00
Rich Trott
a1fac5b9a5 tools: update inspector_protocol to e8ba1a7
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:05 +00:00
Rich Trott
74c4f82282 tools: update inspector_protocol to 39ca567
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:04 +00:00
Rich Trott
0187474535 tools: update inspector_protocol to 97d3146
To apply the diff cleanly, ffb34b6 had to be reverted.

Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:03 +00:00
Rich Trott
585d4efd7c Revert "tools: fix compiler warning in inspector_protocol"
This reverts commit ffb34b6d5d.

PR-URL: https://github.com/nodejs/node/pull/39694
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:02 +00:00
Rich Trott
9bc2a5976c tools: update inspector_protocol to a53e96d31a2755eb16ca37
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:01 +00:00
Rich Trott
c3df329889 tools: update inspector_protocol to fe0467fd105a
Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39694
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 18:56:00 +00:00
Michaël Zasso
df25424b91 build: fix V8 build with pointer compression
Refs: https://github.com/nodejs/TSC/issues/790#issuecomment-893457655

PR-URL: https://github.com/nodejs/node/pull/39664
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
2021-08-07 20:27:17 +02:00
Rich Trott
58316e2caa inspector: update inspector_protocol to 89c4adf
Apply a366321, 37518ac, and 89c4adf to tools/inspector_protocol.

Refs: https://chromium.googlesource.com/deps/inspector_protocol/+log

PR-URL: https://github.com/nodejs/node/pull/39650
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-05 13:57:43 +00:00
Rich Trott
dd18795997 tools: improve error detection in find-inactive-collaborators
Previously, if the script failed to find a collaborator section in the
README file, it would carry on with no results and no error. This
detects the problem and throws an error.

It is also more robust in that it will still work if the emeriti section
ends up getting moved and does not immedaitely follow the collaborator
section.

PR-URL: https://github.com/nodejs/node/pull/39617
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-03 15:48:12 +00:00
Robert Nagy
533cafcf7e stream: duplexify
PR-URL: https://github.com/nodejs/node/pull/39519
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-08-03 10:47:10 +02:00
Rich Trott
9e904470f4 inspector: update inspector_protocol to 8ec18cf
Apply 8ec18cf: "Support STRING16 in the template when converting CBOR
map keys"

Refs: 8ec18cf088

We're over 2 years out of date in the tools/inspector_protocol directory
and I have to imagine this will come back to bite us at some point. But
I also don't want to do a huge update all at once, so starting with a
single commit. I might bundle commits together a bit more if this goes
well.

PR-URL: https://github.com/nodejs/node/pull/39614
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-08-03 04:54:54 +00:00
Luigi Pinca
296354950c tools: update ESLint to 7.32.0
PR-URL: https://github.com/nodejs/node/pull/39602
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
2021-08-02 18:44:23 +02:00
cjihrig
31e8c63a73 tools: update ESLint to 7.31.0
Update ESLint to 7.31.0

PR-URL: https://github.com/nodejs/node/pull/39424
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-28 00:21:36 -04:00
Rich Trott
7228640cc6 tools: flag README/mailmap mismatches in find-inactive-collaborators
PR-URL: https://github.com/nodejs/node/pull/39477
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-07-23 13:14:17 +00:00
Antoine du Hamel
ab73d95ace doc,tools: remove checkLinks.mjs
The checks made by this are now integrated to `remark-preset-lint-node`,
there are no reason to keep it around anymore.

PR-URL: https://github.com/nodejs/node/pull/39206
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-23 09:38:35 +02:00
Rich Trott
28a579bbc2 tools: use mailmap for find-inactive-collaborators
The current version of find-inactive-collaborators can generate a false
positive if the mailmap entry for a collaborator does not match the
entry in the README. (We should probably lint or otherwise check for
that sort of mismatch but regardless, it is relatively easy to avoid
having find-inactive-collaborators tripped up by it, so let's fix that
too, which is this commit.)

PR-URL: https://github.com/nodejs/node/pull/39432
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-21 04:58:21 +00:00
Rich Trott
978343f574 tools: email matchin is case insensitive for .mailmap
PR-URL: https://github.com/nodejs/node/pull/39430
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-20 21:39:08 -07:00
Rich Trott
ad5dc4c469 tools: make internal link checker more robust
The internal link checker was missing some broken links because it was
being too restrictive about the characters it accepted as part of a link
hash. Accept anything that isn't a terminating quotation mark.

Refs: https://github.com/nodejs/node/pull/39426
Refs: https://github.com/nodejs/node/pull/39425

PR-URL: https://github.com/nodejs/node/pull/39429
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2021-07-20 14:13:59 +00:00
Michaël Zasso
e83c8aef4b tools: fetch googletest dependency for V8 CI
gtest_prod.h is not enough to build V8's cctests.

PR-URL: https://github.com/nodejs/node/pull/38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-20 15:29:37 +02:00