Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
backtrace-node
Advanced tools
Backtrace error reporting tool for Node.js.
var bt = require('backtrace-node');
bt.initialize({
endpoint: "https://console.backtrace.io",
token: "51cc8e69c5b62fa8c72dc963e730f1e8eacbd243aeafc35d08d05ded9a024121",
});
// ...
bt.report(new Error("something broke"));
This is intended to be one of the first things your application does during
initialization. It registers a handler for uncaughtException
which will
spawn a detached child process to perform the error report and then crash
in the same way that your application would have crashed without the handler.
endpoint
Required.
Example: https://backtrace.example.com:1234
.
Sets the HTTP/HTTPS endpoint that error reports will be sent to.
token
Required.
Example: 51cc8e69c5b62fa8c72dc963e730f1e8eacbd243aeafc35d08d05ded9a024121
.
Sets the token that will be used for authentication when sending an error report.
attributes
Optional. Object that contains additional attributes to be sent along with the error report.
Example:
{
application: "ApplicationName",
serverId: "foo",
}
timeout
Defaults to 1000
. Maximum amount of milliseconds to wait for child process
to process error report and schedule sending the report to Backtrace.
debugBacktrace
Defaults to false
. Set to true
to cause process to wait for the report to
Backtrace to complete before exiting.
allowMultipleUncaughtExceptionListeners
Defaults to false
. Set to true
to not crash when another uncaughtException
listener is detected.
disableGlobalHandler
Defaults to false
. If this is false
, this module will attach an
uncaughtException
handler and report those errors automatically before
re-throwing the exception.
Set to true
to disable this. Note that in this case the only way errors
will be reported is if you call bt.report(error)
.
contextLineCount
Defaults to 20
. When an error is reported, this many lines above and below
each stack function are included in the report.
NOTE: this option is not yet implemented as currently all source code for files in the stack trace are sent in the report.
tabWidth
Defaults to 8
. If there are any hard tabs in the source code, it is unclear
how many spaces they should be indented to correctly display the source code.
Therefore the error report can override this number to specify how many spaces
a hard tab should be represented by when viewing source code.
Send an error report to Backtrace.
error
- should be an Error
object created with new Error("message")
.
If this parameter is not an instance of Error
then backtrace-node will
print a warning message to stderr.callback(err)
- optional. Called when the report is finished sending.FAQs
Backtrace error reporting tool
We found that backtrace-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.