Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed Jan 17, 2025
1 parent ffeaf36 commit 2198477
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const resolve = require('bare-addon-resolve')
const { fileURLToPath } = require('bare-url')
const { AddonError } = require('./errors')

const { constants } = Module

module.exports = exports = class Addon {
constructor(url) {
this._url = url
Expand Down Expand Up @@ -95,7 +97,7 @@ module.exports = exports = class Addon {
for (const packageURL of lookupPackageScope(url, {
resolutions
})) {
if (protocol.exists(packageURL)) {
if (protocol.exists(packageURL, constants.types.JSON)) {
addon._name = addonName(
Module.load(packageURL, { protocol })._exports
)
Expand Down Expand Up @@ -182,7 +184,7 @@ module.exports = exports = class Addon {
continue
}
default:
if (protocol.exists(resolution)) {
if (protocol.exists(resolution, constants.types.ADDON)) {
return protocol.postresolve(
protocol.addon ? protocol.addon(resolution) : resolution
)
Expand All @@ -195,7 +197,7 @@ module.exports = exports = class Addon {
)

function readPackage(packageURL) {
if (protocol.exists(packageURL)) {
if (protocol.exists(packageURL, constants.types.JSON)) {
return Module.load(packageURL, { protocol })._exports
}

Expand Down

0 comments on commit 2198477

Please sign in to comment.