Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/source-map-support
Advanced tools
TypeScript definitions for source-map-support
@types/source-map-support provides TypeScript type definitions for the source-map-support package, which is used to enhance the debugging experience by providing better stack traces with source maps.
Install Source Map Support
This feature allows you to install source map support in your Node.js application, enabling better stack traces that map to the original source code.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install();
Uninstall Source Map Support
This feature allows you to uninstall source map support, reverting to the default stack trace behavior.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.uninstall();
Customizing Source Map Retrieval
This feature allows you to customize how source maps are retrieved, providing a function that returns the source map for a given source file.
const sourceMapSupport = require('source-map-support');
sourceMapSupport.install({
retrieveSourceMap: function(source) {
if (source === 'compiled.js') {
return {
url: 'compiled.js',
map: fs.readFileSync('compiled.js.map', 'utf8')
};
}
return null;
}
});
The source-map package provides a library for working with source maps, including parsing and generating them. Unlike source-map-support, it does not automatically enhance stack traces but provides the tools to work with source maps directly.
stacktrace-js is a library for generating, parsing, and enhancing JavaScript stack traces. It provides more general stack trace manipulation capabilities compared to source-map-support, which focuses specifically on source maps.
error-stack-parser is a library for parsing error stack traces into a more readable format. While it does not directly deal with source maps, it can be used in conjunction with source-map-support to improve error handling and debugging.
npm install --save @types/source-map-support
This package contains type definitions for source-map-support (https://github.com/evanw/node-source-map-support).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/source-map-support.
These definitions were written by Bart van der Schoor, Jason Cheatham, Alcedo Nathaniel De Guzman Jr, Griffin Yourick, and BendingBender.
FAQs
TypeScript definitions for source-map-support
The npm package @types/source-map-support receives a total of 392,430 weekly downloads. As such, @types/source-map-support popularity was classified as popular.
We found that @types/source-map-support 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.