Comparing version 3.4.1 to 3.4.2
@@ -6,2 +6,9 @@ # JSDoc 3 change history | ||
## 3.4.2 (October 2016) | ||
+ Classes exported from an ES2015 module are now documented correctly. (#1137) | ||
+ Fixed an issue that prevented plugins and templates from being loaded correctly. (#1259) | ||
+ Fixed a crash when using the experimental object spread operator in assignments. (#1258) | ||
## 3.4.1 (September 2016) | ||
@@ -8,0 +15,0 @@ |
21
cli.js
@@ -317,6 +317,3 @@ /* global java */ | ||
var dirname = path.dirname(plugin); | ||
// convoluted way to detect the correct path for the plugins; done this round-about way to cope | ||
// with scenarios where JSDoc is executed in another project's working directory where that | ||
// project has plugins of itself in a similar directory structure (plugins/*) | ||
var pluginPath = path.getResourcePath(dirname, basename + '.js'); | ||
var pluginPath = path.getResourcePath(dirname); | ||
@@ -326,5 +323,2 @@ if (!pluginPath) { | ||
return; | ||
} else { | ||
// correct the path to the plugin: | ||
pluginPath = path.dirname(pluginPath); | ||
} | ||
@@ -421,15 +415,4 @@ | ||
var publish = env.opts.template || 'templates/default'; | ||
// convoluted way to detect the correct path for the templates; done this round-about way to cope | ||
// with scenarios where JSDoc is executed in another project's working directory where that | ||
// project has templates of itself in a similar directory structure (templates/<name>/) | ||
var templatePath = path.getResourcePath(publish, 'publish.js'); | ||
var templatePath = path.getResourcePath(publish); | ||
if (!templatePath) { | ||
logger.error('Unable to find the template "%s"', publish); | ||
return publish; | ||
} else { | ||
// correct the path to the template: | ||
templatePath = path.dirname(templatePath); | ||
} | ||
// if we didn't find the template, keep the user-specified value so the error message is | ||
@@ -436,0 +419,0 @@ // useful |
@@ -10,3 +10,3 @@ /** | ||
var stream = require('stream'); | ||
var fse = require('fs-extra'); | ||
var mkdirp = require('mkdirp'); | ||
@@ -95,3 +95,3 @@ var ls = exports.ls = function(dir, recurse, _allFiles, _path) { | ||
fse.mkdirsSync(_path); | ||
mkdirp.sync(_path); | ||
}; | ||
@@ -111,3 +111,3 @@ | ||
fse.mkdirsSync(outDir); | ||
mkdirp.sync(outDir); | ||
read = fs.openSync(inFile, 'r'); | ||
@@ -114,0 +114,0 @@ write = fs.openSync(outFile, 'w'); |
@@ -114,16 +114,2 @@ /** | ||
function fileExists(_path) { | ||
// see also: | ||
// - http://stackoverflow.com/questions/4482686/check-synchronously-if-file-directory-exists-in-node-js | ||
// - https://nodejs.org/api/fs.html#fs_fs_existssync_path | ||
try { | ||
var stats = fs.lstatSync(_path); | ||
return stats.isFile(); | ||
} | ||
catch (e) { | ||
return false; | ||
} | ||
} | ||
// absolute paths are normalized by path.resolve on the first pass | ||
@@ -133,3 +119,3 @@ [path.dirname(env.opts.configure || ''), env.pwd, env.dirname].forEach(function(_path) { | ||
_path = path.resolve(_path, filepath); | ||
if ( pathExists(_path) && (filename ? fileExists(path.join(_path, filename)) : true)) { | ||
if ( pathExists(_path) ) { | ||
result = _path; | ||
@@ -136,0 +122,0 @@ } |
@@ -78,32 +78,13 @@ 'use strict'; | ||
comment: true, | ||
loc: true, | ||
range: true, | ||
tokens: true, | ||
ecmaFeatures: { | ||
arrowFunctions: true, | ||
binaryLiterals: true, | ||
blockBindings: true, | ||
classes: true, | ||
defaultParams: true, | ||
destructuring: true, | ||
experimentalObjectRestSpread: true, | ||
forOf: true, | ||
generators: true, | ||
globalReturn: true, | ||
jsx: true, | ||
modules: true, | ||
newTarget: true, | ||
objectLiteralComputedProperties: true, | ||
objectLiteralDuplicateProperties: true, | ||
objectLiteralShorthandMethods: true, | ||
objectLiteralShorthandProperties: true, | ||
octalLiterals: true, | ||
regexUFlag: true, | ||
regexYFlag: true, | ||
restParams: true, | ||
spread: true, | ||
superInFunctions: true, | ||
templateStrings: true, | ||
unicodeCodePointEscapes: true | ||
} | ||
impliedStrict: true, | ||
jsx: true | ||
}, | ||
ecmaVersion: 7, | ||
loc: true, | ||
range: true, | ||
sourceType: 'module', | ||
tokens: true | ||
}; | ||
@@ -110,0 +91,0 @@ |
@@ -137,2 +137,6 @@ // TODO: docs | ||
case Syntax.ClassDeclaration: | ||
str = nodeToValue(node.id); | ||
break; | ||
case Syntax.ExportAllDeclaration: | ||
@@ -139,0 +143,0 @@ // falls through |
@@ -23,3 +23,2 @@ /** | ||
var Syntax = jsdoc.src.syntax.Syntax; | ||
var unresolvedName = /^((?:module.)?exports|this)(\.|$)/; | ||
@@ -26,0 +25,0 @@ function CurrentModule(doclet) { |
{ | ||
"name": "jsdoc", | ||
"version": "3.4.1", | ||
"revision": "1473376603459", | ||
"version": "3.4.2", | ||
"revision": "1475518472967", | ||
"description": "An API documentation generator for JavaScript.", | ||
@@ -19,6 +19,7 @@ "keywords": [ | ||
"escape-string-regexp": "~1.0.5", | ||
"espree": "~2.2.5", | ||
"fs-extra": "~0.30.0", | ||
"espree": "~3.1.7", | ||
"js2xmlparser": "~1.0.0", | ||
"klaw": "~1.3.0", | ||
"marked": "~0.3.6", | ||
"mkdirp": "~0.5.1", | ||
"requizzle": "~0.2.1", | ||
@@ -25,0 +26,0 @@ "strip-json-comments": "~2.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
17
4488287
12
13240
+ Addedklaw@~1.3.0
+ Addedmkdirp@~0.5.1
+ Addedacorn@3.3.0(transitive)
+ Addedacorn-jsx@3.0.1(transitive)
+ Addedespree@3.1.7(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
- Removedfs-extra@~0.30.0
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedespree@2.2.5(transitive)
- Removedfs-extra@0.30.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjsonfile@2.4.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedespree@~3.1.7