
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
wstacktrace
Advanced tools
跟踪当前函数的调用,初始目的是获取行号,以便打印log时用。
var st = require('wstacktrace');
console.log(st(), 'hello');
console.log(st().location, 'hello');
function a() {
console.log(st().location, 'call a()')
}
a();
function b() {
console.log(st().location, 'call b()')
}
function c() {
b();
console.log(st().location, 'call c()');
}
c();
function promiseFn(a) {
return new Promise(function (res, rej) {
if (a === 1) {
res(true)
} else {
rej(new Error('not 1'))
}
})
}
promiseFn(1).then(function (r) {
console.log(st().location, r);
}).catch(function (e) {
console.log(st().location, e);
});
promiseFn(2).then(function (r) {
console.log(st().location, r);
}).catch(function (e) {
console.log(st().location, e.message);
});
StackTrace {
stack:
[ 'at Object.<anonymous> (/Users/wyc/workspace/my-npm/wstacktrace/test/test.js:12:13)',
'at Module._compile (module.js:624:30)',
'at Object.Module._extensions..js (module.js:635:10)',
'at Module.load (module.js:545:32)',
'at tryModuleLoad (module.js:508:12)',
'at Function.Module._load (module.js:500:3)',
'at Function.Module.runMain (module.js:665:10)',
'at startup (bootstrap_node.js:187:16)',
'at bootstrap_node.js:607:3' ],
filePath: '/Users/wyc/workspace/my-npm/wstacktrace/test/test.js',
row: '12',
column: '13',
fileName: 'test.js',
location: 'test.js:12:13' } 'hello'
test.js:14:13 hello
test.js:17:17 call a()
test.js:23:17 call b()
test.js:28:17 call c()
test.js:44:17 true
test.js:52:17 not 1
FAQs
Wyc's Stack Trace
We found that wstacktrace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.