New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bare-addon-resolve

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-addon-resolve - npm Package Compare versions

Comparing version 1.4.2 to 1.5.0

32

index.js

@@ -58,2 +58,4 @@ const resolve = require('bare-module-resolve')

exports.addon = function * (specifier, parentURL, opts = {}) {
const { resolutions = null } = opts
if (exports.startsWithWindowsDriveLetter(specifier)) {

@@ -63,2 +65,8 @@ specifier = '/' + specifier

if (resolutions) {
if (yield * resolve.preresolved(specifier, resolutions, parentURL, opts)) {
return true
}
}
if (specifier === '.' || specifier === '..' || specifier[0] === '/' || specifier[0] === '\\' || specifier.startsWith('./') || specifier.startsWith('.\\') || specifier.startsWith('../') || specifier.startsWith('..\\')) {

@@ -131,15 +139,11 @@ return yield * exports.directory(specifier, parentURL, opts)

exports.preresolved = function * (directoryURL, resolutions, opts = {}) {
const imports = resolutions[directoryURL.href]
exports.lookupPrebuildsScope = function * lookupPrebuildsScope (url, opts = {}) {
const { resolutions = null, host = null } = opts
if (typeof imports === 'object' && imports !== null) {
return yield * resolve.packageImportsExports('bare:addon', imports, directoryURL, true, opts)
if (resolutions) {
for (const { resolution } of resolve.preresolved('#prebuilds', resolutions, url, opts)) {
if (resolution) return yield resolution
}
}
return false
}
exports.lookupPrebuildsScope = function * lookupPrebuildsScope (url, opts = {}) {
const { host = null } = opts
if (host === null) return

@@ -173,3 +177,3 @@

exports.directory = function * (dirname, parentURL, opts = {}) {
const { builtins = [], builtinProtocol = 'builtin:', resolutions = null } = opts
const { builtins = [], builtinProtocol = 'builtin:' } = opts

@@ -184,8 +188,2 @@ let directoryURL

if (resolutions) {
if (yield * exports.preresolved(directoryURL, resolutions, opts)) {
return true
}
}
let name = null

@@ -192,0 +190,0 @@ let version = null

{
"name": "bare-addon-resolve",
"version": "1.4.2",
"version": "1.5.0",
"description": "Low-level addon resolution algorithm for Bare",

@@ -5,0 +5,0 @@ "exports": {

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