Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring the doctool up to date on v4.x #7668

Merged
merged 20 commits into from
Jul 12, 2016

Conversation

addaleax
Copy link
Member

Backport:

I’m sorry.

@addaleax addaleax added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. v4.x labels Jul 12, 2016
@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. util Issues and PRs related to the built-in util module. build Issues and PRs related to build files or the CI. labels Jul 12, 2016
@MylesBorins
Copy link
Contributor

WOWOW code forensics.

So this biggest question for me in all this is if we want to include 294d370 as it is semver-minor

/cc @nodejs/lts

Perhaps we should talk about this big backport briefly on the call on Wednesday (adding label)

@addaleax
Copy link
Member Author

So this biggest question for me in all this is if we want to include 294d370 as it is semver-minor

I was assuming that, yes. It’s definitely non-essential here, but I saw an opportunity to do something that basically just made sense.

@addaleax
Copy link
Member Author

Rebased against the current v4.x-staging, CI: https://ci.nodejs.org/job/node-test-commit/4070/

@MylesBorins
Copy link
Contributor

@addaleax I'm going to request another rebase here and to drop 294d370. I don't think that is a valid candidate for LTS

You may find a spurious test: http commit after the rebase, so keep an eye out. Thanks for the patience

@addaleax addaleax removed the http Issues or PRs related to the http subsystem. label Jul 12, 2016
@addaleax
Copy link
Member Author

Rebased & removed the HTTP commit.

addaleax and others added 8 commits July 12, 2016 19:49
Add a hack js-yaml module to the doctool dependencies that simply
loads the one that’s included with eslint.

This helps avoiding to check in the whole dependency tree into
the core repo.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit introduces the Documentation YAML metadata concept to the
documentation.

- Parses added or Added for HTML
- Parses all data for JSON

Ref: nodejs#3867
Ref: nodejs#3713
Ref: nodejs#6470
PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Add checks that make sure the doctool parses metadata correctly.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Allow multiple `added:` version entries, since semver-minors
can trickle down to previous major versions, and thus
features may have been added in multiple versions.

Also include `deprecated:` entries and apply the same logic
to them for consistency.

Stylize the added HTML as `Added in:` and `Deprecated since:`.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Update module marked. Customize renderer to remove id from heading.

PR-URL: nodejs#6396
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
There has been occasional nits for spacing in object literals in PRs but
the project does not lint for it and it is not always handled
consistently in the existing code, even on adjacent lines of a file.

This change enables a linting rule requiring no space between the key
and the colon, and requiring at least one space (but allowing for more
so property values can be lined up if desired) between the colon and the
value. This appears to be the most common style used in the current code
base.

Example code the complies with lint rule:

    myObj = { foo: 'bar' };

Examples that do not comply with the lint rule:

    myObj = { foo : 'bar' };
    myObj = { foo:'bar' };

PR-URL: nodejs#6592
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
PR-URL: nodejs#6652
Reviewed-By: Anna Henningsen <anna@addaleax.net>
bnoordhuis and others added 12 commits July 12, 2016 19:49
Use the overload of `v8::Function::NewInstance()` that returns a
`v8::MaybeLocal<v8::Object>`.  The overloads that return a simple
`v8::Local<v8::Object>` are deprecated.

PR-URL: nodejs#6652
Reviewed-By: Anna Henningsen <anna@addaleax.net>
* Make the 'extract embedded addons in the documentations' step a normal
  prerequisite.  As an order-only prerequisite, it's sometimes skipped
  when it shouldn't be.

* Make `tools/doc/addon-verify.js` a dependency of that step.  Changes
  to that file should result in a rebuild.

PR-URL: nodejs#6652
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Introduced in commit 3f69ea5 ("tools: update marked dependency"), it
stopped the embedded addons in the documentation from getting built.

PR-URL: nodejs#6652
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Allows building just docs using existing Node instead of building Node
first.

PR-URL: nodejs#3888
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
101dd1e introduced a regression in the doctool. This commit reverts
the changes that were made to the function signature of the various
doctool functions while maintaining support for passing in specific
node versions.

Refs: nodejs@101dd1e

PR-URL: nodejs#6680
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
Adjust style in doctool tests to conform with predominant style of the
rest of the project. The biggest changes are:

* Replace string concatenation with `path.join()`
* Remove unnecessary quotes from property names

PR-URL: nodejs#6719
Reviewed-By: James M Snell <jasnell@gmail.com>
These signatures were originally converted to opts hashes in nodejs#3888. That
change was misinterpreted as the intrinsic cause of a test failure and
reverted in nodejs#6680.

PR-URL: nodejs#6690
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Previously, output files which were created using includes (notably,
the single-page all.html) had basically broken internal links all
over the place because references like `errors.html#errors_class_error`
are being used, yet `id` attributes were generated that looked like
`all_class_error`.

This PR adds generation of comments from the include preprocessor
that indicate from which file the current markdown bits come and
lets the HTML output generation take advantage of that so that more
appropriate `id` attributes can be generated.

PR-URL: nodejs#6943
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com>
Reviewed-By: Daniel Wang <wangyang0123@gmail.com>
Ref: nodejs#6578
PR-URL: nodejs#6864
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Add a `REPLACEME` tag that should be used when introducing
docs for new features, so that they can be updated when releases
are made.

Ref: nodejs#6578
PR-URL: nodejs#6864
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Skip the doctool tests when js-yaml, which is currently `require()`d
from the eslint source tree, is missing. This can happen, for example,
because eslint is not included in the release source tarballs.

Fixes: nodejs#7201
Ref: nodejs#6495
PR-URL: nodejs#7218
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
After the nodejs#3888 it was not possible to "make doc-only"
in some situations. This now fallsback to any installed
node version and throws "node not found" in error case.

Ref: nodejs#3888

PR-URL: nodejs#6906
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins merged commit 76c7918 into nodejs:v4.x-staging Jul 12, 2016
@addaleax addaleax deleted the backport-doctool-stuff branch July 12, 2016 18:00
@MylesBorins MylesBorins removed their assignment Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants