How to use the lockfile-lint-api.ParseLockfile function in lockfile-lint-api

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)
}

lockfile-lint-api

Lint an npm or yarn lockfile to analyze and detect issues

Apache-2.0
Latest version published 9 months ago

Package Health Score

78 / 100
Full package analysis