Skip to content

Commit

Permalink
fixup: extensionless
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeck committed Mar 14, 2022
1 parent 36f25aa commit d03013c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/api/esm.md
Expand Up @@ -1091,7 +1091,7 @@ async function getPackageType(url) {
// required by the spec
// this simple truthy check for whether `url` contains a file extension will
// work for most projects but does not cover some edge-cases (such as
// extension-less files or a url ending in a trailing space)
// extensionless files or a url ending in a trailing space)
const isFilePath = !!extname(url);
// If it is a file path, get the directory it's in
const dir = isFilePath ?
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-unknown-or-no-extension.js
Expand Up @@ -34,7 +34,7 @@ const assert = require('assert');
assert.ok(stderr.includes('ERR_UNKNOWN_FILE_EXTENSION'));
if (fixturePath.includes('noext')) {
// Check for explanation to users
assert.ok(stderr.includes('Extension-less'));
assert.ok(stderr.includes('extensionless'));
}
}));
});

0 comments on commit d03013c

Please sign in to comment.