{"id":28240046,"url":"https://github.com/codefeathers/nyc-diff","last_synced_at":"2025-08-09T05:11:35.258Z","repository":{"id":42918815,"uuid":"242205666","full_name":"codefeathers/nyc-diff","owner":"codefeathers","description":"Report coverage for changed lines from a unified diff","archived":false,"fork":false,"pushed_at":"2022-03-26T08:04:30.000Z","size":24,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T18:45:13.931Z","etag":null,"topics":["coverage","diff","git-diff","istanbul","nyc"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefeathers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-21T18:32:24.000Z","updated_at":"2023-12-23T04:00:06.000Z","dependencies_parsed_at":"2022-09-14T09:20:59.995Z","dependency_job_id":null,"html_url":"https://github.com/codefeathers/nyc-diff","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codefeathers/nyc-diff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeathers%2Fnyc-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeathers%2Fnyc-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeathers%2Fnyc-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeathers%2Fnyc-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefeathers","download_url":"https://codeload.github.com/codefeathers/nyc-diff/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefeathers%2Fnyc-diff/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269532365,"owners_count":24433271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage","diff","git-diff","istanbul","nyc"],"created_at":"2025-05-19T03:12:28.940Z","updated_at":"2025-08-09T05:11:35.201Z","avatar_url":"https://github.com/codefeathers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nyc-diff\n\nMake sure every addition and modification is covered with nyc-diff by reporting coverage for changed lines from a unified diff format.\n\n## Installation\n\n```\nnpm i -g nyc-diff\n```\n\n## Usage\n\nYou can pipe any unified diff output into the `nyc-diff` via stdin. An example of usage with git-diff is shown below:\n\n```\ngit diff -w \u003ccommit-ish\u003e...\u003ccommit-ish\u003e | nyc-diff [options]\n```\n\n### Output\n\nA JSON file named **nyc-diff-\\\u003cunix timestamp\\\u003e** will be generated when the diff is calculated succesfully in the format shown below. The path of the file can be modified as well by modifying the `--output` option.\n\n```\n[\n\t[\u003cpath from git diff\u003e, \u003carray of line numbers\u003e],\n\t... and more\n]\n```\n\n## Options\n\n#### `--project-dir`\n\nThis is the location in the local file system where code was instrumented by `nyc`. In most common situations this would be the root of your repository. Otherwise, wherever the `.nyc_output` folder of your `nyc` run is located.\n\n#### `--output / -o`\n\nPath at which the resultant JSON will be written to as `.nyc-diff-\\\u003cunix-timestamp\\\u003e`. This defaults next to the same directory as `.nyc_output`.\n\n## Limitations\n\n1. Currently only supports checking coverage of individual statements and not the coverage of their branches.\n2. Can only be used with pipe and does not support cli args.\n3. This tool is built around `nyc` v14.1.1. This tool's functionality is subject to `nyc`'s output format. This might be changed in future versions of nyc, to ensure complete compatibility remain on the same major version.\n\n## Motivation\n\nWorking towards 100% coverage can be a troublesome task, especially at SaaS and product businesses where development on a code base never stops. `nyc-diff` was created to support development teams so as to ensure that any code that has been added or modified has unit-tests written for it.\n\n## Credits\n\nIdea was all [@KlentyBoogi](https://github.com/KlentyBoogi).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefeathers%2Fnyc-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefeathers%2Fnyc-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefeathers%2Fnyc-diff/lists"}