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

git-describe

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-describe - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

lib/git-describe.js

@@ -16,3 +16,3 @@ var _ = require('lodash');

requireAnnotated: false,
match: 'v*',
match: 'v[0-9]*',
customArguments: []

@@ -31,3 +31,3 @@ });

arguments.push('--tags');
if (_.isString(options.filter))
if (_.isString(options.match))
arguments = arguments.concat(['--match', options.match]);

@@ -34,0 +34,0 @@ if (_.isArray(options.customArguments))

{
"name": "git-describe",
"version": "1.1.0",
"version": "1.1.1",
"description": "Git describe information at runtime, with semver support",

@@ -5,0 +5,0 @@ "keywords": ["git", "semver"],

@@ -32,4 +32,4 @@ # git-describe

// Target the directory containing the calling script
// This is more reliable than the working directory
// Target the directory of the calling script
// Do this when you want to target the repo your app resides in
var gitInfo = gitDescribe(__dirname);

@@ -42,2 +42,7 @@

});
// Another example: working directory, use 16 character commit hash abbreviation
var gitInfo = gitDescribe({
customArguments: ['--abbrev=16']
});
```

@@ -59,11 +64,11 @@

Option | Default | Description
------------------ | ------- | -----------
`dirtySemver` | `true` | Appends `'.dirty'` to `semverString` if repo state is dirty (similar to `--dirty`)
`longSemver` | `false` | Always add commit distance and hash to `semverString` (similar to `--long`)
`requireAnnotated` | `false` | Uses `--tags` if false, so that simple git tags are allowed
`match` | `'v*'` | Uses `--match` to filter tag names
`customArguments` | `[]` | Array of additional arguments to pass to `git describe`
Option | Default | Description
------------------ | ----------- | -----------
`dirtySemver` | `true` | Appends `'.dirty'` to `semverString` if repo state is dirty (similar to `--dirty`).
`longSemver` | `false` | Always add commit distance and hash to `semverString` (similar to `--long`).
`requireAnnotated` | `false` | Uses `--tags` if false, so that simple git tags are allowed.
`match` | `'v[0-9]*'` | Uses `--match` to filter tag names. By default only tags starting with `v` are considered
`customArguments` | `[]` | Array of additional arguments to pass to `git describe`. Not all arguments are useful and some may even break the library, but things like `--abbrev` and `--candidates` should be safe to add.
[1]: https://git-scm.com/docs/git-describe
[2]: http://semver.org/
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