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

extensionless

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extensionless - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

2

package.json
{
"name": "extensionless",
"version": "1.3.1",
"version": "1.3.2",
"type": "module",

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

@@ -32,6 +32,6 @@ import {access, existsSync, readFileSync} from 'fs'

export async function resolve(specifier, {importAssertions, parentURL}, nextResolve) {
let isRelSpec = relSpecs.includes(specifier)
let isAbs = isAbsolute(specifier), isRelSpec = relSpecs.includes(specifier)
let isRelative = isRelSpec || relPrefixes.some(p => specifier.startsWith(p))
if (isRelative || isAbsolute(specifier) || specifier.startsWith('file://')) {
if (specifier.startsWith('file://') || isAbs || isRelative) {
let postfixes = isRelSpec ? relatives

@@ -42,6 +42,6 @@ : separators.some(s => specifier.endsWith(s)) ? indexFiles

for (let postfix of postfixes[+(importAssertions?.type === 'json')]) {
let fileUrl = new URL(specifier + postfix, parentURL)
let fileURL = new URL((isAbs ? 'file://' : '') + specifier + postfix, parentURL)
if (!postfix || await new Promise(r => access(fileUrl, e => r(!e)))) {
return await nextResolve(fileUrl.href)
if (!postfix || await new Promise(r => access(fileURL, e => r(!e)))) {
return await nextResolve(fileURL.href)
}

@@ -48,0 +48,0 @@ }

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