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.0.5 to 1.1.0

2

package.json
{
"name": "extensionless",
"version": "1.0.5",
"version": "1.1.0",
"type": "module",

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

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

@@ -10,5 +10,3 @@ import {fileURLToPath} from 'url'

do {
curDir = upDir
let filePath = join(curDir, 'package.json')
let filePath = join(curDir = upDir, 'package.json')
if (existsSync(filePath)) {

@@ -45,3 +43,3 @@ pkgJson = JSON.parse(readFileSync(filePath, 'utf8'))

let relPrefixes = [`.${sep}`, `..${sep}`]
let relPrefixes = [...new Set(['./', '../', `.${sep}`, `..${sep}`])]
export async function resolve(specifier, context, nextResolve) {

@@ -51,6 +49,5 @@ let spec = specifier.startsWith('file://') ? fileURLToPath(specifier) : specifier

let postfix = (isAbsolute(spec) || relPrefixes.some(p => spec.startsWith(p)))
&& !extname(basename(spec))
&& await findPostfix(spec, context) || ''
&& !extname(spec) && await findPostfix(normalize(spec), context)
return await nextResolve(specifier + postfix)
return await nextResolve(specifier + (postfix || ''))
}
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