@pnpm/colorize-semver-diff
Makes a colorful semver diff
Last updated 5 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @pnpm/colorize-semver-diff 
SYNC missed versions from official npm registry.

@pnpm/colorize-semver-diff

Makes a colorful semver diff

npm version Build Status

Installation

<pnpm|yarn|npm> add @pnpm/colorize-semver-diff

Usage

import colorizeSemverDiff from '@pnpm/colorize-semver-diff'

console.log(colorizeSemverDiff({
  change: 'feature',
  diff: [['2'], ['1', '0', 'rc', '1']]
}))

API

colorizeSemverDiff(semverDiff)

Returns a string with ANSI colors.

semverDiff.change

type: unknown, breaking, feature, fix

semverDiff.diff[0]

type: string[]

An array of version parts that are unchanged. For instance, in a diff between 1.0.0 and 1.2.0 the unchanged part will be ['1'].

semverDiff.diff[1]

type: string[]

An array of version parts that are changed. For instance, in a diff between 1.0.0 and 1.2.0 the changed part will be ['2', '0'].

Related

License

MIT © Zoltan Kochan

Current Tags

  • 1.0.1                                ...           latest (5 years ago)
  • 1.0.1                                ...           next (5 years ago)

2 Versions

  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (9)

Copyright 2013 - present © cnpmjs.org | Home |