0.1.1-alpha.2 • Published 3 years ago

@wmde/lib-version-check v0.1.1-alpha.2

Weekly downloads
90
License
BSD-3-Clause
Repository
github
Last release
3 years ago

Lib Version Check

A small utility to check remote library versions against a local dependency entry.

Usage

  • Install

    npm i lib-version-check
  • Add remote library urls to your package.json

    {
        // ...
        "config": {
            "remoteVersion": {
                // <package-name>: <remote>
                "vue": "https://raw.githubusercontent.com/wikimedia/mediawiki/master/resources/lib/vue/vue.common.prod.js",
            }
        }
    }
  • Run in a directory that contains your package.json

    lib-version-check
  • Add a script to your package.json, to run anywhere within your project

    {
        // ...
        "scripts": {
            "check-versions": "lib-version-check"
        }
    }

Environment Variables

  • Interpolate environment variables to a specified remote url

    {
        // ...
        "config": {
            "remoteVersion": {
                // <package-name>: <remote>
                "vue": "https://raw.githubusercontent.com/wikimedia/mediawiki/#{SOME_BRANCH}/resources/lib/vue/vue.common.prod.js",
            }
        }
    }
  • Define the environment variable and run the check

```bash
SOME_BRANCH=main lib-version-check
```