Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@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 300,471 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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.