{"id":25129,"library":"coverage-putty","title":"coverage-putty","description":"coverage-putty is a transform preprocessor for Jest that uses Istanbul to exclude JavaScript helper functions generated by the TypeScript transpiler from coverage reports. Version 0.1.0 is the current release, with no recent updates. It helps avoid skewing coverage metrics with boilerplate TypeScript output. Only works with Jest and Istanbul; requires manual transform configuration. No competing packages address this exact niche.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/lengo-org/coverage-putty","tags":["javascript"],"install":[{"cmd":"npm install coverage-putty","lang":"bash","label":"npm"},{"cmd":"yarn add coverage-putty","lang":"bash","label":"yarn"},{"cmd":"pnpm add coverage-putty","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The transform expects a path to the file istanbul-ignore.js inside the package.","wrong":"transform: { 'src/.*\\\\.js$': 'coverage-putty' }","symbol":"istanbul-ignore.js","correct":"transform: { 'src/.*\\\\.js$': 'coverage-putty/istanbul-ignore.js' }"},{"note":"This is a dev dependency, used only during testing.","wrong":"npm install coverage-putty --save","symbol":"Coordination","correct":"npm install coverage-putty --save-dev"},{"note":"transformIgnorePatterns is for ignoring modules from transforming, not for applying a custom transform.","wrong":"Use transformIgnorePatterns","symbol":"Configuration","correct":"Use Jest's transform option in package.json or jest.config.js"}],"quickstart":{"code":"// package.json\n{\n  \"jest\": {\n    \"collectCoverage\": true,\n    \"coverageDirectory\": \"report/\",\n    \"collectCoverageFrom\": [ \"src/**/*.js\" ],\n    \"transform\": {\n      \"src/.*\\\\.js$\": \"coverage-putty/istanbul-ignore.js\"\n    }\n  }\n}\n\n// Run tests\nnpx jest --coverage","lang":"javascript","description":"Configures Jest to use coverage-putty for transforming JS files, excluding TypeScript-generated helpers from coverage."},"warnings":[{"fix":"Ensure the pattern starts with 'src/' and includes proper escaping for dots: 'src/.*\\\\.js$'.","message":"Transform file pattern must be a JavaScript RegExp string, not a file glob.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Compile TypeScript to JS first (e.g., via ts-jest or tsc), then apply the transform on the JS files.","message":"coverage-putty only works with JavaScript files that are output of TypeScript compilation; will not work if you point it at .ts files.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Consider using 'jest-coverage-ignore' or similar alternatives, or test with your Jest version.","message":"The package has not been updated since 2018; may not be compatible with latest Jest versions.","severity":"deprecated","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install coverage-putty --save-dev","cause":"Package not installed or not listed in devDependencies.","error":"Cannot find module 'coverage-putty'"},{"fix":"Ensure 'jest' key exists in package.json with 'transform' object containing the pattern.","cause":"Jest configuration is missing or malformed.","error":"TypeError: Cannot read property 'transform' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}