Skip to content

Commit 087ac3b

Browse files
author
Duc Tri Le
committed
Merge branch 'original-master'
2 parents d1e3d19 + 3fc0cd0 commit 087ac3b

36 files changed

+230
-129
lines changed

.eslintrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
"no-caller": 2,
4949
"no-div-regex": 2,
5050
"no-else-return": 0,
51-
"no-empty-label": 2,
5251
"no-eq-null": 2,
5352
"no-eval": 2,
5453
"no-extra-bind": 2,
5554
"no-extend-native": 2,
56-
"no-fallthrough": 2,
55+
"no-fallthrough": 0, // disabled due to ESLint bug
5756
"no-floating-decimal": 2,
5857
"no-implied-eval": 2,
5958
"no-iterator": 2,
@@ -156,12 +155,11 @@
156155
"semi": [2, "always"],
157156
"semi-spacing": 2,
158157
"sort-vars": 0,
159-
"space-after-keywords": [2, "always"],
158+
"keyword-spacing": 2,
160159
"space-before-blocks": [2, "always"],
161160
"space-in-brackets": 0, // TODO: enable?
162161
"space-in-parens": 0, // TODO: enable?
163162
"space-infix-ops": 2,
164-
"space-return-throw-case": 2,
165163
"space-unary-ops": 2,
166164
"spaced-comment": [2, "always"],
167165
"wrap-regex": 0,

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
language: node_js
22

33
node_js:
4-
- "0.10"
5-
- "0.12"
4+
- "6"
5+
- "5"
6+
- "4"
67

78
install: npm install -g gulp; npm install

CHANGES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
This file describes notable changes in each version of JSDoc 3. To download a specific version of JSDoc 3, see [GitHub's tags page](https://github.com/jsdoc3/jsdoc/tags).
44

55

6+
## 3.4.1 (September 2016)
7+
8+
### Enhancements
9+
+ When installing JSDoc from NPM, all dependencies are now pulled from NPM. (#961)
10+
+ The configuration setting `tags.allowUnknownTags` may now contain an array of tag names that should be allowed. (#1159)
11+
12+
### Bug fixes
13+
+ When an ES2015 module's default export is a class, JSDoc now documents the class correctly. (#1113, #1120)
14+
+ JSDoc no longer crashes when an ES2015 module exports an anonymous class. (#1113)
15+
+ JSDoc no longer crashes when the experimental object spread operator is used. (#1141)
16+
+ In ES2015 methods, JSDoc now autodetects whether a parameter is a default or repeatable parameter. (#1144)
17+
+ The Markdown plugin now works correctly with inline tags that contain special characters, such as `{@link chat."#channel"}`. (#1035)
18+
+ When JSDoc is run in a directory that has a `plugins/` or `templates/` directory, JSDoc can now discover plugins and templates in other directories. (#1081)
19+
20+
### Templates
21+
+ The default template now uses appropriate styles for displaying tables. (#1064)
22+
+ The default template's CSS file no longer uses the same style for both `<h2>` and `<h3>` elements. (#1108)
23+
+ JSDoc now includes a `silent` template that generates no output. This template makes it easier to use JSDoc as a linter to check for syntax errors and unrecognized tags in documentation comments. (#1160)
24+
25+
626
## 3.4.0 (November 2015)
727

828
### Major changes

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the
44
"License"). Commercial and non-commercial use are permitted in compliance with
55
the License.
66

7-
Copyright (c) 2011-2015 Michael Mathews <[email protected]> and the
7+
Copyright (c) 2011-present Michael Mathews <[email protected]> and the
88
[contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
99
All rights reserved.
1010

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ generate and customize your documentation. Here are just a few:
4949
+ [jsdoc3Template](https://github.com/DBCDK/jsdoc3Template)
5050
([example](https://github.com/danyg/jsdoc3Template/wiki#wiki-screenshots))
5151
+ [minami](https://github.com/Nijikokun/minami)
52+
+ [docdash](https://github.com/clenemt/docdash)([example](http://clenemt.github.io/docdash/))
5253

5354
### Build Tools
5455

56+
+ [JSDoc Ant task](https://github.com/jannon/jsdoc3-ant-task)
5557
+ [JSDoc Grunt plugin](https://github.com/krampstudio/grunt-jsdoc)
56-
+ [JSDoc ant task](https://github.com/jannon/jsdoc3-ant-task)
57-
58+
+ [JSDoc Gulp plugin](https://github.com/mlucool/gulp-jsdoc3)
5859

5960
For More Information
6061
--------------------
@@ -68,7 +69,7 @@ Overflow](http://stackoverflow.com/questions/tagged/jsdoc).
6869
License
6970
-------
7071

71-
JSDoc 3 is copyright (c) 2011-2015 Michael Mathews <[email protected]> and the
72+
JSDoc 3 is copyright (c) 2011-present Michael Mathews <[email protected]> and the
7273
[contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
7374

7475
JSDoc 3 is free software, licensed under the Apache License, Version 2.0. See

cli.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -314,17 +314,11 @@ function resolvePluginPaths(paths) {
314314
paths.forEach(function(plugin) {
315315
var basename = path.basename(plugin);
316316
var dirname = path.dirname(plugin);
317-
// convoluted way to detect the correct path for the plugins; done this round-about way to cope
318-
// with scenarios where JSDoc is executed in another project's working directory where that
319-
// project has plugins of itself in a similar directory structure (plugins/*)
320-
var pluginPath = path.getResourcePath(dirname, basename + ".js");
317+
var pluginPath = path.getResourcePath(dirname);
321318

322319
if (!pluginPath) {
323320
logger.error('Unable to find the plugin "%s"', plugin);
324321
return;
325-
} else {
326-
// correct the path to the plugin:
327-
pluginPath = path.dirname(pluginPath);
328322
}
329323

330324
pluginPaths.push( path.join(pluginPath, basename) );
@@ -416,18 +410,7 @@ cli.generateDocs = function() {
416410

417411
env.opts.template = (function() {
418412
var publish = env.opts.template || 'templates/default';
419-
// convoluted way to detect the correct path for the templates; done this round-about way to cope
420-
// with scenarios where JSDoc is executed in another project's working directory where that
421-
// project has templates of itself in a similar directory structure (templates/<name>/)
422-
var templatePath = path.getResourcePath(publish, "publish.js");
423-
424-
if (!templatePath) {
425-
logger.error('Unable to find the template "%s"', publish);
426-
return publish;
427-
} else {
428-
// correct the path to the template:
429-
templatePath = path.dirname(templatePath);
430-
}
413+
var templatePath = path.getResourcePath(publish);
431414

432415
// if we didn't find the template, keep the user-specified value so the error message is
433416
// useful

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gulp.task('coverage', function(cb) {
4848
});
4949

5050
gulp.task('lint', function() {
51-
var pipeline = gulp.src(options.lintPaths)
51+
return gulp.src(options.lintPaths)
5252
.pipe(eslint())
5353
.pipe(eslint.formatEach())
5454
.pipe(eslint.failOnError());

lib/jsdoc/fs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
var fs = require('fs');
88
var path = require('path');
99
var stream = require('stream');
10-
var wrench = require('wrench');
10+
var fse = require('fs-extra');
1111

1212
var ls = exports.ls = function(dir, recurse, _allFiles, _path) {
1313
var file;
@@ -91,7 +91,7 @@ exports.mkPath = function(_path) {
9191
_path = _path.join('');
9292
}
9393

94-
wrench.mkdirSyncRecursive(_path);
94+
fse.mkdirsSync(_path);
9595
};
9696

9797
// adapted from http://procbits.com/2011/11/15/synchronous-file-copy-in-node-js
@@ -106,7 +106,7 @@ exports.copyFileSync = function(inFile, outDir, fileName) {
106106
var outFile = path.join( outDir, fileName || path.basename(inFile) );
107107
var pos = 0;
108108

109-
wrench.mkdirSyncRecursive(outDir);
109+
fse.mkdirsSync(outDir);
110110
read = fs.openSync(inFile, 'r');
111111
write = fs.openSync(outFile, 'w');
112112

lib/jsdoc/opts/args.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,5 @@ exports.get = function(name) {
8686
else if ( hasOwnProp.call(ourOptions, name) ) {
8787
return ourOptions[name];
8888
}
89+
return undefined;
8990
};

lib/jsdoc/path.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,11 @@ exports.getResourcePath = function(filepath, filename) {
111111
return true;
112112
}
113113

114-
function fileExists(_path) {
115-
// see also:
116-
// - http://stackoverflow.com/questions/4482686/check-synchronously-if-file-directory-exists-in-node-js
117-
// - https://nodejs.org/api/fs.html#fs_fs_existssync_path
118-
try {
119-
var stats = fs.lstatSync(_path);
120-
121-
return stats.isFile();
122-
}
123-
catch (e) {
124-
return false;
125-
}
126-
}
127-
128114
// absolute paths are normalized by path.resolve on the first pass
129115
[path.dirname(env.opts.configure || ''), env.pwd, env.dirname].forEach(function(_path) {
130116
if (!result && _path) {
131117
_path = path.resolve(_path, filepath);
132-
if ( pathExists(_path) && (filename ? fileExists(path.join(_path, filename)) : true)) {
118+
if ( pathExists(_path) ) {
133119
result = _path;
134120
}
135121
}

0 commit comments

Comments
 (0)