Socket
Socket
Sign inDemoInstall

git-tags-remote

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    git-tags-remote

Get remote repository tags.


Version published
Weekly downloads
9.6K
increased by24.83%
Maintainers
1
Install size
67.5 kB
Created
Weekly downloads
 

Changelog

Source

1.0.2 (2020-01-12)

Bug Fixes

  • return actual error on stderr (0f35a55)

Readme

Source

git-tags-remote Build Status dependencies Status

Get remote repository tags and parse them.

Inspired by remote-git-tags and node-git-tags. The only reason this exists is to allow access to any type of remote repository, including repositories accessed through SSH, or private repositories. If git ls-remote --tags works for you, so will this.

Install

$ npm install --save git-tags-remote

Note that a git binary and command line interface is a prerequisite.

Usage

const gitTagsRemote = require('git-tags-remote');

gitTagsRemote.get('git@github.com:sh0ji/focus-rover.git')
    .then(tags => console.log(tags));
// => Map {'v1.0.0-rc.2' => '8e048a0fd9cb668366eef550be445ac761efd667', ...}

API

  • .get(gitUrl)
    Returns a Promise<Map> with the Git tags as keys and their commit SHA as values, just like remote-git-tags.

    • gitUrl must be a valid git url.
      e.g. 'https://github.com/sh0ji/git-tags-remote.git' is valid but 'github.com/sh0ji/git-tags-remote' is not.
  • .latest(gitUrl)
    Returns an Array with the latest git tag and commit SHA value.
    e.g. ['v1.0.0-rc.2', '8e048a0fd9cb668366eef550be445ac761efd667']

Keywords

FAQs

Last updated on 09 Jul 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc