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.1.5 to 1.1.6

4

package.json
{
"name": "extensionless",
"version": "1.1.5",
"version": "1.1.6",
"type": "module",
"main": "src/index.js",
"description": "Node.js loader for import specifiers as file paths without extensions or, optionally, as directory paths",
"description": "Node.js loader for import specifiers as file paths without extensions or as directory paths",
"license": "MIT",

@@ -8,0 +8,0 @@ "homepage": "https://github.com/barhun/extensionless",

@@ -1,2 +0,2 @@

Node.js loader for import specifiers as file paths without extensions or, optionally, as directory paths
Node.js loader for import specifiers as file paths without extensions or as directory paths

@@ -22,5 +22,4 @@  

"extensionless": {
"lookFor": ["mjs", "js", "json"], // default: ["js", "json"]
"resolveDirs": true // default: false
"lookFor": ["mjs", "js", "json"] // default: ["js", "json"]
}
```

@@ -17,4 +17,3 @@ import {access, existsSync, readFileSync} from 'fs'

let {
lookFor = ['js', 'json'],
resolveDirs = false
lookFor = ['js', 'json']
} = pkgJson?.extensionless ?? {}

@@ -25,7 +24,4 @@

typeof resolveDirs === 'boolean'
|| (console.error('\x1b[33m%s\x1b[0m', `The package.json field 'extensionless.resolveDirs' must be a boolean value!`), process.exit(1))
let extToSkip = ['.wasm', '.cjs', '.mjs', '.js', '.json']
let indexFiles = resolveDirs ? lookFor.map(e => `index.${e}`) : []
let indexFiles = lookFor.map(e => `index.${e}`)
let extensions = lookFor.map(e => `.${e}`).concat(indexFiles.map(p => `${sep}${p}`))

@@ -32,0 +28,0 @@ let findPostfix = async (specifier, context, isAbs) => {

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