{"id":16594513,"url":"https://github.com/sverweij/watskeburt","last_synced_at":"2026-02-28T12:21:22.105Z","repository":{"id":44195612,"uuid":"504299470","full_name":"sverweij/watskeburt","owner":"sverweij","description":"get changed files \u0026 their statuses since any git revision","archived":false,"fork":false,"pushed_at":"2026-02-23T20:07:17.000Z","size":2952,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-24T12:26:40.538Z","etag":null,"topics":["git","git-diff"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/watskeburt","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sverweij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-16T20:39:05.000Z","updated_at":"2026-02-23T20:07:21.000Z","dependencies_parsed_at":"2023-10-05T01:21:56.222Z","dependency_job_id":"b946fd02-419d-4e28-9015-0c8e2e318956","html_url":"https://github.com/sverweij/watskeburt","commit_stats":{"total_commits":115,"total_committers":1,"mean_commits":115.0,"dds":0.0,"last_synced_commit":"ac02dd3a00a019b15527ae2c42962f054f240b4c"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/sverweij/watskeburt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverweij%2Fwatskeburt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverweij%2Fwatskeburt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverweij%2Fwatskeburt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverweij%2Fwatskeburt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sverweij","download_url":"https://codeload.github.com/sverweij/watskeburt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverweij%2Fwatskeburt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29933492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T09:58:13.507Z","status":"ssl_error","status_checked_at":"2026-02-28T09:57:57.047Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git","git-diff"],"created_at":"2024-10-11T23:46:29.588Z","updated_at":"2026-02-28T12:21:22.069Z","avatar_url":"https://github.com/sverweij.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# watskeburt\n\nGet changed files \u0026 their statuses since any git _revision_\n\n## :construction_worker: usage\n\n### :scroll: API\n\n```javascript\nimport { list, getSHA } from \"watskeburt\";\n\n// print the SHA1 of the current HEAD\nconsole.log(await getSHA());\n\n// list all files that differ between 'main' and the current revision (including\n// files not staged for commit and files not under revision control)\n/** @type {import('watskeburt').IChange[]} */\nconst lChangedFiles = await list({ oldRevision: \"main\" });\n\n// list all files that differ between 'v0.6.1' and 'v0.7.1' (by definition\n// won't include files staged for commit and/ or not under revision control)\n/** @type {import('watskeburt').IChange[]} */\nconst lChangedFiles = await list({\n  oldRevision: \"v0.6.1\",\n  newRevision: \"v0.7.1\",\n});\n\n// list all files that differ between 'main' and the current revision\n// (excluding files not staged for commit)\n/** @type {import('watskeburt').IChange[]|string} */\nconst lChangedFiles = await list({\n  oldRevision: \"main\",\n  trackedOnly: false, // when set to true leaves out files not under revision control\n  outputType: \"json\", // options: \"object\", \"json\" and \"regex\"\n});\n```\n\nThe array of changes this returns looks like this:\n\n```javascript\n[\n  {\n    name: \"doc/cli.md\",\n    type: \"modified\",\n  },\n  {\n    name: \"test/thing.spec.mjs\",\n    type: \"renamed\",\n    oldName: \"test/old-thing.spec.mjs\",\n  },\n  {\n    name: \"src/not-tracked-yet.mjs\",\n    type: \"untracked\",\n  },\n];\n```\n\n### :shell: cli\n\nWorks with node \u003e=18.11\n\n```shell\n# list all JavaScript-ish files changed since main in a regular expression\n$ npx watskeburt main\n^(src/cli[.]mjs|src/formatters/regex[.]mjs|src/version[.]mjs)$\n```\n\nThis emits a regex that contains all changed files that could be\nsource files in the JavaScript ecosystem (.js, .mjs, .ts, .tsx ...). It can\nbe used in e.g. dependency-cruiser's `--focus` and `--reaches` filters.\n\nThe JSON output (= the array above, serialized) also contains all other\nextensions.\n\n```\nUsage: watskeburt [options] [old-revision] [new-revision]\n\nlists files \u0026 their statuses since [old-revision] or between [old-revision] and [new-revision].\n\n-\u003e When you don't pass a revision old-revision defaults to the current one.\n\nOptions:\n  -T, --outputType \u003ctype\u003e  what format to emit (choices: \"json\", \"regex\", default: \"regex\")\n  --trackedOnly            only take tracked files into account (default: false)\n  -V, --version            output the version number\n  -e, --extensions \u003clist\u003e  comma separated list of file extensions to consider\n                           - pass \"*\" to consider all extensions\n                           - currently applicable only to the \"regex\" reporter\n                           - defaults to to most popular extensions in the\n                             JavaScript/ TypeScript ecosystem\n  -h, --help               display help for command\n```\n\nDefault list of extensions (cli, regex reporter only):\n`\"cjs, cjsx, coffee, csx, cts, js, json, jsx, litcoffee, ls, mjs, mts, svelte, ts, tsx, vue, vuex\"`.\n\n## why?\n\nI needed something robust to support caching in\n[dependency-cruiser](https://github.com/sverweij/dependency-cruiser) and to\nrun standalone to use _in combination_ with dependency-cruiser.\n\nA few specialized packages like this existed, but they had fallen out of\nmaintenance. More generic packages still were maintained, but for my use\ncase they were overkill.\n\n## 🇳🇱 what does 'watskeburt' mean?\n\nWazzup.\n\n_watskeburt_ is a fast pronunciation of the Dutch \"wat is er gebeurd?\"\n(_what has happened?_) or \"wat er is gebeurd\" (_what has happened_).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsverweij%2Fwatskeburt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsverweij%2Fwatskeburt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsverweij%2Fwatskeburt/lists"}