📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

bare-module-resolve

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-module-resolve - npm Package Compare versions

Comparing version

to
1.2.3

16

index.js

@@ -152,3 +152,3 @@ const errors = require('./lib/errors')

if (packageSubpath === '.') {
if (typeof info.main === 'string') {
if (typeof info.main === 'string' && info.main) {
packageSubpath = info.main

@@ -166,3 +166,11 @@ } else {

if (yield * exports.file(packageSubpath + '/index', packageURL, false, opts)) {
let packageIndex
if (packageSubpath[packageSubpath.length - 1] === '/') {
packageIndex = packageSubpath + 'index'
} else {
packageIndex = packageSubpath + '/index'
}
if (yield * exports.file(packageIndex, packageURL, false, opts)) {
yielded = true

@@ -376,3 +384,3 @@ }

exports.directory = function * (dirname, parentURL, opts) {
parentURL = new URL(dirname === '/' ? dirname : dirname + '/', parentURL)
parentURL = new URL(dirname[dirname.length - 1] === '/' ? dirname : dirname + '/', parentURL)

@@ -386,3 +394,3 @@ const info = yield pkg(new URL('package.json', parentURL))

if (typeof info.main === 'string') {
if (typeof info.main === 'string' && info.main) {
let yielded = false

@@ -389,0 +397,0 @@

{
"name": "bare-module-resolve",
"version": "1.2.2",
"version": "1.2.3",
"description": "Low-level module resolution algorithm for Bare",

@@ -5,0 +5,0 @@ "main": "index.js",