extensionless
Advanced tools
Comparing version 1.4.4 to 1.4.5
{ | ||
"name": "extensionless", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -41,3 +41,3 @@ Node.js loader for import specifiers as file paths without extensions or as directory paths | ||
To configure the module, add the field `extensionless` to your project's `package.json`: | ||
To configure this module, add the field `extensionless` to your project's `package.json`: | ||
@@ -44,0 +44,0 @@ ```json |
@@ -13,3 +13,3 @@ import {readFile} from 'fs/promises' | ||
if (!['ENOTDIR', 'ENOENT', 'EISDIR'].includes(e.code)) { | ||
throw new Error('Cannot access to package.json', {cause: e}) | ||
throw new Error('Cannot retrieve package.json', {cause: e}) | ||
} | ||
@@ -20,3 +20,3 @@ } | ||
let warn = (field, type) => console.warn('⚠️ \x1b[33m%s\x1b[0m', `Warning: The package.json field 'extensionless.${field}' must be ${type}! Using the default value instead...`) | ||
let warn = (field, desc) => console.warn('⚠️ \x1b[33m%s\x1b[0m', `Warning: The package.json field 'extensionless.${field}' must be ${desc}! Using the default value instead...`) | ||
@@ -23,0 +23,0 @@ let defaults = { |