Repository navigation
srcmap 0.4.0 has security fixes for the srcmap CLI and the dependencies, two possibly breaking API changes, and fixes for the WASM browser build.
Breaking changes
@srcmap/sourcemap:SourceMap.source()andSourceMap.name()now declarestring | null. They already returnednullfor an index that is out of range. The type declarations now say so. Strict TypeScript callers must handlenull.- Parsers without indexed map support now reject indexed maps.
SourceMap::from_json_no_content,SourceMap::from_json_linesand the lazy parser returnParseError::NestedIndexMapfor a map withsections. Before, they parsed it as an empty map. UseSourceMap::from_jsonfor indexed maps.
Security
- Bundled root certificates no longer trust the distrusted emSign root.
webpki-roots1.0.10 fixes RUSTSEC-2026-0381.rustls-webpki0.103.16 fixes RUSTSEC-2026-0382.rustls0.23.46 fixes RUSTSEC-2026-0285 and RUSTSEC-2026-0346 to 0349. These affectsrcmap fetch. srcmap fetchconstrains its downloads.- It follows redirects and the derived source map URL only on the same origin.
- One timeout applies across all redirects.
- It does not overwrite an existing file and does not follow a symlink at the destination.
- It rejects an output directory that is a symlink or that has a symlinked ancestor.
- It removes a partial file when a write fails.
- A server error or a timeout on the conventional
.mapURL is now an error. A 404 is still ignored.
srcmap sources extractcontains its writes in the output directory.- It skips absolute paths, backslash paths, existing files and symlinks in the target path.
- It holds directory handles, so a path swap during the extraction cannot redirect a write.
srcmap-codec: VLQ encoding is memory-safe for the full 64-bit range. The encoder reserved 7 bytes, but some values need 13.
Fixes
@srcmap/sourcemap-wasm: the browser entry works again. It exposes the API as static ESM exports before initialization, initializes the module only once, and ships type declarations.@srcmap/source-map:applySourceMapworks again. It copiessourcesContentand skips a source that the generator does not have.@srcmap/remapping: the CommonJS entry has its WASM fallback again.
Infrastructure
- Dependency updates, Dependabot repair automation, and release publication hardening.
Full Changelog: v0.3.9...v0.4.0