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

@getyourguide/npm-publish

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getyourguide/npm-publish

Module to publish npm modules

  • 1.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NpmPublish

Module to handle publishing new modules detecting the version type from the commit message and pushing to github.

Features

  • Allow to define increment (patch, minor, major) based on commit message.
  • Allow to create beta versions from commits.
  • Increate automatically version in package.json and push to your github repo.

Getting Started

npm install --save @getyourguide/npm-publish

Usage with drone

  1. Create a npm script in your package.json
{
  "scripts": {
    "publish": "npm-publish"
  }
}
  1. Add a step in drone to publish your module
publish-package:
  image: node:12-buster
  commands:
    - npm run publish -- -b "${DRONE_BRANCH}" -m '${DRONE_COMMIT_MESSAGE/"/}'

Params

Run with --help to get a full list of params

npm run publish -- --help

Options:
  --version              Show version number                           [boolean]
  --help                 Show help                                     [boolean]
  --branch, -b           branch name                                   [required]
  --message, -m          commit message                                [required]
  --publish-branches     branches in which it should publish [default: "master"]
  --wildcard-minor       wildcard to identify a minor commit [default: "[minor]"]
  --wildcard-major       wildcard to identify a major commit [default: "[major]"]
  --wildcard-beta        wildcard to identify a beta commit  [default: "[beta]"]
  --wildcard-no-publish  wildcard to identify a skip publish [default: "[nopublish]"]

Add config in package.json

Create a section in your package.json and overide the default values

{
  "npm-publish": {
    "publish-branches": ["master"],
    "wildcard-minor": "[minor]",
    "wildcard-major": "[major]",
    "wildcard-beta": "[beta]",
    "wildcard-no-publish": "[nopublish]",
  }
}

Keywords

FAQs

Package last updated on 11 Aug 2020

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

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