Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-raw-commits

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-raw-commits - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

12

index.js

@@ -36,4 +36,5 @@ 'use strict';

var throughStream = es.through();
getLatestTag(function(err, latestTag) {
if (err || latestTag === undefined) {

@@ -70,9 +71,12 @@ if (done === true) {

if (done === true) {
return stream.pipe(process.stdout);
stream.pipe(process.stdout);
}
return stream
.pipe(es.writeArray(done));
else {
stream.pipe(throughStream).pipe(es.writeArray(done));
}
});
return throughStream;
}
module.exports = gitRawCommits;
{
"name": "git-raw-commits",
"version": "0.0.0",
"version": "0.0.1",
"description": "Get raw git commits out of your repository using git-log(1)",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/stevemao/git-latest-tag",

@@ -18,13 +18,28 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image]

### Use a callback
```js
var gitRawCommits = require('git-raw-commits');
gitRawCommits([options], callback);
gitRawCommits(options, callback);
```
### Use as a through stream
```js
var gitRawCommits = require('git-raw-commits');
gitRawCommits(options)
.pipe(...);
```
## API
### options
### gitRawCommits([options], [callback])
Returns a through stream.
#### options
Type: `object`

@@ -34,17 +49,25 @@

*NOTE*: for <revision range> we use also use <from>..<to> pattern, where:
*NOTE*: for `<revision range>` we can also use `<from>..<to>` pattern, where:
#### from
Type: `string` defaults to your latest tag
Type: `string` Default: your latest tag
If you have no tag it will ignore `to` and get the whole commits
If you have no tag it will ignore `to` and get the whole commits.
#### to
Type: `string` defaults to 'HEAD'
Type: `string` Default: `'HEAD'`
Only used if `from` is truthy
Only used if `from` is truthy.
#### callback(err, commits)
##### commits
Type: `array`
An array of raw commits.
## CLI

@@ -56,3 +79,3 @@

```
```sh
$ git-raw-commits --help

@@ -59,0 +82,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc