- Updated Node.js support to
^12.22.0 || ^14.17.0 || >= 16.0.0
. - Updated dependencies, some of which require newer Node.js versions than previously supported.
- Removed
./package
from the packageexports
field; the fullpackage.json
filename must be used in arequire
path. - Public modules are now individually listed in the package
files
andexports
fields. - Shortened public module deep import paths, removing the
/public/
.
- Also run GitHub Actions CI with Node.js v17.
- Simplified dev dependencies and config for ESLint.
- Simplified package scripts.
- Use a new
replace-stack-traces
dev dependency in tests. - Reorganized the test file structure.
- Configured Prettier option
singleQuote
to the default,false
. - Added a
license.md
MIT License file. - Improved documentation.
- Updated dependencies.
- Renamed remark related imports.
- Updated dependencies.
- Use newly available dependency ESM imports, fixing #24.
- Account for the new
comment-parser
tokenlineEnd
. - Renamed imports in the test index module.
- Amended the changelog entries for v6.0.0, v7.0.0, and v10.2.0.
- Only insert a table of contents into the generated markdown if there’s multiple members.
- The heading “Table of contents” is no longer inserted before the table of contents in the generated markdown.
- Updated dependencies.
- Updated the GitHub Actions CI config to stop testing Node.js v15.
- Display the project logo in the readme.
- Added a package
sideEffects
field.
- Updated dependencies.
- Fixed lint errors introduced by the updated Prettier version.
- Fixed JSDoc parameter or property tags without types or descriptions causing an exception when generating the markdown tables. Now, the “Type” and “Description” columns are only generated if at least one row has a type or description.
- Corrected the code location for JSDoc parameter and property tag default value invalid JSDoc type errors.
- Readme tweaks.
- The file
changelog.md
is no longer published.
- Added a new
--check
(and alias-c
) argument for the commandjsdoc-md
and acheck
option for the functionjsdocMd
to specify if an error should be thrown instead of updating the markdown file if the contents would change; useful for checking docs are up to date in CI. Fixes #22.
- Updated dev dependencies.
- The command
jsdoc-md
and the functionjsdocMd
no longer updates the markdown file if there are no changes. - Simplified
TypeError
messages. - Readme tweaks.
- Updated dev dependencies.
- Added back JSDoc typedefs that were accidentally deleted in v10.0.0.
- Replaced the package
prepare
script with ajsdoc
script. - Tweaked the package description.
- Updated readme content.
- Updated Node.js support to
^12.20 || >= 14.13
. - Updated dependencies, some of which require newer Node.js versions than previously supported.
- The API is now ESM in
.mjs
files instead of CJS in.js
files, accessible viaimport
but notrequire
. - Replaced the the
package.json
exports
field public subpath folder mapping (deprecated by Node.js) with a subpath pattern. - By default also scape files with the
.cjs
file extension for JSDoc. - If the optional peer dependency
prettier
is installed, the new markdown file contents is Prettier formatted.
- Also run GitHub Actions CI with Node.js v16.
- Use regex
u
mode. - JSDoc comment ends (
*/
) escaped with a backslash (*\/
) can now be escaped using additional backslashes (e.g.*\\/
unescapes to*\/
). - Tweaked a code example for the public function
jsdocMd
. - v9.1.1 changelog entry tweak.
- Updated dev dependencies.
- Account for the JSDoc comment fence when deriving the code locations for JSDoc inline tag
@link
namepath error messages, fixing #20. - Exclude multiple newlines from the start and end of JSDoc markdown content.
- Exclude multiple newlines following a JSDoc tag
@example
caption from the content start. - Disallow newlines between JSDoc inline tag
@link
parts. - Removed the private function
parseJsdocExample
, moving functionality to the private functionjsdocCommentToMember
. - Corrected JSDoc member code location end column numbers.
- Reordered tests.
- Display the relevant source code file path and location in more JSDoc related error messages, fixing #19.
- Allow whitespace between JSDoc inline tag
@link
parts.
- Updated dependencies.
- Tweaked some tests.
- Internal JSDoc fixes.
- Use regex
u
mode when parsing JSDoc examples or scanning for JSDoc inline links in description markdown. - Renamed several private functions.
- Internally, throw
TypeError
instead ofError
for JSDoc type related errors.
- The function
jsdocMd
is now async and should be faster.
- Added support for more JSDoc tags (some are aliases for already supported tags):
@arg
@argument
@callback
@desc
@description
@property
@return
@typedef
- Display the relevant source code file path and location in JSDoc namepath related error messages, using new
kleur
and@babel/code-frame
dependencies. - Improved console output for
jsdoc-md
CLI errors. - Added runtime argument type checks for the function
jsdocMd
.
- Update dependencies.
- Use
unist-util-remove-position
to remove undesirableposition
data from the markdown AST that the private functionmdToMdAst
returns. - Removed
dynamicImport
andobjectRestSpread
plugins from the Babel parser config, as they are enabled by default nowadays. - Fixed the function
jsdocMd
optioncwd
causingENOENT
filesystem errors. - Fixed the generated markdown headings for various kinds of nested members:
- Inner members of classes of kind
member
are now labeledmember
instead ofproperty
. - Inner members of non-classes are now labeled
inner
. - Inner typedefs are now labeled
type
instead oftypedef
, consistent with non-inner typedefs.
- Inner members of classes of kind
- Fixed mixed absent and present
event:
prefixes in sibling event names in source JSDoc causing incorrect sorting of events in generated markdown. - Use the
SyntaxError
class instead ofError
for whendeconstructJsdocNamepath
can’t deconstruct an invalid namepath. - Renamed the private function
jsdocCommentsFromCode
tocodeToJsdocComments
. - Made the private function
codeToJsdocComments
async. - Made the private function
mdFileReplaceSection
async. - Added runtime argument type checks for various private functions.
- Renamed the private function
jsdocToMember
tojsdocCommentToMember
. - Configured the JSDoc parser to not accept a name part for a
type
tag. - Rewrote a lot of the implementation for better performance.
- Use backticks (
`
) to quote values in error messages instead of typographic double quotes (“
/”
). - Renamed the private
remarkStringifyOptions
module toREMARK_STRINGIFY_OPTIONS
and added JSDoc. - Use
Array<>
JSDoc type syntax instead of[]
. - Improved the internal JSDoc.
- Improved tests.
- Stop using
hard-rejection
to detect unhandledPromise
rejections in tests, as Node.js v15+ does this natively. - Updated GitHub Actions CI config:
- Updated
actions/checkout
to v2. - Updated
actions/setup-node
to v2. - Don’t specify the
CI
environment variable as it’s set by default.
- Updated
- Updated the
remark-parse
andremark-stringify
dependencies to v9.0.0, and implemented a newremark-gfm
dependency. Markdown is now explicitly parsed and generated as GitHub Flavored Markdown (GFM). Generated markdown may subtly change.
- Updated dependencies.
- Use
parseSync
from@babel/core
instead ofparse
, which may become async in a future major version of Babel. - Ensure JSDoc without tags is ignored instead of causing an error.
- Updated the
remarkStringifyOptions
so that rules in generated markdown match Prettier formatting (---
). - Corrected a
jsdocMd
code example. - Fixed incorrect MDAST used for
typeJsdocAstToMdAst
tests. - Use
remarkStringifyOptions
in themembersToMdAst
tests. - Refactored an
mdToMdAst
test to use a snapshot. - Also run GitHub Actions CI with Node.js v15.
- Simplified the GitHub Actions CI config with the
npm install-test
command. - Removed
npm-debug.log
from the.gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory.
- Updated Node.js support to
^10.17.0 || ^12.0.0 || >= 13.7.0
. - Updated dev dependencies, some of which require newer Node.js versions than previously supported.
- Added a package
exports
field with conditional exports to support native ESM in Node.js and keep internal code private, whilst avoiding the dual package hazard. Published files have been reorganized, so previously undocumented deep imports will need to be rewritten according to the newly documented paths.
- Support documenting events:
- Support the
event
@kind
value. - Support the
event:
name prefix in JSDoc namepaths. - Support the
@fires
JSDoc tag.
- Support the
- Updated dependencies.
- Added ESM related keywords to the package
keywords
field. - Stopped testing with Node.js v13.
- Use
comment-parser
to parse JSDoc comments instead ofdoctrine
. - Fixed only the first multiline comment end syntax escape being unescaped when parsing JSDoc comments.
- Simplified the
typeJsdocStringToJsdocAst
function. - Converted a
jsdocMd
test assertion to a snapshot assertion. - More thorough tests.
- Updated the EditorConfig URL.
- Update
http://usejsdoc.org
links tohttps://jsdoc.app
. - Prettier format code examples.
- Simplify ESLint config after correcting the minimum supported Node.js to v10.17.0.
- Simplify snapshot paths in tests.
- Updated dependencies, some of which now have a package
exports
field to support native ESM in Node.js. - Updated Node.js support from v10+ to
10 - 12 || >= 13.7
to reflect the packageexports
related breaking changes.
- Improved the package
prepare:prettier
andtest:prettier
scripts. - Configured Prettier option
semi
to the default,true
. - Lint fixes for
prettier
v2. - Ensure GitHub Actions run on pull request.
- Also run GitHub Actions with Node.js v14.
- Fixed the internal
mdFileReplaceSection
function for Node.js v14.
- Updated dependencies.
- Use
snapshot-assertion
for snapshot assertions in tests.
- Support Node.js v10+, from v8+.
- Updated the
globby
dependency to v10, which may affect how thejsdoc-md
command--source-glob
argument andjsdocMd
functionsourceGlob
option work. - Replaced the
yargs
dependency witharg
, for a smaller install size. This affects thejsdoc-md
command:- The
--help
/-h
argument is gone. - The
--version
/-v
argument is gone. - Short arguments can’t be used with
=
(e.g.jsdoc-md -m readme.md
works,jsdoc-md -m=readme.md
doesn’t), see zeit/arg#51. - Behavior using quotes around argument values may have changed.
- The
- Added a new
cwd
option for thejsdocMd
function. - Setup GitHub Sponsors funding:
- Added
.github/funding.yml
to display a sponsor button in GitHub. - Added a
package.json
funding
field to enable npm CLI funding features.
- Added
- Updated dependencies.
- Removed the now redundant
eslint-plugin-import-order-alphabetical
dev dependency. - Stop using
husky
andlint-staged
. - Replaced the
tap
dev dependency withtest-director
andcoverage-node
, refactoring the tests accordingly. This vastly reduces the dev install size. - Replaced the deprecated
circular-json
dev dependency withflatted
. - Added a new
disposable-directory
dev dependency, using it to replace thecreateTestFile
helper and improve tests. - Added a new
hard-rejection
dev dependency to ensure unhandled rejections in tests exit the process with an error. - Test the CLI.
- Use strict mode for scripts.
- Use less arrow functions for better stack traces.
- Replaced every
forEach
loop withfor
of
. - More consistent module exports style.
- Removed
package-lock.json
from.gitignore
and.prettierignore
as it’s disabled in.npmrc
anyway. - Added a package
main
field and moved the index and bin files. - Use GitHub Actions instead of Travis for CI.
- Simplified the readme “Setup” section.
- Improved CLI docs with examples.
- Documented how files are excluded via
.gitignore
.
- Display quotes around string literal types that are empty or only contain whitespace, to avoid resulting empty inline code and markdown rendering issues.
@param
and@prop
default values are now parsed as JSDoc types; an invalid type will result in an error.
- Richer markdown for
@param
and@prop
default values:null
,undefined
,void
, number, string, and boolean literal values display as inline code.- JSDoc member name references display as links.
- Updated dependencies.
- Renamed
test:js
package script totest:tap
.
- Exclude “See” and “Examples” headings from generated table of contents.
- Updated dependencies.
- Simplified the
prepublishOnly
script.
- Support Node.js v8+, from v6+.
- Support the nullable literal type (
?
). - Support the void literal type (
function(): void
). - Automatically adjust heading levels in descriptions and examples to suit the surrounding document.
- Updated dependencies.
- Reduced the published size of
package.json
by moving dev tool configs to separate files. - Removed
.html
from usejsdoc.org links. - Removed the test file glob from the
test:js
script args astap
now finds the files automatically. - Refactored
typeJsdocAstToMdAst
. - Test
typeJsdocAstToMdAst
with an unknown type, and more clearly test every possible type. - Test
outlineMembers
with missing members. - Test
membersToMdAst
with a parameter default value.
- Render any combination of supported tags, even if they are illogical (e.g.
@param
with@prop
). This fixes@kind constant
not rendering an associated@type
. @kind typedef
without an associated@type
no longer causes an error. Linting would be a better way to ensure the right combination of tags are used.
- Updated dev dependencies.
- Fix
<hr />
incorrectly appearing above non top level members.
@kind member
now displays an associated@type
and throws an error if there is none.
- Separate top level member sections with
<hr />
.
- Updated dev dependencies.
- Use default
tap
reporter for tests. - Simplify package
test:js
script glob.
- Updated dependencies.
- Allow Babel to load config relative to files being parsed.
- Stopped automatically linking global types to MDN.
- Simplified ESLint config.
- Added MDN links for
Uint8Array
types and updated snapshot tests, fixing #11 via #12.
- Updated dependencies.
- Updated package scripts and config for the new
husky
version. - Added a missing test for the
Promise
type MDN link.
- Support Node.js v6+, from v8.5+.
- Work around a Babel breaking change to parsing decorators, see babel/babel#8562.
- Updated dependencies.
- Removed the
npm-run-all
dev dependency and stopped using it for package scripts. - Swapped readme badge order.
- Sort members in the documentation outline, fixes #8.
- Explicitly left align table cell contents.
- Display parameter and property names as inline code.
- Updated dependencies.
- Configured Prettier to lint
.yml
files. - Ensure the readme Travis build status badge only tracks
master
branch. - Use Badgen for the readme npm version badge.
- Default documentation for global types (such as
Object
) can be overridden using@typedef
. - Also auto-link MDN articles for global types
function
andDate
.
- Varied capitalization of global types (such as
Object
) results in a consistently lowercase MDN link slug.
- Generate function return documentation, fixes #7.
- Support JSDoc inline tag links (e.g.
[`b` method]{@link A#b}
) for descriptions and tags with markdown content, closes #5.
- Correct slugs for successive type member links, fixes #6.
- Display CLI options as code in the readme.
- Internally refactor
jsdocAstToMember
tojsdocToMember
.
Initial release.