1.2.5 • Published 3 years ago

uptodeps v1.2.5

Weekly downloads
6
License
ISC
Repository
github
Last release
3 years ago

ci/cd NPM version

uptodeps(target, entrypoint) returns true if the target file mtime is newer that all entrypoint's dependencies mtimes (false if at least one dependency is newer).

Usage

const uptodeps = require('uptodeps')

const target = path.resolve(__dirname, './dist/foo.js') // the file we target
const entrypoint = path.resolve(__dirname, './src/foo.js') // the file from which we determine dependencies

if (!uptodeps(target, entrypoint)) {
  console.log('At least one dependency is newer.')
} else {
  console.log('Target file is newer than all dependencies.')
}

You can also exclude some dependencies with filter option :

uptodeps(target, entrypoint, {
  filter: path => !path.includes('node_modules') // exclude node_modules dependencies
})

NB: see dependency-tree filter option for more details

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago