Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

catch-uncommitted

resin-io-modules38.1kApache-2.02.0.0

Script to catch uncommitted/unversioned files, for CI

git, ci, uncommitted, unversioned, testing

readme

Catch-Uncommitted

A simple sh script to error if you have uncommitted or unversioned files in your current directory.

This is designed to be used in your CI process, if you have some generated build output committed, to ensure that it's up to date. Run your build, then run this script, and it'll fail if there are any new or changed files that appear.

Checks for new files using git, so this won't complain about changed files that are ignored by git. This depends on git being available in your $PATH.

Get started

Install it:

npm install --save-dev catch-uncommitted

Add it to your CI script in package.json:

"scripts": {
    "ci": "npm run build && catch-uncommitted"
}

Run it:

npm run ci

[... your build here ...]

No unexpected changes, all good.

Extra options

--catch-no-git

When running catch-uncommitted --catch-no-git, the script will exit without an error when git isn't available. This can be useful when you need to run the same tests in different environments, where some of them do not have git available.

--skip-node-versionbot-changes

When running catch-uncommitted --skip-node-versionbot-changes, the script will skip checking the package.json & the CHANGELOG.md for changes, so that it can work as part of the balenaCI pipeline.

--exclude

Custom file exclusions may be set with catch-uncommitted --exclude. This flag can be used in conjunction with other flags. For example, to skip checking a file located at my/file, use catch-uncommitted --exclude=my/file. Multiple files may be set by separating paths with a comma: --exclude=my/file,VERSION.

changelog

Change Log

All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to Semantic Versioning.

v2.0.0

(2021-05-05)

  • Add Yarn 2 support [Dominic Chambers]

v1.6.2

(2020-03-25)

  • Fix and update README [Josh Bowling]

v1.6.1

(2020-03-25)

  • Remove /dev/tty pipe [Josh Bowling]

v1.6.0

(2020-03-20)

  • Add --exclude flag [Josh Bowling]

1.5.0 - 2020-02-07

  • Add --ignore-space-at-eol option to ignore eol differences [Pagan Gazzard]

1.4.0 - 2019-11-26

  • Ignore versionbot folder changelog [Stevche Radevski]

1.3.0 - 2019-03-27

  • Change the tests to work on balenaCI [Thodoris Greasidis]
  • Add npm-shrinkwrap.json in the excluded VB files [Thodoris Greasidis]
  • Add package-lock.json in the excluded VB files [Thodoris Greasidis]
  • Fix escaping in VB excluded files argument [Thodoris Greasidis]

1.2.0 - 2019-03-22

  • Add --skip-node-versionbot-changes option [Thodoris Greasidis]

1.1.0 - 2019-03-22

  • Add --catch-no-git option [Thodoris Greasidis]
  • Prepare for VersionBot integration [Thodoris Greasidis]

v1.0.0 - 2017-09-14

  • Initial release