New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ensure-git

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ensure-git

Ensure git status before running something like npm publish.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
58
41.46%
Maintainers
1
Weekly downloads
 
Created
Source

ensure-git

NPM version NPM downloads Build Status donate

Why?

You always need to ensure that git working tree is clean and no conficts in your repo before publishing your package.

Install

yarn add ensure-git

Usage

const ensureGit = require('ensure-git')

ensureGit()
  .then(() => {
    console.log('All good! you can now run npm publish ;)')
  })
  .catch(err => {
    console.error(err.message)
    process.exit(1)
  })

API

ensureGit([options])

options

cwd

Type: string
Default: process.cwd()

The path to check.

anyBranch

Type: boolean
Default: undefined

By default if it's not on master branch the program will throw an error, use this option to disable the behavior.

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

Author

ensure-git © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

FAQs

Package last updated on 04 Jan 2017

Did you know?

Socket

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