Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

documentation

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documentation - npm Package Versions

1
12

4.0.0-beta4

Diff

Changelog

Source

4.0.0-beta4

  • Fix minor dependency mistake
tmcw
published 4.0.0-beta3 •

Changelog

Source

4.0.0-beta3

  • Updates theme to a much-improved design
  • Fix augments tag display in HTML
  • Improve name detection of ES6-exported methods and variables
  • Allow documentation of Object.prototype methods
tmcw
published 4.0.0-beta2 •

Changelog

Source

4.0.0-beta2

Minor fixes

  • Fixes export { foo } from './bar' style export
  • Fixed CLI usage examples to simply say documentation instead of /usr/bin/documentation or similar.
tmcw
published 4.0.0-beta1 •

Changelog

Source

4.0.0-beta1

Now using Babel 6!

Much long-awaited upgrade makes documentation.js compatible with fresh new Babel-using codebases.

And also:

  • GitHub Enterprise support
  • New tag support: abstract, override, readonly, interface, variation, see, todo (only in parsing phase, not yet in all outputs)
  • Parses jsx and es6 extensions by default, as well as .js
  • Fixes polyglot mode
  • Now shows the @throws tag content in Markdown output
  • Support for example captions
tmcw
published 4.0.0-beta •

Changelog

Source

4.0.0-beta

Revitalized documentation.js command line interface!

The documentation utility now takes commands:

  • documentation build extracts and formats documentation
  • documentation serve provides an auto-reloading server (#236)
  • documentation lint reviews files for inconsistencies
  • documentation readme patches API documentation into a readme (#313 by @anandthakker)

This functionality was previously included in dev-documentation and has been folded into documentation proper.

Much more flexible themes

Themes are now much more customizable. In documentation.js 3.x and before, themes were required to use Handlebars templates and produce a single page. In documentation.js 4.x and beyond, they are JavaScript modules that can use any template engine and produce any number of files. See the new theme documentation for details.

More precise traversal

Inference in 4.x is stricter than in 3.x: comments must be adjacent to the statements they document. This should make documentation generation much more predictable.

Support for the revealing module pattern

/** Foo */
function Foo() {
  /** Test */
  function bar() {}
  return {
    bar: bar
  };
}

New support for the JavaScript module pattern! This was implemented in #324 by Charlie Brown.

Breaking changes

tmcw
published 3.0.4 •

Changelog

Source

3.0.4

  • Allow parameter types to be mixed into explicit parameter documentation. (#239 and #232)
  • Support GitHub links in Markdown output (#238)
tmcw
published 3.0.3 •

Changelog

Source

3.0.3

  • Infer typedefs from Flow type aliases. Fixes #227
  • Fix type-annotated rest expressions, raised in #230
tmcw
published 3.0.2 •

Changelog

Source

3.0.2

  • Infer rest parameters. Fixes #223
  • Avoid filtering comments in lint mode. Fixes #186
  • Nest both properties and params. Fixes #164
tmcw
published 3.0.1 •

Changelog

Source

3.0.1

  • BUGFIX: Fix default theme resolution #212
tmcw
published 3.0.0 •

Changelog

Source

3.0.0

The largest change to documentation.js so far.

Dropping streams

This a major refactor of the documentation.js interface with a focus on simplifying the system. Up until this point, documentation.js was built around node.js streams, which are low-level representations of asynchronous series of data. While this abstraction was appropriate for the input and github streams, which are asynchronous, the majority of documentation.js's internals are simple and synchronous functions for which basic functional composition makes more sense than stream semantics.

Documentation 3.0.0 uses simple functional composition for operations like parmameter inference, rather than streams.

Stronger support for ES6, ES7, and Flow

We've switched to Babel as our source code parser, which means that we have much broader support of new JavaScript features, including import/export syntax and new features in ES6.

Babel also parses Flow type annotations, and new inference code means that we can infer

  • Parameter names & types
  • Return types

Without any explicit JSDoc tags. This means that for many simple functions, we can generate great documentation with less writing.

Stronger module support

Documentation.js now has much better inference for membership and names of symbols exported via exports or module.exports.

Support for nested symbols

The parent/child relationship between symbols is now fully hierarchical, and symbols can be nested to any depth. For instance:

/**
 * A global Parent class.
 */
var Parent = function () {};

/**
 * A Child class.
 */
Parent.Child = function () {};

/**
 * A Grandchild class.
 */
Parent.Child.Grandchild = function () {};

In addition, filtering by access is now applied to the entire hierarchy: if you mark a class as @private, neither it nor its children will be included in the output by default, regardless of the access specifiers of the children.

mdast-based Markdown output

We've switched from templating Markdown output with Handlebars.js to generating an abstract syntax tree of desired output and stringifying it with mdast. This lets documentation.js output complex Markdown without having to worry about escaping and properly formatting certain elements.

Test coverage 100%

documentation.js returns to 100% test coverage, so every single line of code is covered by our large library of text fixtures and specific tests.

--lint mode

Specifying the --lint flag makes documentation.js check for non-standard types, like String, or missing namespaces. If the encountered files have any problems, it pretty-prints helpful debug messages and exits with status 1, and otherwise exits with no output and status 0.

Breaking changes

  • The --version flag is now --project-version. --version now outputs documentation.js's version
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc