stack-trace
Advanced tools
Comparing version 0.0.10 to 1.0.0-pre1
@@ -5,3 +5,3 @@ { | ||
"description": "Get v8 stack traces as an array of CallSite objects.", | ||
"version": "0.0.10", | ||
"version": "1.0.0-pre1", | ||
"homepage": "https://github.com/felixge/node-stack-trace", | ||
@@ -12,12 +12,28 @@ "repository": { | ||
}, | ||
"main": "./lib/stack-trace", | ||
"type": "module", | ||
"main": "index.js", | ||
"exports": { | ||
".": "./index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"jest": { | ||
"testEnvironment": "node", | ||
"transform": { | ||
"^.+\\.js$": "babel-jest" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "jest", | ||
"release": "git push && git push --tags && npm publish" | ||
}, | ||
"engines": { | ||
"node": "*" | ||
"node": "16" | ||
}, | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"far": "0.0.3", | ||
"@babel/preset-env": "^7.14.1", | ||
"babel-jest": "^26.6.3", | ||
"jest": "^26.6.3", | ||
"long-stack-traces": "0.1.2" | ||
} | ||
} |
# stack-trace | ||
[![Build Status](https://travis-ci.org/felixge/node-stack-trace.svg?branch=master)](https://travis-ci.org/felixge/node-stack-trace) | ||
Get v8 stack traces as an array of CallSite objects. | ||
@@ -15,7 +17,7 @@ | ||
``` javascript | ||
var stackTrace = require('stack-trace'); | ||
var trace = stackTrace.get(); | ||
```javascript | ||
import { get } from 'stack-trace'; | ||
const trace = get(); | ||
require('assert').strictEqual(trace[0].getFileName(), __filename); | ||
expect(trace[0].getFileName()).toBe(__filename); | ||
``` | ||
@@ -26,8 +28,8 @@ | ||
``` javascript | ||
var stackTrace = require('stack-trace'); | ||
var err = new Error('something went wrong'); | ||
var trace = stackTrace.parse(err); | ||
```javascript | ||
import { parse } from 'stack-trace'; | ||
const err = new Error('something went wrong'); | ||
const trace = parse(err); | ||
require('assert').strictEqual(trace[0].getFileName(), __filename); | ||
expect(trace[0].getFileName()).toBe(__filename); | ||
``` | ||
@@ -77,3 +79,3 @@ | ||
The official v8 CallSite object API can be found [here][v8stackapi]. A quick | ||
The official v8 CallSite object API can be found [here][https://github.com/v8/v8/wiki/Stack-Trace-API#customizing-stack-traces]. A quick | ||
excerpt: | ||
@@ -97,3 +99,3 @@ | ||
[v8stackapi]: http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi | ||
[v8stackapi]: https://v8.dev/docs/stack-trace-api | ||
@@ -100,0 +102,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
18641
9
352
1
101
Yes
4
2