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.2.3 to 1.2.4

2

package.json
{
"name": "extensionless",
"version": "1.2.3",
"version": "1.2.4",
"type": "module",

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

@@ -41,3 +41,3 @@ Node.js loader for import specifiers as file paths without extensions or as directory paths

If it can be deduced from the specifier that its target is a directory, the resolver looks for only the index files:
When it can be deduced from the specifier that its target is a directory, the resolver looks for only the index files:

@@ -44,0 +44,0 @@ ```js

import {access, existsSync, readFileSync} from 'fs'
import {dirname, extname, isAbsolute, join, normalize} from 'path'
import {dirname, extname, isAbsolute, join, win32} from 'path'
import {argv, cwd} from 'process'

@@ -39,4 +39,5 @@ import {fileURLToPath} from 'url'

let path = join(isAbsPath ? '' : dirname(fileURLToPath(parentURL)), spec + post)
let reqsWin32Fix = path.startsWith(win32.sep)
if (await new Promise(resolve => access(normalize(path), e => resolve(!e)))) {
if (await new Promise(r => access(path.substring(+reqsWin32Fix), e => r(!e)))) {
return await nextResolve(specifier + post)

@@ -43,0 +44,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