{"id":15965561,"url":"https://github.com/jamiemason/giterator","last_synced_at":"2025-05-07T05:48:46.583Z","repository":{"id":72286739,"uuid":"604744165","full_name":"JamieMason/giterator","owner":"JamieMason","description":"`git log` as a JavaScript generator","archived":false,"fork":false,"pushed_at":"2023-02-21T21:12:56.000Z","size":69,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T16:19:17.088Z","etag":null,"topics":["generator","git","git-log","iterator"],"latest_commit_sha":null,"homepage":"","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/JamieMason.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"JamieMason"}},"created_at":"2023-02-21T17:43:33.000Z","updated_at":"2023-05-05T11:23:18.000Z","dependencies_parsed_at":"2023-03-01T00:46:47.184Z","dependency_job_id":null,"html_url":"https://github.com/JamieMason/giterator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Fgiterator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Fgiterator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Fgiterator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Fgiterator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamieMason","download_url":"https://codeload.github.com/JamieMason/giterator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823690,"owners_count":21809709,"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","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":["generator","git","git-log","iterator"],"created_at":"2024-10-07T17:42:15.535Z","updated_at":"2025-05-07T05:48:46.564Z","avatar_url":"https://github.com/JamieMason.png","language":"TypeScript","readme":"# giterator\n\n\u003e `git log` as a JavaScript generator\n\n## Installation\n\n```\nnpm install --save giterator\n```\n\n## Usage\n\n```js\nimport { giterator } from 'giterator';\n\nfor await (const commit of giterator('/Users/foldleft/Dev/syncpack', {\n  pageSize: 20,\n  skipMerges: true,\n  tokenNames: ['authorName', 'subject', 'refNames'],\n})) {\n  console.log(commit);\n}\n```\n\nOur example would produce;\n\n```\n{\n  authorName: 'Jamie Mason',\n  subject: 'chore(license): update year',\n  refNames: 'HEAD -\u003e master, origin/master, origin/HEAD'\n}\n{\n  authorName: 'Jamie Mason',\n  subject: 'chore(release): 9.8.4',\n  refNames: 'tag: 9.8.4'\n}\n{\n  authorName: 'Jamie Mason',\n  subject: 'docs(site): mark up required/optional config',\n  refNames: 'origin/dev, dev'\n}\n{\n  authorName: 'Jamie Mason',\n  subject: 'feat(semver): support resolving with lowest version',\n  refNames: ''\n}\n// ...etc\n```\n\n## Options\n\n### `directory` string\n\nAbsolute path to your locally cloned git repository.\n\n### `options.tokenNames` string[]\n\nOptional array of strings representing the data required from each git commit\n(defaults to all).\n\n- authorDate\n- authorDateRelative\n- authorEmail\n- authorName\n- body\n- commitHash\n- commitNotes\n- committerDate\n- committerDateRelative\n- committerEmail\n- committerName\n- parentHashes\n- reflogIdentityEmail\n- reflogIdentityName\n- reflogSelector\n- reflogSubject\n- refNames\n- sanitizedSubjectLine\n- subject\n- treeHash\n\nFor more information see the\n[Git Pretty Formats Documentation](https://git-scm.com/docs/pretty-formats).\n\n### `options.skipMerges` boolean\n\nWhether to exclude merge commits from being returned (defaults to true).\n\n## Badges\n\n- [![NPM version](http://img.shields.io/npm/v/giterator.svg?style=flat-square)](https://www.npmjs.com/package/giterator)\n- [![NPM downloads](http://img.shields.io/npm/dm/giterator.svg?style=flat-square)](https://www.npmjs.com/package/giterator)\n","funding_links":["https://github.com/sponsors/JamieMason"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemason%2Fgiterator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiemason%2Fgiterator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemason%2Fgiterator/lists"}