Source maps support for Istanbul code coverage toolkit, enabling accurate coverage reporting for transpiled JavaScript code
Overall
score
98%
Build a tool that manages and retrieves source maps for transpiled JavaScript files.
Your tool should register source maps for transpiled files and provide synchronous retrieval of those source maps. The tool needs to support different source map formats and generate simple reports about source map availability.
Register source maps in two ways:
Retrieve registered source maps synchronously:
Generate a simple availability report:
@generates
/**
* Retrieves source map information for registered files
* @param {string} filePath - Path to the file
* @returns {Object|undefined} Source map object or undefined if not found
*/
function getSourceMap(filePath);
/**
* Registers a source map URL for a file
* @param {string} filePath - Path to the transpiled file
* @param {string} sourceMapUrl - URL or path to the source map
*/
function registerSourceMapURL(filePath, sourceMapUrl);
/**
* Registers a source map object for a file
* @param {string} filePath - Path to the transpiled file
* @param {Object} sourceMapObject - Parsed source map object
*/
function registerSourceMapObject(filePath, sourceMapObject);
/**
* Generates a report of source map availability
* @param {string[]} filePaths - Array of file paths to check
* @returns {Object} Report object with 'available' and 'missing' arrays
*/
function generateReport(filePaths);Provides source map storage, registration, and retrieval capabilities for coverage transformation workflows.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-istanbul-lib-source-mapsdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10