Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lockfile-lint-api

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lockfile-lint-api - npm Package Compare versions

Comparing version 5.6.0 to 5.7.0

3

package.json
{
"name": "lockfile-lint-api",
"version": "5.6.0",
"version": "5.7.0",
"description": "Lint an npm or yarn lockfile to analyze and detect issues",

@@ -52,2 +52,3 @@ "main": "index.js",

"@yarnpkg/parsers": "^3.0.0-rc.32",
"debug": "^4.3.4",
"object-hash": "^3.0.0"

@@ -54,0 +55,0 @@ },

@@ -5,2 +5,4 @@ // @ts-check

const debug = require('debug')('lockfile-lint')
const path = require('path')

@@ -233,2 +235,4 @@ const yarnParseSyml = require('@yarnpkg/parsers').parseSyml

// }
debug(`dependency full name: ${depName}`)
const depNameClean = this.extractedPackageName(depName)

@@ -235,0 +239,0 @@

'use strict'
const debug = require('debug')('lockfile-lint')
const {REGISTRY} = require('../common/constants')
module.exports = class ValidatePackageNames {

@@ -25,2 +28,14 @@ constructor ({packages} = {}) {

const packageResolvedURL = new URL(packageMetadata.resolved)
// Only handle package name validation matching per registry URL
// when the registry is one of the official public registries:
if (!Object.values(REGISTRY).includes(packageResolvedURL.host)) {
debug(
`skipping package name '${packageName}' validation for non-official registry '${
packageResolvedURL.origin
}'`
)
continue
}
const path = packageResolvedURL.pathname

@@ -27,0 +42,0 @@ const packageNameFromResolved = path.split('/-/')[0].slice(1)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc