Sam Ruby
cba2c7a874
tools: update to mdast-util-to-hast v3.0.2
...
See https://github.com/syntax-tree/mdast-util-to-hast/pull/21
Note: I updated all of the tools/doc dependencies, not just this one,
and removed the previous workaround that was in place until this change
landed.
PR-URL: https://github.com/nodejs/node/pull/22140
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2019-03-10 10:26:29 -04:00
Sam Ruby
6696354dba
build: add loader path to rpath for cctest
...
Building on Mac OS/X as follows:
```
./configure --shared
make -j4 test
```
Results in:
```
dyld: Library not loaded: @rpath/libnode.67.dylib
Referenced from: /Users/rubys/git/node-shared/out/Release/cctest
Reason: image not found
make: *** [cctest] Abort trap: 6
```
This change adds the loader path to the runtime path for the `cctest` executable.
PR-URL: https://github.com/nodejs/node/pull/23168
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-10-04 08:35:57 +02:00
Sam Ruby
8737683ba0
tools: add [src] links to child-process.html
...
handle exports. as an alternative to module.exports
PR-URL: https://github.com/nodejs/node/pull/22706
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-09-08 13:42:41 -04:00
Sam Ruby
441391b9eb
tools: add [src] links to async_hooks.html
...
handle ES2015 Class, contructor, and instance methods
unrelated: update Makefile so that generated HTML is out of date whenever
tools/doc/apilinks.js is updated.
PR-URL: https://github.com/nodejs/node/pull/22656
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-05 12:46:51 +02:00
Sam Ruby
5da155398e
tools: add [src] links to assert.html
...
Parse `const assert = module.exports = ok;` as exporting a constructor
named `assert`.
PR-URL: https://github.com/nodejs/node/pull/22601
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-09-02 10:14:03 -04:00
Sam Ruby
60465700ed
tools: Include links to source code in documentation
...
Parse source code using acorn; extracting exports. When producing
documentation, match exports to headers. When a match is found, add a [src]
link.
This first commit handles simple exported classes and functions, and does so
without requiring any changes to the source code or markdown. Subsequent
commits will attempt to match more headers, and some of these changes are
likely to require changes to the source code and/or markdown.
PR-URL: https://github.com/nodejs/node/pull/22405
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-08-29 22:20:46 -04:00
Sam Ruby
49bfc37241
deps: import acorn@5.7.2
...
Imported from the tarball published on npm
(https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz ).
Update to emcaScript version 10 in order to get support for
binding-less catch statements.
Also needed to parse node.js lib API in #22405 .
PR-URL: https://github.com/nodejs/node/pull/22488
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-26 17:48:09 -04:00
Sam Ruby
59f8276a6b
tools: fix header escaping regression
...
quick fix for #22065
Preferred long term fix can be found at:
https://github.com/nodejs/node/pull/22140
PR-URL: https://github.com/nodejs/node/pull/22084
Fixes: https://github.com/nodejs/node/issues/22065
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-08-13 09:14:42 -06:00
Sam Ruby
a2ec80851c
repl: support mult-line string-keyed objects
...
isRecoverableError is completely reimplemented using acorn and an
acorn plugin that examines the state of the parser at the time of the
error to determine if the code could be completed on a subsequent line.
PR-URL: https://github.com/nodejs/node/pull/21805
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-03 20:20:00 -07:00
Sam Ruby
f19fa7ca4d
doc: add rubys to collaborators
...
PR-URL: https://github.com/nodejs/node/pull/22109
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
2018-08-03 13:37:08 -04:00
Sam Ruby
19aa41c6fc
https: allow url and options to be passed to https.request
...
PR-URL: https://github.com/nodejs/node/pull/22003
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-31 22:53:25 -07:00
Sam Ruby
3ffd6892c4
tools: convert addon-verify to remark
...
This is the last use of the remark *module*. tools/remark-cli and
tools/remark-preset-lint-node remain.
PR-URL: https://github.com/nodejs/node/pull/21978
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-28 10:40:35 +03:00
Sam Ruby
838001d4b3
test: don't fail http2 abort test if 'data' is called multiple times
...
PR-URL: https://github.com/nodejs/node/pull/21925
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-25 14:37:45 -07:00
Sam Ruby
83474ae1e3
tools: flatten apidoc headers
...
ensure optional parameters are not treated as markedown links by
replacing the children of headers nodes with a single text node
containing the raw markup;
Fixes issue identified in
https://github.com/nodejs/node/pull/21490#issuecomment-406859983
PR-URL: https://github.com/nodejs/node/pull/21936
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-07-26 00:27:59 +03:00
Sam Ruby
f41dd5592e
tools: produce JSON documentation using unified/remark/rehype
...
PR-URL: https://github.com/nodejs/node/pull/21697
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-25 21:33:06 +03:00
Sam Ruby
c57e11c2f6
test: provide better message for orphan output documentation
...
PR-URL: https://github.com/nodejs/node/pull/21913
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-07-23 12:51:11 -07:00
Sam Ruby
78039b5f87
tools: validate apidoc links
...
PR-URL: https://github.com/nodejs/node/pull/21889
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-07-22 19:33:55 +03:00
Sam Ruby
46de34b8c2
tools: build API TOC using raw headers
...
Markdown interprets the syntax for optional arguments as a form
of a link, so instead of trying to build up the contents using
the node value, use grab the raw original markup instead.
Fixes regression noted in
https://github.com/nodejs/node/pull/21490#issuecomment-406785023
PR-URL: https://github.com/nodejs/node/pull/21922
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-07-21 22:20:10 +03:00
Sam Ruby
946686521d
tools: create HTML docs with unified/remark/rehype
...
PR-URL: https://github.com/nodejs/node/pull/21490
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-07-20 13:37:40 -07:00
Sam Ruby
6a99e3e21c
doc: make markdown input compliant
...
PR-URL: https://github.com/nodejs/node/pull/21780
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-07-16 00:04:56 +03:00
Sam Ruby
40c85ff063
doc: declare all parameter types
...
PR-URL: https://github.com/nodejs/node/pull/21782
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-07-15 23:57:35 +03:00
Sam Ruby
4d42083d1a
repl: make own properties shadow prototype properties
...
Previously, the code displayed properties backwards (e.g., showing
prototype properties before own properties). It also did uniqueness
checks during this processing, so these checks were done backwards.
After this change, the properties continue to be displayed backwards,
but the uniqueness checks are done in the proper order.
See also: https://github.com/nodejs/node/issues/21586 which was
discovered during the testing of this fix.
Fixes: https://github.com/nodejs/node/issues/15199
PR-URL: https://github.com/nodejs/node/pull/21588
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-13 18:57:16 +02:00
Sam Ruby
f9b739ebbc
http: allow url and options to be passed to http*.request and http*.get
...
Fixes: https://github.com/nodejs/node/issues/20795
PR-URL: https://github.com/nodejs/node/pull/21616
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-07-13 14:09:39 +01:00
Sam Ruby
0c743b5f77
tools: build all.json by combining generated JSON
...
Notes:
1) Removed a number of root properties that did not seem relevant:
source, desc, and introduced_in. There no longer is a source, and
the other two are from the first include and do not reflect the
entire API.
2) As with https://github.com/nodejs/node/issues/20100 , the current
"desc" properties sometimes contained in-page links, other times
referenced another page, and often did not match the links in the
original HTML or JSON file. I chose to standardize on external links
as "desc" values are isolated snippets as opposed to all.html which
can be viewed as a standalone and self contained document.
3) Eliminated preprocessing for @include entirely, including the test
case for this function.
4) _toc.md was renamed to index.md.
5) index comments no longer appear in embedded TOCs (left hand side
column in the generated documentation.
PR-URL: https://github.com/nodejs/node/pull/21637
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-07-09 22:57:33 +03:00
Sam Ruby
f85962fe4d
tools: build all.html by combining generated HTML
...
Combine the toc and api contents from the generated doc/api/*.html
files. This ensures that the single page version of the documentation
exactly matches the individual pages.
PR-URL: https://github.com/nodejs/node/pull/21568
Fixes: https://github.com/nodejs/node/issues/20100
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-07-02 21:33:30 +03:00