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

stackman

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stackman - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

8

index.js

@@ -23,3 +23,3 @@ 'use strict'

var READ_FILE_OPTS = semver.lt(process.version, '0.9.11') ? 'utf8' : { encoding: 'utf8' }
var ESCAPED_REGEX_PATH_SEP = path.sep === '/' ? '\/' : '\\\\'
var ESCAPED_REGEX_PATH_SEP = path.sep === '/' ? '/' : '\\\\'
var MODULE_FOLDER_REGEX = new RegExp('.*node_modules' + ESCAPED_REGEX_PATH_SEP + '([^' + ESCAPED_REGEX_PATH_SEP + ']*)')

@@ -31,3 +31,3 @@

if (!opts) opts = {}
var lines_of_context = opts.context || LINES_OF_CONTEXT
var linesOfContext = opts.context || LINES_OF_CONTEXT
var sync = opts.sync

@@ -55,5 +55,5 @@

return {
pre: lines.slice(Math.max(0, lineno - (lines_of_context + 1)), lineno - 1),
pre: lines.slice(Math.max(0, lineno - (linesOfContext + 1)), lineno - 1),
line: lines[lineno - 1],
post: lines.slice(lineno, lineno + lines_of_context)
post: lines.slice(lineno, lineno + linesOfContext)
}

@@ -60,0 +60,0 @@ }

{
"name": "stackman",
"version": "1.2.6",
"version": "1.2.7",
"description": "Enhance an error stacktrace with code excerpts and other goodies",

@@ -8,13 +8,13 @@ "main": "index.js",

"after-all": "^2.0.2",
"async-cache": "^1.0.0",
"async-cache": "^1.1.0",
"debug": "^2.2.0",
"error-callsites": "^1.0.0",
"lru-cache": "^3.2.0",
"path-is-absolute": "^1.0.0",
"semver": "^5.1.0"
"error-callsites": "^1.0.1",
"lru-cache": "^4.0.1",
"path-is-absolute": "^1.0.1",
"semver": "^5.3.0"
},
"devDependencies": {
"longjohn": "=0.2.9",
"standard": "^5.4.1",
"tape": "^4.2.2"
"standard": "^8.5.0",
"tape": "^4.6.2"
},

@@ -47,5 +47,5 @@ "scripts": {

"coordinates": [
55.68766720000001,
12.5955126
55.6809887,
12.5643973
]
}

@@ -6,2 +6,3 @@ 'use strict'

var afterAll = require('after-all')
var semver = require('semver')
var Stackman = require('../')

@@ -125,3 +126,3 @@

Stackman(opts)(err, function (stack) {
t.equal(stack.frames.length, 1)
t.equal(stack.frames.length, nonStackmanFrames())
t.ok(stack.frames[0].isNode())

@@ -138,3 +139,3 @@ t.end()

Stackman(opts)(err, function (stack) {
t.equal(stack.frames.length, 2)
t.equal(stack.frames.length, nonStackmanFrames() + 1)
t.ok(stack.frames[0].getFileName().indexOf('/test/test.js') !== -1)

@@ -144,1 +145,9 @@ t.end()

})
// The different versions of Node.js have implemented timers with a different
// number of function calls. This is just a simple hack to get around it.
function nonStackmanFrames () {
if (semver.lt(process.version, '5.0.0')) return 1
if (semver.lt(process.version, '6.0.0')) return 2
return 3
}

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