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.9.0 to 1.9.1

109

index.js

@@ -381,3 +381,2 @@ const resolve = require('bare-module-resolve')

linked = true,
linkedProtocol = 'linked:',
host = null, // Shorthand for single host resolution

@@ -399,30 +398,20 @@ hosts = host !== null ? [host] : [],

if (platform === 'darwin' || platform === 'ios') {
if (version !== null) {
if (
yield {
resolution: new URL(
`${linkedProtocol}${name}.${version}.framework/${name}.${version}`
)
}
) {
return RESOLVED
}
status |= yield* platformArtefact(name, version, platform, opts)
if (platform === 'darwin') {
if (
yield {
resolution: new URL(
`${linkedProtocol}lib${name}.${version}.dylib`
)
}
) {
return RESOLVED
}
}
}
matchedConditions.pop()
}
return status
}
function* platformArtefact(name, version = null, platform, opts = {}) {
const { linkedProtocol = 'linked:' } = opts
if (platform === 'darwin' || platform === 'ios') {
if (version !== null) {
if (
yield {
resolution: new URL(`${linkedProtocol}${name}.framework/${name}`)
resolution: new URL(
`${linkedProtocol}${name}.${version}.framework/${name}.${version}`
)
}

@@ -436,3 +425,3 @@ ) {

yield {
resolution: new URL(`${linkedProtocol}lib${name}.dylib`)
resolution: new URL(`${linkedProtocol}lib${name}.${version}.dylib`)
}

@@ -443,18 +432,16 @@ ) {

}
}
status = YIELDED
} else if (platform === 'linux' || platform === 'android') {
if (version !== null) {
if (
yield {
resolution: new URL(`${linkedProtocol}lib${name}.${version}.so`)
}
) {
return RESOLVED
}
if (
yield {
resolution: new URL(`${linkedProtocol}${name}.framework/${name}`)
}
) {
return RESOLVED
}
if (platform === 'darwin') {
if (
yield {
resolution: new URL(`${linkedProtocol}lib${name}.so`)
resolution: new URL(`${linkedProtocol}lib${name}.dylib`)
}

@@ -464,18 +451,34 @@ ) {

}
}
status = YIELDED
} else if (platform === 'win32') {
if (version !== null) {
if (
yield {
resolution: new URL(`${linkedProtocol}${name}-${version}.dll`)
}
) {
return RESOLVED
return YIELDED
}
if (platform === 'linux' || platform === 'android') {
if (version !== null) {
if (
yield {
resolution: new URL(`${linkedProtocol}lib${name}.${version}.so`)
}
) {
return RESOLVED
}
}
if (
yield {
resolution: new URL(`${linkedProtocol}lib${name}.so`)
}
) {
return RESOLVED
}
return YIELDED
}
if (platform === 'win32') {
if (version !== null) {
if (
yield {
resolution: new URL(`${linkedProtocol}${name}.dll`)
resolution: new URL(`${linkedProtocol}${name}-${version}.dll`)
}

@@ -485,10 +488,14 @@ ) {

}
}
status = YIELDED
if (
yield {
resolution: new URL(`${linkedProtocol}${name}.dll`)
}
) {
return RESOLVED
}
matchedConditions.pop()
}
return status
return UNRESOLVED
}

@@ -495,0 +502,0 @@

{
"name": "bare-addon-resolve",
"version": "1.9.0",
"version": "1.9.1",
"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