Giter Site home page Giter Site logo

privatenumber / prerelease-checks Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 0.0 1.25 MB

Run essential pre-release checks before releasing an npm package

License: MIT License

JavaScript 0.40% TypeScript 99.60%
npm prerelease publish checks verify validate github pre-release cli standard-version

prerelease-checks's Introduction

prerelease-checks

Run essential pre-release checks before releasing an npm package.

๐Ÿ’ž Works well with standard-version!

If you like this project, please star it & follow me to see what other cool projects I'm working on! โค๏ธ

๐Ÿ™‹โ€โ™‚๏ธ Why?

Because there are many points of failure when making a release.

This CLI runs a thorough check to guarantee a successful package release:

โœ… npm

  • Assert npm version
  • Validate package.json
    • Check valid npm name
    • Check valid semver version
    • Verify public package
  • Verify npm registry is reachable (in case custom)
  • Verify npm publish registry is reachable
  • Verify user is authenticated to publish registry and has permissions

โœ… Git

  • Assert Git version
  • Verify working directory is clean
  • Verify current branch is release branch
  • Verify remote head exists
  • Verify current branch is identical to upstream

๐Ÿš€ Install

npm i -D prerelease-checks

npx

You can also install-and-run as you need it via npx:

npx prerelease-checks

๐Ÿšฆ Quick Setup

As a prepublish hook

Add prerelease-checks as a prepublishOnly hook in your package.json:

 {
   "scripts": {
+    "prepublishOnly": "prerelease-checks"
   }
 }

With standard-version

If you're using standard-version, add it to their prerelease hook.

 {
   "scripts": {
+    "prerelease": "prerelease-checks",
     "release": "standard-version"
   }
 }

Other

You can prepend your release script with prerelease-checks.

 {
   "scripts": {
+    "release": "prerelease-checks && my-custom-release-command",
   }
 }

๐Ÿ™ Credits

Many inspirations taken from the prerequisite checks from np.

prerelease-checks's People

Contributors

privatenumber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.