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.0 to 1.3.1

2

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

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

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

Array.isArray(lookFor) && lookFor.length && lookFor.every(a => typeof a === 'string' && /^[a-z]+\w*$/i.test(a))
|| (console.error('\x1b[31m%s\x1b[0m', `The package.json field 'extensionless.lookFor' must be an array of alphanumeric strings!`), process.exit(1))
Array.isArray(lookFor) && lookFor.length && lookFor.every(a => typeof a === 'string' && /^[a-z]+\w*$/i.test(a)) || (
console.error('\n❌ \x1b[31m%s\x1b[0m', `Error: The package.json field 'extensionless.lookFor' must be an array of alphanumeric strings!`),
process.exit(1)
)

@@ -31,6 +33,6 @@ let indexFiles = [lookFor.map(e => `index.${e}`), ['index.json']]

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

@@ -37,0 +39,0 @@ : separators.some(s => specifier.endsWith(s)) ? indexFiles

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