Socket
Book a DemoInstallSign in
Socket

@stepsec/bumper

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

@stepsec/bumper

Version read/write plugin for StepSec

5.0.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Version read/write plugin for StepSec

This plugin reads and/or writes version/manifest files.

npm install --save-dev @StepSec/bumper

In release config:

"plugins": {
  "@StepSec/bumper": {
    "in": "composer.json",
    "out": "composer.json",
  }
}
  • Use only the in option to read the version from this file in the release process.
  • Use only the out option to write the version that was determined by release to this file.
  • Use both to read and write the version property from/to this file.

The version from the in file will take precedence over the latest Git tag (and the version from package.json if it exists) in release to determine the latest version.

Note that using package.json as out file may conflict with the npm plugin in release. Remove it from the out file(s), or use --npm.allowSameVersion.

The supported file types are:

TypeExtension(s)Mime-type
JSON.jsonapplication/json
YAML.yaml or .ymltext/yaml or application-x-yaml
TOML.tomltext/toml or application/toml
INI.initext/x-properties
TEXT.txttext/*

Explicitly providing the (mime) type takes precedence over the file extension.

The fallback type is text if the file extension and/or type is not known (e.g. index.php).

"plugins": {
  "@StepSec/bumper": {
    "in": {
      "file": "VERSION",
      "type": "text/plain"
    },
    "out": {
      "file": "VERSION",
      "type": "text/plain"
    }
  }
}

To replace all occurences of the current version with the new version in any text file:

"plugins": {
  "@StepSec/bumper": {
    "out": {
      "file": "file.php",
      "type": "text/php"
    }
  }
}

The out option can also be an array of files:

"plugins": {
  "@StepSec/bumper": {
    "out": ["manifest.json", "bower.json"]
  }
}

The out option is parsed with fast-glob, so glob patterns can be used to match files to write to:

"plugins": {
  "@StepSec/bumper": {
    "out": "dist/*.json"
  }
}

The path option (default: "version") can be used to change a different property. The following example will set the current.version property to the new version in manifest.json:

"plugins": {
  "@StepSec/bumper": {
    "out": {
      "file": "manifest.json",
      "path": "current.version"
    }
  }
}

Multiple paths can be provided using an array.

Command-line

Options for this plugin can be set from the command line. Some examples:

StepSec --plugins.@StepSec/bumper.in=composer.json
StepSec --plugins.@StepSec/bumper.out=composer.json --plugins.@StepSec/bumper.out=manifest.json
  • Keys are separated by dots.
  • Values can be negated by prefixing the key with no-.
  • Arguments may need to be single-quoted (') such as --'deep.key=value' or '--deep.key=value'

Depending on your shell or OS this may differ.

Keywords

release

FAQs

Package last updated on 10 Jul 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.