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

acquit

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquit - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

4

History.md

@@ -0,1 +1,5 @@

0.5.0 / 2017-07-17
==================
* chore: upgrade to latest esprima and lodash
0.4.1 / 2015-12-07

@@ -2,0 +6,0 @@ ==================

4

lib/index.js
var parse = require('./parse');
var trimEachLine = require('./trimEachLine');
var _ = require('underscore');
var _ = require('lodash');
'use strict';
var transforms = [];

@@ -8,0 +6,0 @@ var outputProcessors = [];

@@ -1,2 +0,2 @@

var _ = require('underscore');
var _ = require('lodash');
var esprima = require('esprima');

@@ -11,3 +11,3 @@ var marked = require('marked');

var tree = esprima.parse(contents, { attachComment: true });
var tree = esprima.parse(contents, { attachComment: true, range: true });

@@ -20,25 +20,23 @@ var visitorFactory = function() {

ret.visit = function(node, parent, context) {
if (node.type === 'CallExpression' &&
node.callee &&
node.callee.name === 'describe' &&
node.arguments &&
node.arguments.length) {
if (node.type === 'ExpressionStatement' &&
_.get(node, 'expression.type') === 'CallExpression' &&
_.get(node, 'expression.callee.name') === 'describe' &&
_.get(node, 'expression.arguments.length', 0) > 0) {
var block = {
type: 'describe',
contents: node.arguments[0].value,
contents: node.expression.arguments[0].value,
blocks: [],
comments: _.pluck(node.callee.leadingComments || [], 'value')
comments: _.map(node.leadingComments || [], 'value')
};
context.push(block);
return block.blocks;
} else if (node.type === 'CallExpression' &&
node.callee &&
node.callee.name === 'it' &&
node.arguments &&
node.arguments.length) {
} else if (node.type === 'ExpressionStatement' &&
_.get(node, 'expression.type') === 'CallExpression' &&
_.get(node, 'expression.callee.name') === 'it' &&
_.get(node, 'expression.arguments.length', 0) > 1) {
var block = {
type: 'it',
contents: node.arguments[0].value,
comments: _.pluck(node.callee.leadingComments || [], 'value'),
code: contents.substring(node.arguments[1].body.range[0] + 1, node.arguments[1].body.range[1] - 1)
contents: node.expression.arguments[0].value,
comments: _.map(node.leadingComments || [], 'value'),
code: contents.substring(node.expression.arguments[1].body.range[0] + 1, node.expression.arguments[1].body.range[1] - 1)
};

@@ -45,0 +43,0 @@

{
"name": "acquit",
"version": "0.4.1",
"version": "0.5.0",
"description": "Parse BDD-style tests (Mocha, Jasmine) to generate documentation",

@@ -20,5 +20,5 @@ "main": "index.js",

"commander": "2.5.0",
"esprima": "https://github.com/ariya/esprima/archive/85fc2f4b6ad109a86d80d9821f52b5b38d0105c0.tar.gz",
"marked": "0.3.5",
"underscore": "1.5.2"
"esprima": "4.0.0",
"lodash": "4.17.4",
"marked": "0.3.5"
},

@@ -35,3 +35,3 @@ "jscsConfig": {

"gulp-mocha": "2.0.0",
"istanbul": "0.3.5",
"istanbul": "0.4.2",
"jscs": "1.9.0",

@@ -38,0 +38,0 @@ "mocha": "2.0.1"

Sorry, the diff of this file is not supported yet

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