Skip to content

Commit bc6fe98

Browse files
committed
Fix to getExports definition
1 parent 10381b7 commit bc6fe98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/datadog-esbuild/src/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ const loadGetExportsModule = () => {
1616
return getExportsModulePromise
1717
}
1818

19-
const getExports = async (srcUrl, context, getSource) => {
20-
if (NODE_MAJOR >= 20 || (NODE_MAJOR === 18 && NODE_MINOR >= 19)) {
19+
const getExports = NODE_MAJOR >= 20 || (NODE_MAJOR === 18 && NODE_MINOR >= 19)
20+
? async (srcUrl, context, getSource) => {
2121
const mod = await loadGetExportsModule()
2222
return mod.getExports(srcUrl, context, getSource)
2323
}
24-
return getExportsImporting(srcUrl, context, getSource)
25-
}
24+
: getExportsImporting
2625

2726
function isStarExportLine (line) {
2827
return /^\* from /.test(line)
@@ -93,6 +92,7 @@ async function processModule ({ path, internal, context, excludeDefault }) {
9392
} else {
9493
srcUrl = pathToFileURL(path)
9594
exportNames = await getExports(srcUrl, context, getSource)
95+
process._rawDebug('This is getExports ', exportNames)
9696
}
9797

9898
const starExports = new Set()

0 commit comments

Comments
 (0)