Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review findings
  • Loading branch information
dygabo committed Dec 20, 2021
commit a4c345658c63d1d0b0bb3c4b196b5fa0235da2fe
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/get_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ function defaultGetFormat(url, context) {
module.exports = {
defaultGetFormat,
extensionFormatMap,
getModuleFileFormat,
legacyExtensionFormatMap,
getModuleFileFormat
};
8 changes: 1 addition & 7 deletions lib/internal/modules/esm/resolve.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath,
base, pattern, internal, conditions) {
if (typeof target === 'string') {
return resolvePackageTargetString(
target,
subpath,
packageSubpath,
packageJSONUrl,
base,
pattern,
internal,
target, subpath, packageSubpath, packageJSONUrl, base, pattern, internal,
conditions);
} else if (ArrayIsArray(target)) {
if (target.length === 0)
Expand Down
1 change: 1 addition & 0 deletions test/es-module/test-esm-resolve-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ try {
[ 'mjs-mod-mod', 'index.js', 'index.mjs', 'module', 'module', 'module'],
[ 'mjs-com-com', 'idx.js', 'idx.mjs', 'commonjs', 'commonjs', 'module'],
[ 'mjs-mod-com', 'index.js', 'imp.mjs', 'module', 'commonjs', 'module'],
Comment thread
dygabo marked this conversation as resolved.
[ 'cjs-mod-mod', 'index.cjs', 'imp.cjs', 'module', 'module', 'commonjs'],
[ 'js-com-com', 'index.js', 'imp.js', 'commonjs', 'commonjs', 'commonjs'],
[ 'js-com-mod', 'index.js', 'imp.js', 'commonjs', 'module', 'module'],
[ 'qmod', 'index.js', 'imp.js', 'commonjs', 'module', 'module', '?k=v'],
Expand Down