@coralproject/package-version-lint
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

package-version-lint

This is a simple linter that compares your version in your package.json and package-lock.json file (if it exists) to ensure that they are up to date. It also comes with a --expect flag that can be used to verify a specific version.

Usage

To run standalone and verify that the package versions are in sync, use:

npx @coralproject/package-version-lint

Or to verify a specific version:

npx @coralproject/package-version-lint --expect 1.0.2

If using in CI (this example uses CircleCI), you can use a combination of the --expect flag and shell parameter expansion to do the following:

CIRCLE_TAG=v1.0.2
npx @coralproject/package-version-lint --expect ${CIRCLE_TAG/#v}

The ${CIRCLE_TAG/#v} will take the variable, CIRCLE_TAG and strip the leading v from it, leaving us with 1.0.2 which can be used with the --expect flag. This can be used with any other CI that provides the tag in the environment.

/@coralproject/package-version-lint/

    Package Sidebar

    Install

    npm i @coralproject/package-version-lint

    Weekly Downloads

    11

    Version

    2.0.0

    License

    Apache-2.0

    Unpacked Size

    4.28 kB

    Total Files

    6

    Last publish

    Collaborators

    • kabeaty
    • wyattjoh
    • wikiwi
    • immber
    • tessat
    • nick.funk