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

crank

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crank

tool to update version number and changelog, for npm module development

  • 0.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

CRANK

a tool to update version number and changelog, for npm module development

usage

crank version {part}

increments version in package.json {part} is major, minor, or patch. defaults to patch

crank changelog {file}

updates changelog. {file} defaults to Changelog.md

intentions

node modules
Used to manage node modules. (Assumes package.json, etc.)
move into the future
Interface designed primarily to increment/update package metadata.
for build systems
Intended to use in a build system (gmake, ant, phing, etc). Expects to be intermixed with other commands. (This lets it focus on what it does well -- and not try to do everything.)
semantic versioning
By default, makes it easy to manage packages that use semantic versioning.
read-only
Doesn't commit to the SCM. (See "not try to do everything" above.)
config file (optional)
Options given mainly by config file (instead of commandline arguments). This makes it easier to create re-usable "recipes". (For example, using a config file means that it can be commited to the SCM.)

assumptions

single change ID
Change ID ("revision", "commit", etc) of target diretory applies homogeneously to all files/subdirectories in the target.
clean target
No modified files in the target directory.
CWD in module root
Generally expected to be run in same directory as package.json.

config

  • not really needed for simple use cases

  • defaults to crank.json in the current working directory

  • can be specified with a commandline argument

  • target: directory to track

    • defaults to current working directory
  • changelog:

    • file: path on disk
      • relative path is relative to the target
    • template: template type, or path on disk
      • defaults to file extension
      • simple string taken as one of the built-in template types to use
        • builtin types are md (markdown) and txt (plain text)
      • otherwise, template to use
    • changes:
      • dateformat: string
        • format to use for change dates
      • filters: list of objects describing how to modify changes
        • subject: string message, author, date, or changeid
        • regexp: string
        • replace: string
          • if results in --CRANK:SKIP-- then change is skipped
    • releases:
      • dateformat: string
        • format to use for revision dates
      • filters: list of objects describing how to modify releases
        • subject: string version, date, or changeid
        • regexp: string
        • replace: string
          • if results in --CRANK:SKIP-- then release is skipped
      • skipEmpty: boolean
        • if true and release has no changes (after filtering), then the release is skipped

template

  • good old mustache

  • {{version}} string

  • {{date}} string, date that crank was run

  • {{changeid}} string

  • {{changes}} list of objects

    • {{changeid}} string
    • {{date}} string
    • {{author}} string
    • {{message}} string

license

MIT License

Copyright (c) 2012, Yahoo! Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 13 May 2012

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