
Security News
minimatch Patches 3 High-Severity ReDoS Vulnerabilities
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.
@volar/source-map
Advanced tools
Provides functionality related to source maps.
SourceMap class with the following methods:Params:
fallbackToAnyMatch(default: false): allow the start and end offsets to come from different mappings.filter?: (data: Data) => boolean)(default: undefined): according to mapping: Mapping.data, filter out offsets that do not meet the custom conditions.Methods:
toSourceRange(generatedStart: number, generatedEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean): Returns all source start and end offsets for the given generated start and end offsets.
toGeneratedRange(sourceStart: number, sourceEnd: number, fallbackToAnyMatch: boolean, filter?: (data: Data) => boolean) : Returns all generated start and end offsets for the given source start and end offsets.
toSourceLocation(generatedOffset: number, filter?: (data: Data) => boolean): Returns all source offsets for a given generated offset.
toGeneratedLocation(sourceOffset: number, filter?: (data: Data) => boolean): Returns all generated offsets for a given source offset.
MappingThe Mapping is a tuple that represents a mapping in the source map. It consists of the following elements:
source: A string representing the source file. This can be undefined.sourceOffsets: Offsets in the source code.generatedOffsets: Offsets in the generated code.data: The data associated with this mapping. The type of this data is generic and can be specified when creating a SourceMap instance.Here is an example of a Mapping:
let mapping: Mapping<MyDataType> = {
source: '.../sourceFile.ts',
sourceOffsets: [10],
generatedOffsets: [30],
lengths: [10],
data: myData,
};
In this example, myData is of type MyDataType, which is the type specified for the SourceMap instance.
Remember to replace MyDataType and myData with actual types and data that are relevant to your project.
This project is licensed under the MIT License. See the LICENSE file for more details.
The 'source-map' package is a widely-used library for generating and consuming source maps. It provides similar functionalities to @volar/source-map, such as creating, parsing, and combining source maps. However, 'source-map' is more established and has a larger user base.
The 'source-map-support' package provides source map support for stack traces in node.js. While it also deals with source maps, its primary focus is on enhancing error stack traces with source map information, making it slightly different in scope compared to @volar/source-map.
Webpack is a module bundler that includes built-in support for source maps. While it is not solely focused on source maps, it provides extensive functionalities for generating and managing source maps as part of its bundling process. It is more comprehensive and complex compared to @volar/source-map.
FAQs
Provides functionality related to source maps.
The npm package @volar/source-map receives a total of 5,561,211 weekly downloads. As such, @volar/source-map popularity was classified as popular.
We found that @volar/source-map demonstrated a healthy version release cadence and project activity because the last version was released less than 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
minimatch patched three high-severity ReDoS vulnerabilities that can stall the Node.js event loop, and Socket has released free certified patches.

Research
/Security News
Socket uncovered 26 malicious npm packages tied to North Korea's Contagious Interview campaign, retrieving a live 9-module infostealer and RAT from the adversary's C2.

Research
An impersonated golang.org/x/crypto clone exfiltrates passwords, executes a remote shell stager, and delivers a Rekoobe backdoor on Linux.