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

lavamoat-core

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lavamoat-core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

package.json
{
"name": "lavamoat-core",
"version": "2.0.0",
"version": "2.0.1",
"description": "LavaMoat kernel and utils",

@@ -19,3 +19,2 @@ "main": "src/index.js",

"lavamoat-tofu": "^2.0.9",
"module-name-from-path": "^1.0.4",
"resolve": "^1.15.1",

@@ -53,3 +52,3 @@ "resolve-package-path": "^2.0.0",

},
"gitHead": "308a4822fb7629d5ef1e3758c691fec535d9c501"
"gitHead": "75b6fe60cfa00aaede97a62c80b59c0f92d164c0"
}

15

src/packageData.js

@@ -0,3 +1,4 @@

'use strict'
const path = require('path')
const through = require('through2').obj
const packageNameFromPath = require('module-name-from-path')
const resolvePackagePath = require('resolve-package-path')

@@ -62,1 +63,13 @@ const pathSeperator = require('path').sep

}
function packageNameFromPath (file) {
const segments = file.split(path.sep)
const index = segments.lastIndexOf('node_modules')
if (index === -1) return
let moduleName = segments[index + 1]
// check for scoped modules
if (moduleName[0] === '@') {
moduleName = segments[index + 1] + path.sep + segments[index + 2]
}
return moduleName
}
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