Natural Performance Manager
    Wondering what’s next for npm?Check out our public roadmap! »

    @semabit/release-it-bumper

    2.0.0 • Public • Published

    Version read/write plugin for release-it

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

    # npm
    npm install --save-dev @semabit/release-it-bumper
    
    # yarn
    yarn add --dev @semabit/release-it-bumper
    

    In release-it config:

    "plugins": {
      "@semabit/release-it-bumper": {
        "out": "manifest.json"
      }
    }

    for .yaml file:

    "plugins": {
      "@semabit/release-it-bumper": {
        "out": { "file": "version.yaml", "type": "application/x-yaml" }
      }
    }

    In case the in option is used, the version from this file will take precedence over the version from package.json or the latest Git tag (which release-it uses by default).

    The default type is application/json, but text/plain and application/x-yaml are also supported. In that case the whole file is used to read and/or write the version.

    "plugins": {
      "@semabit/release-it-bumper": {
        "in": { "file": "VERSION", "type": "text/plain" },
        "out": { "file": "VERSION", "type": "text/plain" }
      }
    }
    "plugins": {
      "@semabit/release-it-bumper": {
        "in": { "file": "version.yaml", "type": "application/x-yaml" },
        "out": { "file": "version.yaml", "type": "application/x-yaml" }
      }
    }

    The out option can also be an array of files:

    "plugins": {
      "@semabit/release-it-bumper": {
        "out": ["manifest.json", "bower.json", { "file": "version.yaml", "type": "application/x-yaml" }]
      }
    }

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

    "plugins": {
      "@semabit/release-it-bumper": {
        "out": [
          { "file": "manifest.json", "path": "deeper.current" },
          { "file": "version.yaml", "type": "application/x-yaml", "path": "parameters['app.version']" }
        ]
      }
    }

    Install

    npm i @semabit/release-it-bumper

    DownloadsWeekly Downloads

    35

    Version

    2.0.0

    License

    UNLICENSED

    Unpacked Size

    19.5 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar