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.7.3 to 1.8.0

2

package.json
{
"name": "extensionless",
"version": "1.7.3",
"version": "1.8.0",
"type": "module",

@@ -5,0 +5,0 @@ "exports": {

@@ -20,3 +20,3 @@ import {extname} from 'path'

let winAbsPath = /^[/\\]?[a-z]:[/\\]/i, relSpecs = ['.', '..']
let specStarts = ['./', '../', '/', 'file://', 'https://', '.\\', '..\\', '\\']
let specStarts = ['./', '../', '/', '#', 'file://', 'https://', '.\\', '..\\', '\\']
let knownExts = ['.js', '.cjs', '.mjs', '.json', '.node', '.wasm'], empty = [[], []]

@@ -31,14 +31,14 @@

let selfURL = new URL(prefix + specifier, context.parentURL).href
let trySpec = specifier[0] === '#' ? specifier : new URL(prefix + specifier, context.parentURL).href
let {type} = context.importAttributes ?? context.importAssertions
let postfixes = (await initPromise, selfURL.endsWith('/') ? indexFiles : knownExts.includes(extname(selfURL)) ? empty : candidates)
let postfixes = (await initPromise, trySpec.endsWith('/') ? indexFiles : knownExts.includes(extname(trySpec)) ? empty : candidates)
for (let postfix of postfixes[+(type === 'json')]) {
try {
return await nextResolve(selfURL + postfix)
return await nextResolve(trySpec + postfix)
} catch {}
}
return await nextResolve(selfURL)
return await nextResolve(trySpec)
}
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