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.9.1 to 1.9.2

2

package.json
{
"name": "extensionless",
"version": "1.9.1",
"version": "1.9.2",
"type": "module",

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

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

indexFiles = [lookFor.map(e => `index.${e}`), ['index.json']]
candidates = indexFiles.map(i => i.map(f => extname(f)).concat(i.map(f => `/${f}`)))
indexFiles = [lookFor.map(e => `index.${e}`), ['index.json']], candidates = indexFiles.map(i => i.map(f => extname(f)).concat(i.map(f => `/${f}`)))
pkgJsonURL = 'file://' + jsonPath, aliases = Object.entries(imports ?? {}).map(([k, v]) => [k.split('*'), (v.node ?? v.default ?? v).split('*')]).filter(([k, v]) => k.length < 3 && k.length === v.length)

@@ -27,10 +26,10 @@ }

let alias = specifier.startsWith('#') && (await initPromise, aliases.find(([k]) => k[1] !== undefined ? specifier.length > k[0].length + k[1].length && specifier.startsWith(k[0]) && specifier.endsWith(k[1]) : specifier === k[0]))
let spec = alias ? alias[1][0] + (alias[0][1] !== undefined ? specifier.substring(alias[0][0].length, specifier.length - alias[0][1].length) + alias[1][1] : '') : specifier
let error, prefix = winAbsPath.test(spec) ? 'file://' : ''
let orgSpec = alias ? alias[1][0] + (alias[0][1] !== undefined ? specifier.substring(alias[0][0].length, specifier.length - alias[0][1].length) + alias[1][1] : '') : specifier
let error, prefix = winAbsPath.test(orgSpec) ? 'file://' : ''
if (!prefix && !relSpecs.includes(spec) && !specStarts.some(s => spec.startsWith(s))) {
try {return await nextResolve(spec)} catch (e) {error = e}
if (!prefix && !relSpecs.includes(orgSpec) && !specStarts.some(s => orgSpec.startsWith(s))) {
try {return await nextResolve(orgSpec)} catch (e) {error = e}
}
let trySpec = error ? spec : new URL(prefix + spec, alias ? pkgJsonURL : context.parentURL).href
let trySpec = error ? orgSpec : new URL(prefix + orgSpec, alias ? pkgJsonURL : context.parentURL).href
let {type} = context.importAttributes ?? context.importAssertions

@@ -37,0 +36,0 @@ let postfixes = (await initPromise, trySpec.endsWith('/') ? indexFiles : knownExts.includes(extname(trySpec)) ? empty : candidates)

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