source_maps
0.10.14, released 3 months ago by tools.dart.dev
A Dart library to parse, build, and manipulate source map v3 files.
WASM-ready
What it does
Provides data types, parsers, and builders for working with the source map version 3 specification. It allows tools to read mapping information between generated output and original source code or programmatically generate source maps. It also integrates with source_span for tracking precise file locations and reporting errors.
AI-written summary of version 0.10.14, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building compilers, transpilers, or code-generation tools that emit source maps.
- You need to parse existing source maps to translate generated file locations back to source files.
- You are building developer tooling that needs to display contextual errors referencing original source positions.
Skip it when
- You only need to translate stack traces in Dart applications (use source_map_stack_trace instead).
- General Flutter app development that does not involve compiling or manipulating source code mappings.
Strengths
- Official Dart team package adhering to the standard source map version 3 specification.
- Includes both builder and parser capabilities for source maps.
- Deeply integrates with the standard source_span package for file location tracking.
Weaknesses
- Low-level utility with minimal usage documentation in the README.
- Unnecessary for standard client-side Flutter application logic.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
None.
Works with
Packages commonly used together with source_maps: ones it builds on, ones built on it, and its own family.
- source_spansource_maps depends on itStandard representation for source code locations, spans, and human-friendly error messages.
- analyzerSame familyPerforms static analysis of Dart code for tool integration and embedding.
- yamlSame familyA Dart library for parsing YAML documents into Dart data structures.
- dart_styleSame familyProvides an API and CLI to format Dart source code automatically.
- test_apiSame familyThe user facing API for structuring Dart tests and checking expectations.
- htmlSame familyA Dart implementation of an HTML5 parser for strings and bytes.
- string_scannerSame familyA class for parsing strings using a sequence of patterns.
- boolean_selectorSame familyParses and evaluates simplified Dart-like boolean expression strings.