jest-changed-files
A module used internally by Jest to check which files have changed since you last committed in git or hg.
Last updated 5 years ago by simenb .
MIT · Repository · Bugs · Original npm
$ cnpm install jest-changed-files 
SYNC missed versions from official npm registry.

jest-changed-files

A module used internally by Jest to check which files have changed since you last committed in git or hg.

Install

$ npm install --save jest-changed-files

API

getChangedFilesForRoots(roots: <Array<string>>, options: ?object): Promise<?object>

Get the list of files and repos that have changed since the last commit.

Parameters

roots: Array of string paths gathered from jest roots.

options: Object literal with keys

  • lastCommit: boolean
  • withAncestor: boolean

findRepos(roots: <Array<string>>): Promise<?object>

Get a set of git and hg repositories.

Parameters

roots: Array of string paths gathered from jest roots.

Usage

import {getChangedFilesForRoots} from 'jest-changed-files';

getChangedFilesForRoots(['/path/to/test'], {
  lastCommit: true,
  withAncestor: true,
}).then(files => {
  /*
  {
    repos: [],
    changedFiles: []
  }
  */
});
import {findRepos} from 'jest-changed-files';

findRepos(['/path/to/test']).then(repos => {
  /*
  {
    git: Set<Path>,
    hg: Set<Path>
  }
  */
});

Current Tags

  • 29.2.0                                ...           latest (3 years ago)
  • 29.0.0-alpha.3                                ...           next (3 years ago)

25 Versions

  • 29.0.0-alpha.3                                ...           3 years ago
  • 29.2.0                                ...           3 years ago
  • 28.1.3                                ...           3 years ago
  • 28.0.2                                ...           3 years ago
  • 28.0.0-alpha.3                                ...           4 years ago
  • 27.5.1                                ...           4 years ago
  • 27.4.2                                ...           4 years ago
  • 27.1.1                                ...           4 years ago
  • 27.1.0                                ...           4 years ago
  • 27.0.0-next.10                                ...           4 years ago
  • 27.0.6                                ...           4 years ago
  • 26.6.2                                ...           5 years ago
  • 25.5.0                                ...           5 years ago
  • 21.3.0-beta.15                                ...           8 years ago
  • 26.0.1-alpha.0                                ...           5 years ago
  • 25.2.1-alpha.2                                ...           5 years ago
  • 24.2.0-alpha.0                                ...           6 years ago
  • 26.3.0                                ...           5 years ago
  • 22.4.3                                ...           7 years ago
  • 23.4.2                                ...           7 years ago
  • 21.2.0                                ...           8 years ago
  • 19.0.2                                ...           9 years ago
  • 17.0.2                                ...           9 years ago
  • 20.0.3                                ...           8 years ago
  • 24.9.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org