{"_id":"git-log-parser","_rev":"8-bab4efaa4fbec72817b5da3147b3361e","name":"git-log-parser","description":"git-log-parser","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"git-log-parser","version":"1.0.0","author":"","license":"MIT","_id":"git-log-parser@1.0.0","maintainers":[{"name":"bendrucker","email":"bvdrucker@gmail.com"}],"homepage":"https://github.com/bendrucker/git-log-parser","bugs":{"url":"https://github.com/bendrucker/git-log-parser/issues"},"dist":{"shasum":"10f6e0461a1ddf74893cebcd08900e3324fa9bb0","tarball":"https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.0.0.tgz","integrity":"sha512-X6/fexzdLzxkqbpjb1VcIohj/X3hGwZPA5XYkl0PQRFXJdlLkE54QA05bBZryCtlFCVT4EDYXATsFpX8lutfoQ==","signatures":[{"sig":"MEYCIQCtfX2DoNkkTy8EKjHPt1uZGyAHaHbhU+rwkcM+fjQCegIhAMB9bqYptnXPVlN4eusx4EcJ48HaZxTwjuZ8+TKLnXri","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./src","_from":".","_shasum":"10f6e0461a1ddf74893cebcd08900e3324fa9bb0","gitHead":"d133cba9bd45e72144d60a65940e8310c66e4aa2","scripts":{"test":"mocha"},"_npmUser":{"name":"bendrucker","email":"bvdrucker@gmail.com"},"repository":{"url":"https://github.com/bendrucker/git-log-parser.git","type":"git"},"_npmVersion":"1.4.28","description":"git-log-parser","directories":{},"dependencies":{"split":"~0.3.1","through2":"~0.6.3","traverse":"~0.6.6","argv-formatter":"~1.0.0","stream-combiner":"~0.2.1","spawn-error-forwarder":"~1.0.0"},"devDependencies":{"chai":"~1.10.0","mocha":"~2.0.1"}},"1.1.0":{"name":"git-log-parser","version":"1.1.0","author":"","license":"MIT","_id":"git-log-parser@1.1.0","maintainers":[{"name":"bendrucker","email":"bvdrucker@gmail.com"}],"homepage":"https://github.com/bendrucker/git-log-parser","bugs":{"url":"https://github.com/bendrucker/git-log-parser/issues"},"dist":{"shasum":"1e2d70e0caafce35f858f9aec0609261f9088fce","tarball":"https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.1.0.tgz","integrity":"sha512-vNKpuM+S4ulIkEO9wo1M6FcJ3zP8Yn5ZFuKXPjvErWwZmGbcxSg++Q70xFaKD3yvqyYS9VsyDL5RYkaLFuoLpA==","signatures":[{"sig":"MEQCIF5hncqhhB8F2IN/CaXYIW1ne61duvAdvXQZiwfCj/GRAiAuNDYeW5+mQnUhvdQZ+CEyjl/Hk21q63gReMYUVZk3Dw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./src","_from":".","_shasum":"1e2d70e0caafce35f858f9aec0609261f9088fce","gitHead":"b1248af97279a5c14d7bce3e6883cfc6e8e78c6c","scripts":{"test":"mocha"},"_npmUser":{"name":"bendrucker","email":"bvdrucker@gmail.com"},"repository":{"url":"git+https://github.com/bendrucker/git-log-parser.git","type":"git"},"_npmVersion":"2.11.3","description":"git-log-parser","directories":{},"_nodeVersion":"2.3.3","dependencies":{"split":"~0.3.1","through2":"~0.6.3","traverse":"~0.6.6","argv-formatter":"~1.0.0","stream-combiner":"~0.2.1","spawn-error-forwarder":"~1.0.0"},"devDependencies":{"chai":"~1.10.0","mocha":"~2.0.1"}},"1.2.0":{"name":"git-log-parser","version":"1.2.0","author":"","license":"MIT","_id":"git-log-parser@1.2.0","maintainers":[{"name":"bendrucker","email":"bvdrucker@gmail.com"}],"homepage":"https://github.com/bendrucker/git-log-parser","bugs":{"url":"https://github.com/bendrucker/git-log-parser/issues"},"dist":{"shasum":"2e6a4c1b13fc00028207ba795a7ac31667b9fd4a","tarball":"https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.0.tgz","integrity":"sha512-rnCVNfkTL8tdNryFuaY0fYiBWEBcgF748O6ZI61rslBvr2o7U65c2/6npCRqH40vuAhtgtDiqLTJjBVdrejCzA==","signatures":[{"sig":"MEUCIBLtu/5VYBzvqhItIeiMDLIbDZ5SQer1MCCrDQpj1lgtAiEA93QlAWkmM3kiiN/boWgE9aiHft9vXoZ9ihWTAx0nINw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./src","_from":".","_shasum":"2e6a4c1b13fc00028207ba795a7ac31667b9fd4a","gitHead":"658efedb70a23bd1e351a62f90f0a1fa5269260a","scripts":{"test":"mocha"},"_npmUser":{"name":"bendrucker","email":"bvdrucker@gmail.com"},"repository":{"url":"git+https://github.com/bendrucker/git-log-parser.git","type":"git"},"_npmVersion":"3.3.6","description":"git-log-parser","directories":{},"_nodeVersion":"5.0.0","dependencies":{"split2":"~1.0.0","through2":"~2.0.0","traverse":"~0.6.6","argv-formatter":"~1.0.0","stream-combiner2":"~1.1.1","spawn-error-forwarder":"~1.0.0"},"devDependencies":{"chai":"~1.10.0","mocha":"~2.0.1"}},"1.2.1":{"name":"git-log-parser","version":"1.2.1","description":"git-log-parser","main":"./src","dependencies":{"argv-formatter":"~1.0.0","spawn-error-forwarder":"~1.0.0","split2":"~1.0.0","stream-combiner2":"~1.1.1","through2":"~2.0.0","traverse":"0.6.8"},"devDependencies":{"chai":"~1.10.0","mocha":"~2.0.1"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/bendrucker/git-log-parser.git"},"author":"","license":"MIT","bugs":{"url":"https://github.com/bendrucker/git-log-parser/issues"},"homepage":"https://github.com/bendrucker/git-log-parser","_id":"git-log-parser@1.2.1","gitHead":"328c352802ca76765529ea18a63573b41a3f007a","_nodeVersion":"20.12.0","_npmVersion":"10.5.0","dist":{"integrity":"sha512-PI+sPDvHXNPl5WNOErAK05s3j0lgwUzMN6o8cyQrDaKfT3qd7TmNJKeXX+SknI5I0QhG5fVPAEwSY4tRGDtYoQ==","shasum":"44355787b37af7560dcc4ddc01cb53b5d139cc28","tarball":"https://registry.npmjs.org/git-log-parser/-/git-log-parser-1.2.1.tgz","fileCount":5,"unpackedSize":6836,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF25ZKr5QXPkKFR+A6CDZ26JlZdZS0FGjBX1P25+2POYAiAuqRs0ipBldjHoOGuvjMrNd0PWGvLBqpmI9h1BRgTRiA=="}]},"_npmUser":{"name":"bendrucker","email":"bvdrucker@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-log-parser_1.2.1_1719846803208_0.21310592763428726"},"_hasShrinkwrap":false}},"time":{"created":"2014-11-23T20:58:35.030Z","modified":"2024-07-01T15:13:23.543Z","1.0.0":"2014-11-23T20:58:35.030Z","1.1.0":"2015-07-08T13:30:56.256Z","1.2.0":"2015-11-05T15:53:00.609Z","1.2.1":"2024-07-01T15:13:23.372Z"},"maintainers":[{"name":"bendrucker","email":"bvdrucker@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/bendrucker/git-log-parser.git"},"license":"MIT","homepage":"https://github.com/bendrucker/git-log-parser","bugs":{"url":"https://github.com/bendrucker/git-log-parser/issues"},"readme":"git-log-parser [![Build Status](https://travis-ci.org/bendrucker/git-log-parser.svg?branch=master)](https://travis-ci.org/bendrucker/git-log-parser)\n==============\n\nRun `git log` and return a stream of commit objects.\n\n## Setup\n\n```bash\n$ npm install git-log-parser\n```\n\n## API\n\n#### `log.parse(config, options)` -> `Stream(commits)`\n\nAccepts a `config` object mapping to the [options accepted by `git log`](http://git-scm.com/docs/git-log). `config` will be automatically converted to command line options and flags by [argv-formatter](https://github.com/bendrucker/argv-formatter). Returns a stream of commit objects. \n\n`options` is passed directly to [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options).\n\nA commit is structured as follows:\n\n```js\n{\n  commit: {\n    'long': '4bba6092ecb2571301ca0daa2c55336ea2c74ea2',\n    'short': '4bba609'\n  },\n  tree: {\n    'long': 'b4ef3379e639f8c0034831deae8f6ce63dd41566',\n    'short': 'b4ef337'\n  },\n  author: {\n    'name': 'Ben Drucker',\n    'email': 'bvdrucker@gmail.com',\n    'date': new Date('2014-11-20T14:39:01.000Z')\n  },\n  committer: {\n    'name': 'Ben Drucker',\n    'email': 'bvdrucker@gmail.com',\n    'date': new Date('2014-11-20T14:39:01.000Z')\n  },\n  subject: 'Initial commit',\n  body: 'The commit body'\n}\n```\n\n`author.date` and `commiter.date` are `Date` objects while all other values are strings.\n\nIf you just want an array of commits, use [stream-to-array](https://www.npmjs.com/package/stream-to-array) to wrap the returned stream.\n\n#### `log.fields` -> `Object`\n\nCommit objects contain the most frequently used commit information. However, the [field mappings](https://github.com/bendrucker/git-log-parser/blob/master/src/fields.js) used to format and then parse log output can be amended before calling the parser. Consult the [full range of formatting placeholders](http://opensource.apple.com/source/Git/Git-19/src/git-htmldocs/pretty-formats.txt) and add the placeholder to the object tree if you wish to add extra fields.\n\n## Example\n\nGet all commits from earlier than an hour ago and stream them to `stdout` as pretty-printed JSON\n\n```js\nvar log      = require('git-log-parser');\nvar through2 = require('through2');\n\nlog.parse({\n  before: new Date(Date.now() - 60 * 60 * 1000)\n})\n.pipe(through2.obj(function (chunk, enc, callback) {\n  callback(null, JSON.stringify(chunk, undefined, 2));\n}))\n.pipe(process.stdout);\n```\n\nNote that `before` is stringified and passed directly as an argument to `git log`. No special handling is required for any standard `git log` option. You can filter by committer, time, or any other field supported by [`git log`](http://git-scm.com/docs/git-log).\n","readmeFilename":"README.md","users":{"flumpus-dev":true}}