Skip to content

Commit 74b48d5

Browse files
committed
fixup: readability
1 parent baf2755 commit 74b48d5

File tree

3 files changed

+196
-153
lines changed

3 files changed

+196
-153
lines changed

packages/async-rewriter3/lib/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module.exports = class AsyncWriter {
2828
' (not supported while snapshotting)' :
2929
'');
3030
}
31-
const { async_rewrite } = await importPromise;
32-
return async_rewrite(code, false);
31+
const { async_rewrite, DebugLevel } = await importPromise;
32+
return async_rewrite(code, DebugLevel[process.env.MONGOSH_ASYNC_REWRITER3_DEBUG_LEVEL] ?? DebugLevel.TypesOnly);
3333
}
3434
processSync(code) {
3535
if (!syncImport) {
@@ -38,8 +38,8 @@ module.exports = class AsyncWriter {
3838
' (not supported while snapshotting)' :
3939
'');
4040
}
41-
const { async_rewrite } = syncImport;
42-
return async_rewrite(code, !!process.env.MONGOSH_ASYNC_REWRITER3_DEBUG_TAGS);
41+
const { async_rewrite, DebugLevel } = syncImport;
42+
return async_rewrite(code, DebugLevel[process.env.MONGOSH_ASYNC_REWRITER3_DEBUG_LEVEL] ?? DebugLevel.TypesOnly);
4343
}
4444
runtimeSupportCode() {
4545
return '';

0 commit comments

Comments
 (0)