UNPKG

43.2 kBMarkdownView Raw
1# JSDoc 3 change history
2
3This file describes notable changes in each version of JSDoc 3.
4
5
6## 3.6.4 (April 2020)
7
8Updates dependencies.
9
10
11## 3.6.3 (July 2019)
12
13Updates dependencies.
14
15
16## 3.6.2 (May 2019)
17
18Fixes an issue that prevented ES 2015 classes from appearing in generated docs. ([#1644][1644])
19
20
21## 3.6.1 (May 2019)
22
23Prevents a crash when using type applications in Node.js 12. ([#1643][1643])
24
25
26## 3.6.0 (May 2019)
27
28### Major changes
29
30+ JSDoc is now compatible with Node.js 12, and it requires Node.js 8.15.0 or later.
31+ JSDoc now recognizes all documented Closure Compiler tags. ([#605][605])
32
33### Enhancements
34
35+ You can now use the `templates.useShortNamesInLinks` configuration setting to show the short name
36of each symbol in link text (for example, `baz`), rather than the full longname (for example,
37`foo.bar.baz`). ([#738][738])
38+ When you enable the Markdown plugin, you can now specify a function that performs syntax
39highlighting in code blocks. ([#1412][1412])
40+ The default template now places namespaces near the top of the TOC. ([#1410][1410])
41
42### Bug fixes
43
44+ When you add a JSDoc comment to an ES2015 constructor, JSDoc now preserves all of the JSDoc tags,
45not only the description and parameters. ([#1129][1129])
46+ The `@exports` tag now works correctly when it is combined with the `@enum` tag. ([#970][970])
47+ When you enable the Markdown plugin, and you use a code fence with the language set to `plain`,
48JSDoc no longer pretty-prints the code block in the generated documentation. ([#1361][1361])
49
50
51## 3.5.5 (September 2017)
52
53Fixes a compatibility issue with Node.js 8.5.0. (#1438)
54
55
56## 3.5.4 (August 2017)
57
58+ When a class uses the `@hideconstructor` tag, the default template no longer displays the names of
59parameters that the constructor accepts. (#1397)
60+ When an arrow function expression returns a class, the class's methods and properties are now
61named correctly. (#1409)
62+ JSDoc no longer crashes when an anonymous class is passed as a function parameter. (#1416)
63+ JSDoc now allows `import` and `export` declarations anywhere where a statement is allowed. (#1411)
64+ JSDoc now allows `return` statements outside of functions. (#1411)
65+ JSDoc now allows `super()` calls outside of a method definition. (#1411)
66+ JSDoc no longer exits before the `STDOUT` pipe has been flushed. (#1408)
67
68
69## 3.5.3 (July 2017)
70
71+ Non-JSDoc comments (comments that do not begin with `/**`) are now ignored. (#1398)
72+ JSDoc no longer crashes when it parses a class property with no value assigned to it. (#1400)
73+ When there are JSDoc comments at the end of a source file that has a `'use strict';` directive,
74the comments are no longer ignored. (#1396)
75+ Namepaths that contain an `@` sign (for example, `module:@prefix/my-module~myCallback`) are now
76parsed correctly. (#1302)
77+ The default template now displays interfaces that belong to a namespace. (#1406)
78+ When an ES2015 class inside a module uses an `@alias` tag, the class's constructor now gets the
79correct longname. (#1395)
80+ When there are no input files to process, JSDoc no longer prints help text to the console. (#1404)
81
82
83## 3.5.2 (July 2017)
84
85+ The default template now hides parameters and properties for class constructors that are hidden
86with the `@hideconstructor` tag. (#1397)
87+ JSDoc now uses an improved algorithm for locating plugins and template resources. (#1394)
88+ When the `@alias` tag identifies an instance member (for example, `@alias Foo#bar`), the alias is
89now applied correctly. (#1385)
90+ When the `@alias` tag is applied to a class that is within a module and is aliased to the module
91name, the class's instance members are now documented correctly. (#1134)
92+ Fixed a crash when a `@param` tag uses the wrong delimiter to close the type expression (for
93example, `@param {Object)`). (#1221)
94+ The Markdown plugin now converts Markdown-formatted text in the `@summary` tag. (#1149)
95
96
97## 3.5.1 (July 2017)
98
99+ Fixed an issue that prevented JSDoc from working on versions of Node.js prior to 5.10.0. (#1393)
100+ If the JSDoc configuration file does not have a file extension, JSDoc now assumes that the file
101is in JSON format. (#1391)
102
103
104## 3.5.0 (July 2017)
105
106### Major changes
107
108+ JSDoc now uses the [Babylon](https://github.com/babel/babylon) JavaScript parser, which means that
109JSDoc can parse any JavaScript or JSX file that is supported by the [Babel](https://babeljs.io/)
110compiler. For example, JSDoc can now parse JavaScript files that include all of the following
111language features:
112
113 + [Decorators](https://github.com/tc39/proposal-decorators)
114 + [Public and private class fields](https://github.com/tc39/proposal-class-fields)
115 + [Asynchronous iterators](https://github.com/tc39/proposal-async-iteration)
116 + [Dynamic `import()`](https://github.com/tc39/proposal-dynamic-import)
117 + [Optional chaining](https://github.com/tc39/proposal-optional-chaining)
118
119+ You can now use a JavaScript file to configure JSDoc. The JavaScript file must be a CommonJS
120module that exports a single configuration object. See the
121[documentation](https://jsdoc.app/about-configuring-jsdoc.html) for details and examples.
122+ Fixed multiple issues with documenting ES2015 classes and modules. See "Bug fixes" for details.
123+ JSDoc now requires Node.js 4.2.0 or later.
124
125### New tags
126
127**Note**: Third-party templates may not support these new tags.
128
129+ You can now use the new [`@async` tag](https://jsdoc.app/tags-async.html) to indicate that a
130function is asynchronous (that is, that it was declared with the syntax `async function foo() {}`).
131In general, you do not need to use this tag, because JSDoc autodetects asynchronous functions.
132(#1188)
133+ You can now use the new [`@generator` tag](https://jsdoc.app/tags-generator.html) to indicate
134that a function is a generator function. In general, you do not need to use this tag, because JSDoc
135autodetects generator functions. (#1158)
136+ You can now use the new [`@hideconstructor` tag](https://jsdoc.app/tags-hideconstructor.html) to
137tell JSDoc to hide a class's constructor from the documentation. (#952)
138+ You can now use the new [`@package` tag](https://jsdoc.app/tags-package.html) to indicate that a
139symbol is package-private. (#962)
140+ You can now use the new [`@yields` tag](https://jsdoc.app/tags-yields.html) to document the
141value that is yielded by a generator function. (#1388)
142
143### Enhancements
144
145+ JSDoc can now parse files that contain asynchronous functions (that is, functions declared as
146`async function foo() {}`), and JSDoc autodetects when a function is asynchronous. (#1188)
147+ JSDoc now autodetects generator functions. (#1158)
148+ When JSDoc cannot parse a type expression, it now logs the line number on which the type
149expression was found. (#1057)
150+ When JSDoc fires `jsdocCommentFound` and `symbolFound` events, the event now includes a `columnno`
151property indicating the column number on which the comment or symbol was found. (#1362)
152+ You can now use the new `sourceType` configuration option to control how JavaScript files are
153parsed. The default value is `module`. Set the value to `script` to suppress implied strict mode;
154this setting will also prevent you from using ES2015 modules. (#1210)
155+ You can now use the new `recurseDepth` configuration option to control how many levels deep JSDoc
156will recursively search for files. The default value is 10. (#1340)
157
158### Bug fixes
159
160+ JSDoc now correctly documents the constructors and instance properties of ES2015 classes. (#1182)
161+ JSDoc now correctly documents the constructor of an ES2015 class exported from an ES2015 module.
162(#1272)
163+ JSDoc now uses the correct scope for exported symbols, and their children, in ES2015 modules.
164(#1293)
165+ When JSDoc is run in a directory that has a `plugins/` or `templates/` directory, JSDoc can now
166discover plugins and templates in other directories. (#1081, #1308)
167+ JSDoc no longer crashes when it reads a UTF-8 JSON file with a leading BOM. (#1256, #1297)
168+ When a function is assigned to a variable, JSDoc now autodetects the function's default and
169repeatable parameters. (#1054)
170+ JSDoc no longer crashes when the `@author` tag does not have a value. (#1289)
171+ JSDoc now always calls `process.exit()` when exiting. (#1287)
172
173### Default template
174
175+ The default template now identifies asynchronous and generator functions. (#1158, #1188)
176+ The default template now displays appropriate documentation for namespaces that are also
177functions. (#955)
178+ Images that are wider than the text area are now displayed correctly. (#1359)
179
180
181
182## 3.4.3 (November 2016)
183
184Updated JSDoc's `LICENSE.md` file.
185
186
187## 3.4.2 (October 2016)
188
189+ Classes exported from an ES2015 module are now documented correctly. (#1137)
190+ Fixed an issue that prevented plugins and templates from being loaded correctly. (#1259)
191+ Fixed a crash when using the experimental object spread operator in assignments. (#1258)
192
193
194## 3.4.1 (September 2016)
195
196### Enhancements
197
198+ When installing JSDoc from NPM, all dependencies are now pulled from NPM. (#961)
199+ The configuration setting `tags.allowUnknownTags` may now contain an array of tag names that
200should be allowed. (#1159)
201
202### Bug fixes
203
204+ When an ES2015 module's default export is a class, JSDoc now documents the class correctly.
205(#1113, #1120)
206+ JSDoc no longer crashes when an ES2015 module exports an anonymous class. (#1113)
207+ JSDoc no longer crashes when the experimental object spread operator is used. (#1141)
208+ In ES2015 methods, JSDoc now autodetects whether a parameter is a default or repeatable parameter.
209(#1144)
210+ The Markdown plugin now works correctly with inline tags that contain special characters, such as
211`{@link chat."#channel"}`. (#1035)
212+ When JSDoc is run in a directory that has a `plugins/` or `templates/` directory, JSDoc can now
213discover plugins and templates in other directories. (#1081)
214
215### Templates
216
217+ The default template now uses appropriate styles for displaying tables. (#1064)
218+ The default template's CSS file no longer uses the same style for both `<h2>` and `<h3>` elements.
219(#1108)
220+ JSDoc now includes a `silent` template that generates no output. This template makes it easier to
221use JSDoc as a linter to check for syntax errors and unrecognized tags in documentation comments.
222(#1160)
223
224
225## 3.4.0 (November 2015)
226
227### Major changes
228
229+ JSDoc is now compatible with Node.js 4.0.0 and later.
230+ JSDoc no longer runs on Mozilla Rhino. Use Node.js to run JSDoc.
231+ JSDoc can now parse ECMAScript 2015 code, including code that uses native classes and modules.
232(#555)
233+ JSDoc can now parse [JSX](https://facebook.github.io/jsx/) files. (#1001)
234+ JSDoc's `app` and `env` global variables are now deprecated. Avoid using the `app` global. Use the
235`jsdoc/env` module instead of the `env` global. (#812)
236
237### Enhancements
238
239+ `const` declarations are now automatically treated as constants. (#555)
240+ Templates may now run asynchronously. To create an asynchronous template, simply return a promise
241from your template's `publish` method. (#953)
242
243### Bug fixes
244
245+ Symbols now get the correct longname when they are defined as properties of a prototype and
246include special characters, such as `#` and `.` (for example, `Foo.prototype['this#is#bar']`).
247(#888)
248+ Instance members that are defined as computed properties of `this` (for example, `this['bar']`)
249now get the correct longname. (#890)
250+ When an instance member (for example, `this.bar`) is documented within a member of a prototype
251(for example, `Foo.prototype.setBar`), the instance member's longname is now set correctly. (#1011)
252+ The `@borrows` tag now works with symbol names that contain whitespace. (#818)
253
254### Plugins
255
256+ For the Markdown plugin, you can now autogenerate a heading ID for each heading by setting the
257configuration property `markdown.idInHeadings` to `true`. (#1032)
258
259### Template improvements
260
261+ In the default template, you can now show the full namepath of each object in the navigation
262column by setting the configuration property `templates.default.useLongnameInNav` to `true`. (#986)
263+ In the Haruki template, falsy default values now appear in the output. (#1063)
264
265
266## 3.3.3 (September 2015)
267
268+ Symbols named `prototype` are now handled correctly. (#891)
269+ Fixed an issue that could cause JSDoc to go into an infinite loop when a module is documented
270twice. (#975)
271+ Fixed an issue that could cause parsing errors on valid regular expressions. (#1053)
272
273
274## 3.3.2 (June 2015)
275
276JSDoc no longer crashes when parsing a large number of files, or a single object that has a large
277number of properties. (#976)
278
279
280## 3.3.1 (June 2015)
281
282+ Fixed a crash in the Haruki template. (#1005)
283+ When a type expression includes a record type with numeric keys (for example, `{0: string}`), the
284type expression is now parsed correctly. (#1016)
285
286
287## 3.3.0 (May 2015)
288
289### Major changes
290
291+ You can now run JSDoc on Node.js. (#93)
292+ You can now use the `@interface` and `@implements` tags to document interfaces and their
293implementations. (#720, #828)
294+ Closure Compiler's `@inheritDoc` and `@override` tags are now supported. (#53)
295+ If the JSDoc comment for a symbol includes the `@mixes` tag, all of the mixins now appear in the
296symbol's documentation. (#378)
297+ JSDoc can now log information to the console as it runs (for example, the name of each file that
298JSDoc parses). To log this information, run JSDoc with the `--verbose` flag. (#416)
299+ You can now use any file as the package or README file for your documentation. Use the
300`-P/--package/` and `-R/--readme` flags to specify the package and README file. (#708)
301+ The default template's typography and color scheme have been significantly improved. (#550, #780,
302#843)
303
304### Enhancements
305
306+ You can now use the `--pedantic` flag to treat all errors as fatal errors, and to treat warnings
307as errors. This flag replaces the `--lenient` flag, which had roughly the opposite meaning and is no
308longer available. (#416)
309+ You can now use the `-a/--access` flag to control whether private, protected, and public symbols
310appear in the documentation. (#860, #861)
311+ You can now use the `--debug` flag to log detailed debugging information to the console. This
312information can help you diagnose bugs in JSDoc itself. (#416)
313+ JSDoc's configuration file can now contain JavaScript comments. (#660)
314+ You can now include source files from a directory, but exclude one of its subdirectories, by
315adding the subdirectory to the `source.exclude` option in the configuration file. (#484)
316+ The `source.exclude` option now works correctly when JSDoc is run with the `-r/--recurse` flag.
317(#616)
318+ When JSDoc is run with the `-r/--recurse` flag, it now scans for tutorials recursively. (#712)
319+ JSDoc's `-X/--explain` option now runs much more quickly. (#633)
320+ If all of the text for an `@example` tag is indented, JSDoc now removes the extra indentation.
321(#540)
322+ The default value for a parameter or property can now include brackets (for example,
323`@param {Array.<string>} [foo=['bar']]`). (#640)
324+ You can now provide a default value for parameters and properties that are not optional (for
325example, `@property {string} foo='bar'`). (#791)
326+ If the `@type` tag includes a description (for example, `@type {string} some text`), JSDoc now
327parses the type expression correctly and discards the description. (#615)
328+ You can now add JSDoc comments to function parameters. (#473)
329+ For Closure Compiler projects, you can now enable a Closure Compiler-specific tag dictionary that
330more closely matches Closure Compiler's semantics. To enable Closure Compiler semantics, set the
331configuration file's `tags.dictionaries` option to `['closure']`. This option can contain the values
332`jsdoc`, `closure`, or both. If multiple dictionaries are enabled, and a tag is defined in more than
333one dictionary, JSDoc uses the definition from the first dictionary that contains the tag. (#729,
334#730, #731, #732)
335+ If one symbol overrides another, JSDoc now adds an `overrides` property to the doclet that is
336overriding another. The `overrides` property contains the longname of the overridden symbol. (#792)
337+ When a JSDoc tag contains a type expression, the doclet's `type` object now includes a hidden
338`parsedType` property. The `parsedType` property contains a syntax tree that represents the type
339expression. The syntax tree is generated by [Catharsis](https://github.com/hegemonic/catharsis), and
340its format may change in the future. (#576)
341+ JSDoc now allows output filenames to contain non-ASCII characters. In addition, links to output
342files are now URL-encoded when necessary. (#677)
343+ JSDoc now ensures that output filenames do not have a leading underscore. (#758)
344+ JSDoc now tries to ensure that `id` attributes in output files are unique within that file. (#539)
345+ JSDoc now has an up-to-date JSON Schema file for parse results. The schema file is available in
346`lib/jsdoc/schema.js`. (#327)
347+ JSDoc now extracts more information from package files. (#710)
348+ JSDoc now displays usage information if you run JSDoc without any input files, or with an
349unrecognized command-line option. (#609, #840)
350
351### Bug fixes
352
353+ When the `allowUnknownTags` option is set to `false`, JSDoc no longer logs warnings about the
354presence of `@also` and `@scope` tags. (#574)
355+ Fixed several errors when parsing type expressions. (#619, #644, #652, #705, #767)
356+ Properties added to the `module.exports` object can now be documented. (#500)
357+ When a symbol's name starts with the same characters as its parent namespace (such as `Vector` in
358`V.Vector`), JSDoc now assigns the correct longname to the symbol. (#608)
359+ If a child class inherits from multiple parent classes, and the parent classes have instance
360members with the same name, the child class no longer displays the documentation from both parent
361classes. (#613)
362+ If a source file contains an object literal, and one of the property names is a whitespace
363character or a character that must be escaped in a regular expression, JSDoc now parses the file
364successfully. (#549, #775)
365+ Virtual comments now work correctly for overloaded functions. (#727)
366+ When a virtual comment appears within a module, JSDoc now assigns the correct values to the
367virtual comment doclet's `memberof`, `longname`, and `scope` properties. (#631)
368+ JSDoc now sets the `scope` property to `global` for all global doclets. (#684)
369+ Module doclets no longer have a `scope` property. (#782)
370+ In Markdown tutorials, JSDoc no longer unescapes HTML entities. (#743)
371+ If a longname includes a variation (for example, `Foo#bar(variation)`), the link text is now
372preserved when generating HTML links. (#857)
373+ When a single JSDoc comment includes `@class`, `@classdesc`, and `@constructor` tags, JSDoc no
374longer ignores the value of the `@classdesc` tag. (#806)
375+ For tags where the name and type are both optional (`@constant`, `@external`, `@member`,
376`@module`, `@namespace`, and `@param`), JSDoc now parses the tag correctly when it includes a type
377but not a name. (#351, #535)
378+ The `@default` tag now works correctly when used with an array literal. (#604)
379+ The `@enum` tag now works correctly when the enumeration is part of a chain of assignments (for
380example, `var FOO = exports.FOO = {/* enumerated values */}`). (#702)
381+ The `@exports` and `@module` tags now work correctly when their value includes a `module:`
382namespace (for example, `@exports module:foo`). (#786)
383+ The `@memberof` tag now works correctly when it refers to a module that is defined in a separate
384file. (#880)
385+ The `@variation` tag now works correctly when its value is enclosed in parentheses (for example,
386`@variation (foo)`). (#850)
387
388### Plugins
389
390+ Tag definitions can now have a `mustNotHaveDescription` property. When this property is set to
391`true`, JSDoc will warn the user if the tag text includes a description (such as `The description`
392in `@param {string} foo - The description`). (#615)
393+ Tag definitions can now call the method `dictionary.normalize`, which is a synonym for
394`dictionary.normalise`. (#884)
395+ The Markdown plugin no longer prevents inline `{@link}` tags from working. (#518)
396+ The Markdown plugin now converts `@author` and `@throws` tag values to HTML by default. (#736,
397#878)
398+ JSDoc now includes a `summarize` plugin that automatically generates summaries based on the
399description. (#485)
400+ JSDoc now includes an `underscore` plugin that finds symbols whose names begin with an underscore
401and automatically tags them as `@private`. (#471)
402+ Plugins can now replace the `doclet` property of `newDoclet` events. (#584)
403
404### Template improvements
405
406+ You can now override the default template's main layout file, `layout.tmpl`, by setting the
407`templates.default.layoutFile` option in JSDoc's configuration file. The property can contain a
408relative or absolute path to the replacement for `layout.tmpl`. Relative paths are resolved against
409the path to the configuration file; the current working directory; and the JSDoc directory, in that
410order. (#480)
411+ When the `templates.default.outputSourceFiles` option is set to `false`, the documentation no
412longer shows the path to each source file. (#571)
413+ You can now use the property `templates.default.staticFiles.include` to list files that will be
414copied to the output directory. For backwards compatibility, the property
415`templates.default.staticFiles.paths` is also supported but is deprecated. (#785)
416+ The property `templates.default.staticFiles.include` now works correctly when an absolute path is
417specified. (#939)
418+ The `templates.default.staticFiles` options now work correctly on Windows. (#785)
419+ In output files, you can now prevent the date from appearing in the footer by setting the property
420`templates.default.includeDate` to `false`. (#910)
421+ Output files no longer show the default value for members of an enumeration. (#689)
422+ In certain types of AMD modules, the module-overview section is no longer duplicated. (#853)
423+ If a constructor is assigned to `module.exports`, the value of the `@classdesc` tag now appears in
424the documentation. (#740)
425+ If a constructor is assigned to `module.exports`, and the constructor inherits from another class,
426the parent class is now listed in the documentation. (#594)
427+ Text within an `@example` tag, including HTML tags, is now properly escaped. (#511)
428+ If a member has a `@fires` tag, the tag information now appears in the documentation. (#568)
429+ If a symbol has members that use the `@mixin` tag, the mixins are now listed in the documentation.
430(#379, #602)
431+ When multiple `@param` tags are used to document properties of array values (for example,
432`@param {Object[]} foo` and `@param {string} foo[].bar`), the properties are now grouped into the
433appropriate row of the parameters table. (#870)
434+ If a member has a `@requires` tag, the tag information now appears in the documentation. (#563)
435+ Type expressions are now presented more clearly. (#618)
436+ Pretty-printed source files now include line numbers. (#532)
437+ When you run JSDoc with a single input file, the full path to the file no longer appears in the
438documentation. (#553)
439+ When an overloaded function is assigned to `module.exports`, the documentation now displays all of
440the signatures for the overloaded function. (#727)
441+ Resolved several issues that caused the default template to generate invalid HTML. (#843)
442
443
444## 3.2.2 (November 2013)
445
446### Bug fixes
447
448+ Addressed a regression in JSDoc 3.2.1 that could prevent a function declaration from shadowing a
449declaration with the same name in an outer scope. (#513)
450+ If a child class overrides a method in a parent class without documenting the overridden method,
451the method's documentation is now copied from the parent class. (#503)
452+ You can now use inline HTML tags in Markdown-formatted text. In addition, JSDoc now uses only the
453[marked Markdown parser](https://github.com/chjj/marked); the markdown-js parser has been removed.
454(#510)
455+ Type expressions can now include a much broader range of repeatable types. In addition, you can
456now use Closure Compiler's nullable and non-nullable modifiers with repeatable types. For example,
457the type expression `...!string` (a repeatable, non-nullable string) is now parsed correctly. (#502)
458+ If a function accepts a parameter named `prototype`, the parameter is no longer renamed during
459parsing. (#505)
460+ If the list of input files includes relative paths, the paths are now resolved relative to the
461user's working directory. (a3d33842)
462
463
464## 3.2.1 (October 2013)
465
466### Enhancements
467
468+ JSDoc's parser now fires a `processingComplete` event after JSDoc has completed all
469post-processing of the parse results. This event has a `doclets` property containing an array of
470doclets. (#421)
471+ When JSDoc's parser fires a `parseComplete` event, the event now includes a `doclets` property
472containing an array of doclets. (#431)
473+ You can now use relative paths in the JSDoc configuration file's `source.exclude` option. Relative
474paths will be resolved relative to the current working directory. (#405)
475+ If a symbol uses the `@default` tag, and its default value is an object literal, this value is now
476stored as a string, and the doclet will have a `defaultvaluetype` property containing the string
477`object`. This change enables templates to show the default value with appropriate syntax
478highlighting. (#419)
479+ Inline `{@link}` tags can now contain newlines. (#441)
480
481### Bug fixes
482
483+ Inherited symbols now indicate that they were inherited from the ancestor that defined the symbol,
484rather than the direct parent. (#422)
485+ If the first line of a JavaScript file contains a hashbang (for example, `#!/usr/bin/env node`),
486the hashbang is now ignored when the file is parsed. (#499)
487+ Resolved a crash when a JavaScript file contains a [JavaScript
4881.8](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8) keyword, such as
489`let`. (#477)
490+ The type expression `function[]` is now parsed correctly. (#493)
491+ If a module is tagged incorrectly, the module's output file now has a valid filename. (#440, #458)
492+ For tags that accept names, such as `@module` and `@param`, if a hyphen is used to separate the
493name and description, the hyphen must appear on the same line as the name. This change prevents a
494Markdown bullet on the followng line from being interpreted as a separator. (#459)
495+ When lenient mode is enabled, a `@param` tag with an invalid type expression no longer causes a
496crash. (#448)
497+ The `@requires` tag can now contain an inline tag in its tag text. (#486)
498+ The `@returns` tag can now contain inline tags even if a type is not specified. (#444)
499+ When lenient mode is enabled, a `@returns` tag with no value no longer causes a crash. (#451)
500+ The `@type` tag now works correctly with type expressions that span multiple lines. (#427)
501+ If a string contains inline `{@link}` tags preceded by bracketed link text (for example,
502`[test]{@link Test#test}`), HTML links are now generated correctly even if the string contains other
503bracketed text. (#470)
504+ On POSIX systems, if you run JSDoc using a symlink to the startup script, JSDoc now works
505correctly. (#492)
506
507### Default template
508
509+ Pretty-printed source files are now generated by default. To disable this feature, add the
510property `templates.default.outputSourceFiles: false` to your `conf.json` file. (#454)
511+ Links to a specific line in a source file now work correctly. (#475)
512+ Pretty-printed source files are now generated using the encoding specified in the `-e/--encoding`
513option. (#496)
514+ If a `@default` tag is added to a symbol whose default value is an object, the value is now
515displayed in the output file. (#419)
516+ Output files now identify symbols as "abstract" rather than "virtual." (#432)
517
518
519## 3.2.0 (May 2013)
520
521### Major changes
522
523+ JSDoc can now parse any valid [Google Closure Compiler type
524expression](https://developers.google.com/closure/compiler/docs/js-for-compiler#types). **Note**: As
525a result of this change, JSDoc quits if a file contains an invalid type expression. To prevent JSDoc
526from quitting, run JSDoc with the `--lenient` (`-l`) command-line option. (Multiple issues)
527+ You can now use the new `@listens` tag to indicate that a symbol listens for an event. (#273)
528
529### Enhancements
530
531+ The parser now fires a `parseBegin` event before it starts parsing files, as well as a
532`parseComplete` event after all files have been parsed. Plugins can define event handlers for these
533events, and `parseBegin` handlers can modify the list of files to parse. (#299)
534+ Event handlers for `jsdocCommentFound` events can now modify the JSDoc comment. (#228)
535+ You can now exclude tags from Markdown processing using the new option `markdown.excludeTags` in
536the configuration file. (#337)
537+ You can now use the [marked](https://github.com/chjj/marked) Markdown parser by setting the
538configuration property `markdown.parser` to `marked`. In addition, if `markdown.parser` is set to
539`gfm`, JSDoc will now use the "marked" parser instead. (#385)
540+ The `@typedef` tag no longer requires a name when used with a Closure Compiler-style type
541definition. For example, the following type definition will automatically get the name `Foo.Bar`:
542
543 ```javascript
544 /** @typedef {string} */
545 Foo.Bar;
546 ```
547
548 (#391)
549+ You can now use an inline `{@type}` tag in a parameter's description. If this tag is present,
550JSDoc will assume that the parameter uses the type specified in the inline `{@type}` tag. For
551example, the following `@param` tag would cause `myParam`'s type to be documented as `Foo`:
552
553 ```
554 @param {(boolean|string)} myParam - My special parameter. {@type Foo}
555 ```
556
557 (#152)
558+ The `console.log` function now behaves the same way as on Node.js. In addition, the functions
559`console.info`, `console.error`, `console.warn`, and `console.trace` have been implemented. (#298)
560+ You can now use npm to install JSDoc globally by running `npm install -g`. **Note**: JSDoc will
561still run under Mozilla Rhino, not Node.js. (#374)
562+ The `jsVersion` configuration property has been removed. (#390)
563
564### Bug fixes
565
566+ JSDoc now quits if the configuration file cannot be loaded. (#407)
567+ JSDoc's `--explain` (`-X`) option now runs much more quickly, and it outputs valid JSON to the
568console. (#298)
569+ JSDoc's `--lenient` (`-l`) option now prints warnings on STDERR rather than STDOUT. (#298)
570+ The parser now assigns the correct scope to object properties whose names include single quotes.
571(#386)
572+ The parser now recognizes CommonJS modules that export a single function rather than an object.
573(#384)
574+ The inline `{@link}` tag now works correctly when `@link` is followed by a tab. (#359)
575+ On POSIX systems, quoted command-line arguments are no longer split on spaces. (#397)
576
577### Plugins
578
579+ The new `overloadHelper` plugin makes it easier to link to overloaded methods. (#179)
580+ The `markdown` plugin now converts Markdown links in the `@see` tag. (#297)
581
582### Default template enhancements
583
584+ You can now use the configuration property `templates.default.staticFiles` to copy additional
585static files to the output directory. (#393)
586+ All output files now use human-readable filenames. (#339)
587+ The documentation for events now lists the symbols that listen to that event. (#273)
588+ Links to source files now allow you to jump to the line where a symbol is defined. (#316)
589+ The output files now link to individual types within a Closure Compiler type expression. (Multiple
590issues)
591+ CommonJS modules that export a single function, rather than an object, are now documented more
592clearly. (#384)
593+ Functions that can throw multiple types of errors are now documented more clearly. (#389)
594+ If a `@property` tag does not identify the property's name, the template no longer throws an
595error. (#373)
596+ The type of each `@typedef` is now displayed. (#391)
597+ If a `@see` tag contains a URL (for example, `@see http://example.com` or
598`@see <http://example.com>`), the tag text is now converted to a link. (#371)
599+ Repeatable parameters are now identified. (#381)
600+ The "Classes" header is no longer repeated in the navigation bar. (#361)
601+ When the only documented symbols in global scope are type definitions, you can now click the
602"Global" header to view their documentation. (#261)
603
604
605## 3.1.1 (February 2013)
606
607+ Resolved a crash when no input files contain JSDoc comments. (#329)
608+ Resolved a crash when JSDoc cannot identify the common prefix of several paths. (#330)
609+ Resolved a crash when the full path to JSDoc contained at least one space. (#347)
610+ Files named `README.md` or `package.json` will now be processed when they are specified on the
611command line. (#350)
612+ You can now use `@emits` as a synonym for `@fires`. (#324)
613+ The module `jsdoc/util/templateHelper` now allows you to specify the CSS class for links that are
614generated by the following methods: (#331)
615 + `getAncestorLinks`
616 + `getSignatureReturns`
617 + `getSignatureTypes`
618 + `linkto`
619
620
621## 3.1.0 (January 2013)
622
623### Major changes
624
625+ You can now use the new `@callback` tag to provide information about a callback function's
626signature. To document a callback function, create a standalone JSDoc comment, as shown in the
627following example:
628
629 ```javascript
630 /**
631 * @class
632 */
633 function MyClass() {}
634
635 /**
636 * Send a request.
637 *
638 * @param {MyClass~responseCb} cb - Called after a response is received.
639 */
640 MyClass.prototype.sendRequest = function(cb) {
641 // code
642 };
643
644 /**
645 * Callback for sending a request.
646 *
647 * @callback MyClass~responseCb
648 * @param {?string} error - Information about the error.
649 * @param {?string} response - Body of the response.
650 */
651 ```
652+ The inline link tag, `{@link}`, has been improved:
653 + You can now use a space as the delimiter between the link target and link text.
654 + In your `conf.json` file, you can now enable the option `templates.cleverLinks` to display
655 code links in a monospace font and URL links in plain text. You can also enable the option
656 `templates.monospaceLinks` to display all links in a monospace font. **Note**: JSDoc templates
657 must be updated to respect these options.
658 + You can now use the new inline tags `{@linkplain}`, which forces a plain-text link, and
659 `{@linkcode}`, which forces a monospace link. These tags always override the settings in your
660 `conf.json` file. (#250)
661+ JSDoc now provides a `-l/--lenient` option that tells JSDoc to continue running if it encounters a
662non-fatal error. (Multiple issues)
663+ A template's `publish.js` file should now assign its `publish` function to `exports.publish`,
664rather than defining a global `publish` function. The global `publish` function is deprecated and
665may not be supported in future versions. JSDoc's built-in templates reflect this change. (#166)
666+ The template helper (`templateHelper.js`) exports a variety of new functions for finding
667information within a parse tree. These functions were previously contained within the default
668template. (#186)
669+ Updated the `fs` and `path` modules to make their behavior more consistent with Node.js. In
670addition, created extended versions of these modules with additional functionality. (Multiple
671commits)
672+ Updated or replaced numerous third-party modules. (Multiple commits)
673+ Reorganized the JSDoc codebase in preparation for future enhancements. (Multiple commits)
674+ JSDoc now embeds a version of Mozilla Rhino that recognizes Node.js packages, including
675`package.json` files. (Multiple commits)
676+ Node.js' `npm` utility can now install JSDoc from its GitHub repository. **Note**: JSDoc is not
677currently compatible with Node.js. However, this change allows JSDoc to be installed as a dependency
678of a Node.js project. In this version, global installation with `npm` is not supported. (Multiple
679commits)
680
681### Enhancements
682
683+ If a `README.md` file is passed to JSDoc, its contents will be included on the `index.html` page
684of the generated documentation. (#128)
685+ The `@augments` tag can now refer to an undocumented member, such as `window.XMLHTTPRequest`.
686(#160)
687+ The `@extends` tag can now refer to an undocumented member, such as `window.XMLHttpRequest`. In
688addition, you can now use `@host` as a synonym for `@extends`. (#145)
689+ The `@lends` tag is now supported in multiline JSDoc comments. (#163)
690+ On Windows, `jsdoc.cmd` now provides the same options as the `jsdoc` shell script. (#127)
691+ JSDoc now provides `setTimeout()`, `clearTimeout()`, `setInterval()`, and `clearInterval()`
692functions. (Multiple commits)
693+ JSDoc no longer provides a global `exit()` function. Use `process.exit()` instead. (1228a8f7)
694+ JSDoc now includes additional shims for Node.js' built-in modules. **Note**: Many of these shims
695implement only the functions that JSDoc uses, and they may not be consistent with Node.js' behavior
696in edge cases. (Multiple commits)
697+ JSDoc now provides a `-v/--version` option to display information about the current version.
698(#303)
699+ When running tests, you can now use the `--nocolor` option to disable colored output. On Windows,
700colored output is always disabled. (e17601fe, 8bc33541)
701
702### Bug fixes
703
704+ When using the `@event` tag to define an event within a class or namespace, the event's longname
705is now set correctly regardless of tag order. (#280)
706+ The `@property` tag no longer results in malformed parse trees. (20f87094)
707+ The `jsdoc` and `jsdoc.cmd` scripts now work correctly with paths that include spaces. (#127,
708#130)
709+ The `jsdoc` script now works correctly on Cygwin and MinGW, and with the `dash` shell. (#182,
710#184, #187)
711+ The `-d/--destination` option is no longer treated as a path relative to the JSDoc directory.
712Instead, it can contain an absolute path, or a path relative to the current working directory.
713(f5e3f0f3)
714+ JSDoc now provides default options for the values in `conf.json`. (#129)
715+ If the `conf.json` file does not exist, JSDoc no longer tries to create it, which prevents errors
716if the current user does not have write access to the JSDoc directory. (d2d05fcb)
717+ Doclets for getters and setters are now parsed appropriately. (#150)
718+ Only the first asterisk is removed from each line of a JSDoc comment. (#172)
719+ If a child member overrides an ancestor member, the ancestor member is no longer documented.
720(#158)
721+ If a member of a namespace has the same name as a namespace, the member is now documented
722correctly. (#214)
723+ The parse tree now uses a single set of properties to track both JSDoc-style type information and
724Closure Compiler-style type information. (#118)
725+ If a type has a leading `!`, indicating that it is non-nullable, the leading `!` is now removed
726from the type name. (#226)
727+ When Markdown formatting is enabled, underscores in inline `{@link}` tags are no longer treated as
728Markdown formatting characters. (#259)
729+ Markdown links now work correctly when a JavaScript reserved word, such as `constructor`, is used
730as the link text. (#249)
731+ Markdown files for tutorials are now parsed based on the settings in `conf.json`, rather than
732using the "evilstreak" Markdown parser in all cases. (#220)
733+ If a folder contains both tutorial source files and `.js` files, JSDoc no longer attempts to parse
734the `.js` files as JSON files. (#222)
735+ The "evilstreak" Markdown parser now works correctly with files that use Windows-style line
736endings. (#223)
737+ JSDoc no longer fails unit tests when the `conf.json` file is not present. (#206)
738+ On Windows, JSDoc now passes all unit tests. (Multiple commits)
739
740### Plugins
741
742+ The new `partial` plugin adds support for a `@partial` tag, which links to an external file that
743contains JSDoc comments. (#156)
744+ The new `commentsOnly` plugin removes everything in a file except JSDoc-style comments. You can
745use this plugin to document source files that are not valid JavaScript, including source files for
746other languages. (#304)
747+ The new `eventDumper` plugin logs information about parser events to the console. (#242)
748+ The new `verbose` plugin logs the name of each input file to the console. (#157)
749
750### Template enhancements
751
752#### Default template
753
754+ The template output now includes pretty-printed versions of source files. This feature is enabled
755by default. To disable this feature, add the property `templates.default.outputSourceFiles: false`
756to your `conf.json` file. (#208)
757+ You can now use the template if it is placed outside of the JSDoc directory. (#198)
758+ The template no longer throws an error when a parameter does not have a name. (#175)
759+ The navigation bar now includes an "Events" section if any events are documented. (#280)
760+ Pages no longer include a "Classes" header when no classes are documented. (eb0186b9)
761+ Member details now include "Inherited From" section when a member is inherited from another
762member. (#154)
763+ If an `@author` tag contains text in the format "Jane Doe <jdoe@example.com>", the value is now
764converted to an HTML `mailto:` link. (#326)
765+ Headings for functions now include the function's signature. (#253)
766+ Type information is now displayed for events. (#192)
767+ Functions now link to their return type when appropriate. (#192)
768+ Type definitions that contain functions are now displayed correctly. (#292)
769+ Tutorial output is now generated correctly. (#188)
770+ Output files now use Google Code Prettify with the Tomorrow theme as a syntax highlighter. (#193)
771+ The `index.html` output file is no longer overwritten if a namespace called `index` has been
772documented. (#244)
773+ The current JSDoc version number is now displayed in the footer. (#321)
774
775#### Haruki template
776
777+ Members are now contained in arrays rather than objects, allowing overloaded members to be
778documented. (#153)
779+ A clearer error message is now provided when the output destination is not specified correctly.
780(#174)
781
782
783## 3.0.1 (June 2012)
784
785### Enhancements
786
787+ The `conf.json` file may now contain `source.include` and `source.exclude` properties. (#56)
788 + `source.include` specifies files or directories that JSDoc should _always_ check for
789 documentation.
790 + `source.exclude` specifies files or directories that JSDoc should _never_ check for
791 documentation.
792 These settings take precedence over the `source.includePattern` and `source.excludePattern`
793 properties, which contain regular expressions that JSDoc uses to search for source files.
794+ The `-t/--template` option may now specify the absolute path to a template. (#122)
795
796### Bug fixes
797
798+ JSDoc no longer throws exceptions when a symbol has a special name, such as `hasOwnProperty`.
799(1ef37251)
800+ The `@alias` tag now works correctly when documenting inner classes as globals. (810dd7f7)
801
802### Template improvements
803
804+ The default template now sorts classes by name correctly when the classes come from several
805modules. (4ce17195)
806+ The Haruki template now correctly supports `@example`, `@members`, and `@returns` tags. (6580e176,
80759655252, 31c8554d)
808
809
810## 3.0.0 (May 2012)
811
812Initial release.
813
814[605]: https://github.com/jsdoc/jsdoc/issues/605
815[738]: https://github.com/jsdoc/jsdoc/issues/738
816[970]: https://github.com/jsdoc/jsdoc/issues/970
817[1129]: https://github.com/jsdoc/jsdoc/issues/1129
818[1361]: https://github.com/jsdoc/jsdoc/issues/1361
819[1410]: https://github.com/jsdoc/jsdoc/issues/1410
820[1412]: https://github.com/jsdoc/jsdoc/issues/1412
821[1643]: https://github.com/jsdoc/jsdoc/issues/1643
822[1644]: https://github.com/jsdoc/jsdoc/issues/1644