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.6.1 to 0.6.2

4

History.md

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

0.6.2 / 2018-03-31
==================
* fix(parse): filter out leading comments that are in previous blocks due to esprima quirks
0.6.1 / 2018-03-08

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

@@ -17,2 +17,4 @@ var _ = require('lodash');

ret.result = {};
var existingRanges = [];
var blockFns = ['it', 'specify'];

@@ -34,8 +36,15 @@ ret.visit = function(node, parent, context) {

_.get(node, 'expression.type') === 'CallExpression' &&
(_.get(node, 'expression.callee.name') === 'it' || _.get(node, 'expression.callee.name') === 'specify') &&
blockFns.indexOf(_.get(node, 'expression.callee.name')) !== -1 &&
_.get(node, 'expression.arguments.length', 0) > 1) {
// Weird but esprima sometimes treats the last comment in a previous
// `it()` block as a leading comment for the next `it()` block, so
// filter out comments that are in other `it()` blocks.
var _comments = existingRanges.length === 0 ?
node.leadingComments :
(node.leadingComments || []).filter(c => c.range[0] > _.last(existingRanges)[1]);
existingRanges.push(node.range);
var block = {
type: 'it',
contents: node.expression.arguments[0].value,
comments: _.takeRight(_.map(node.leadingComments || [], 'value')),
comments: _.map(_comments || [], 'value'),
code: contents.substring(node.expression.arguments[1].body.range[0] + 1, node.expression.arguments[1].body.range[1] - 1)

@@ -42,0 +51,0 @@ };

2

package.json
{
"name": "acquit",
"version": "0.6.1",
"version": "0.6.2",
"description": "Parse BDD-style tests (Mocha, Jasmine) to generate documentation",

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

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