source-map-js
npmv1.2.1TypeScriptGenerates and consumes source maps
Adopt with care
source-map-js is usable, with caveats. Last published 731 days ago.
- AAdoption: grade A, Excellent.
157.7M downloads per week and 9 known dependents.
- DMaintenance: grade D, Poor — a real concern.
Last published 731 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 137 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
BSD-3-Clause — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding source-map-js to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=0.10.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the source-map-js README.
var rawSourceMap = {
version: 3,
file: 'min.js',
names: ['bar', 'baz', 'n'],
sources: ['one.js', 'two.js'],
sourceRoot: 'http://example.com/www/js/',
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
};
var smc = new SourceMapConsumer(rawSourceMap);
console.log(smc.sources);
// [ 'http://example.com/www/js/one.js',
// 'http://example.com/www/js/two.js' ]Dependencies
Declared by source-map-js v1.2.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on source-map-js.
Tool for transforming styles with JS plugins
A utility-first CSS framework for rapidly building custom user interfaces.
Modify a JS/TS file and write back magically just like JSON!
@vue/compiler-core
Modify strings, generate sourcemaps
A pure JavaScript implementation of Sass.
Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol
A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations
@vue/compiler-sfc
Relationship graph
Dependencies (left) and dependents (right) of source-map-js.
Frequently installed together
TypeScript definitions for node
Immutable Data Collections
An AST-based pattern checker for JavaScript.
The tiniest and the fastest library for terminal output formatting with ANSI colors
A tiny (118 bytes), secure URL-friendly unique string ID generator
Next generation testing framework powered by Vite
A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.
A JavaScript parser
Minimal and efficient cross-platform file watching library
Babel Types is a Lodash-esque utility library for AST nodes
Encode/decode sourcemap mappings
Fixes stack traces for files with source maps
Release history
No releases in the last two years, typically about 71 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.1latest | 2 years ago | 137 KB | BSD-3-Clause |
| 1.2.0 | 2 years ago | 137 KB | BSD-3-Clause |
| 1.1.0 | 2 years ago | 137 KB | BSD-3-Clause |
| 1.0.3 | 2 years ago | 136 KB | BSD-3-Clause |
| 1.0.2 | 4 years ago | 144 KB | BSD-3-Clause |
| 1.0.1 | 4 years ago | 112 KB | BSD-3-Clause |
| 1.0.0 | 4 years ago | 96 KB | BSD-3-Clause |
| 0.6.2 | 5 years ago | 762 KB | BSD-3-Clause |
Overview
source-map-js is an npm package that generates and consumes source maps. It is extremely widely used, with about 157.7M downloads per week and 9 known dependents in the graph. The latest version is 1.2.1, released under the BSD-3-Clause license.
Who should use it
Teams working in the npm ecosystem who need generates and consumes source maps and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (157.7M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (BSD-3-Clause).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use source-map-js?
source-map-js is usable, with caveats. Last published 731 days ago.
How do I install source-map-js?
Run `npm install source-map-js` to add source-map-js to your npm project.
What license is source-map-js released under?
source-map-js is distributed under the BSD-3-Clause license.
How popular is source-map-js?
source-map-js has approximately 157,669,273 downloads per week and 9 known dependent packages.
Is source-map-js still maintained?
The most recent release of source-map-js (v1.2.1) was published 2 years ago.
Does source-map-js run install scripts?
No. source-map-js does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.