How to use lockfile-lint-api - 6 common examples

To help you get started, we’ve selected a few lockfile-lint-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateSchemeManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-scheme-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateScheme({packages: lockfile.object})

  return validator.validate(validatorValues)
}
github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateHttpsManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-host-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateHttps({packages: lockfile.object})

  return validator.validate()
}
github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateHostManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-host-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateHost({packages: lockfile.object})

  return validator.validate(validatorValues, validatorOptions)
}
github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateHostManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-host-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateHost({packages: lockfile.object})

  return validator.validate(validatorValues, validatorOptions)
}
github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateHttpsManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-host-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateHttps({packages: lockfile.object})

  return validator.validate()
}
github lirantal / lockfile-lint / packages / lockfile-lint / src / validators / index.js View on Github external
function ValidateSchemeManager ({path, type, validatorValues, validatorOptions}) {
  debug('validate-scheme-manager')(
    `invoked with validator options: ${JSON.stringify(validatorValues)}`
  )

  const options = {
    lockfilePath: path,
    lockfileType: type
  }

  const parser = new ParseLockfile(options)
  const lockfile = parser.parseSync()
  const validator = new ValidateScheme({packages: lockfile.object})

  return validator.validate(validatorValues)
}

lockfile-lint-api

Lint an npm or yarn lockfile to analyze and detect issues

Apache-2.0
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis