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

dgeni-packages

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgeni-packages - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

10

CHANGELOG.md

@@ -0,1 +1,11 @@

## v0.8.2 03/22/2014
**Bug Fixes**
* fix(jsdoc/jsdoc-extractor): ensure Windows newlines are respected 7f1e1627
* fix(jsdoc/jsdoc-extractor): fix off-by-one error fedcf6b1
* fix(jsdoc/lib/walk): also walk the keys of properties 4a8ae60d
* fix(jsdoc/nunjucks-renderer): improve error message 554c7afd
## v0.8.1 03/18/2014

@@ -2,0 +12,0 @@

8

jsdoc/extractors/jsdoc.js
var _ = require('lodash');
var jsParser = require('esprima');
var walk = require('../lib/walk');
var LEADING_STAR = /^\s*\*[^\S\n]?/gm;
var LEADING_STAR = /^[^\S\r\n]*\*[^\S\n\r]?/gm;

@@ -20,3 +20,3 @@ module.exports = {

// To test for a jsdoc comment (i.e. starting with /** ), we need to check for a leading
// star since the parser strips off the first "/*"
// star since the parser strips off the first "/*"
return comment.type === 'Block' && comment.value.charAt(0) === '*';

@@ -41,3 +41,3 @@ })

content: text,
code: walk.findNodeAfter(ast, comment.range[1]+1)
code: walk.findNodeAfter(ast, comment.range[1])
};

@@ -49,2 +49,2 @@

}
};
};

@@ -265,4 +265,8 @@ // Taken from Marijn Haverbeke's Acorn Parser Walk Utility

for (var i = 0; i < node.properties.length; ++i)
c(node.properties[i].value, st, "Expression");
c(node.properties[i], st);
};
base.Property = function(node, st, c) {
c(node.key, st);
c(node.value, st);
};
base.FunctionExpression = base.FunctionDeclaration;

@@ -269,0 +273,0 @@ base.SequenceExpression = function(node, st, c) {

@@ -20,3 +20,3 @@ var _ = require('lodash');

if ( !config.rendering || !config.rendering.templateFolders ) {
throw new Error('Invalid configuration: You must provide a valid config.rendering object');
throw new Error('Invalid configuration: You must provide config.rendering.templateFolders array');
}

@@ -23,0 +23,0 @@

@@ -7,2 +7,3 @@ var extractor = require('../../extractors/jsdoc');

describe("js doc extractor", function() {
describe("pattern", function() {

@@ -14,3 +15,6 @@ it("should only match js files", function() {

});
describe("process", function() {
it('should return a collection of documents extracted from the file', function() {

@@ -24,2 +28,9 @@ var docs = extractor.processFile('some/file.js', srcJsContent);

it("should strip off the leading whitespace/stars from each line of the comments", function() {
var docs = extractor.processFile('some/file.js', '/** abc \n * other stuff \n\t\t*last line.\n*/\n');
expect(docs[0].content).toEqual('abc \nother stuff \nlast line.');
});
it("should ignore non-jsdoc comments", function() {

@@ -30,2 +41,3 @@ var docs = extractor.processFile('some/file.js', '/** Some jsdoc comment */\n// A line comment\n\/* A non-jsdoc block comment*/');

it("should find the next code item following the comment and attach it to the doc", function() {

@@ -38,3 +50,8 @@ var docs = extractor.processFile('some/file.js', srcJsContent);

});
it("should not remove windows new line characters when stripping stars from comments", function() {
var docs = extractor.processFile('some/file.js', '/** Some jsdoc comment\r\n* over multiple\r\n* lines\r\n**/');
expect(docs[0].content).toEqual('Some jsdoc comment\r\nover multiple\r\nlines');
});
});
});
{
"name": "dgeni-packages",
"version": "0.8.1",
"version": "0.8.2",
"description": "A collection of dgeni packages for generating documentation from source code",

@@ -56,4 +56,5 @@ "scripts": {

"Andy Joslin <andytjoslin@gmail.com>",
"Julie <ju.ralph@gmail.com>"
"Julie <ju.ralph@gmail.com>",
"Kevin Rowe <kevinrowe@outlook.com>"
]
}
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