diff options
author | 2022-11-16 05:15:56 -0800 | |
---|---|---|
committer | 2022-11-16 05:15:56 -0800 | |
commit | 29f72efac30fc09df9eb1646d1553dcc16c5ce2d (patch) | |
tree | 4d786bbc18b89348bedb357e8556a321884c707d /src/bun.js/modules/TTYModule.h | |
parent | 4985a44fe2409110b0cc044303e0c7db65f64c43 (diff) | |
download | bun-29f72efac30fc09df9eb1646d1553dcc16c5ce2d.tar.gz bun-29f72efac30fc09df9eb1646d1553dcc16c5ce2d.tar.zst bun-29f72efac30fc09df9eb1646d1553dcc16c5ce2d.zip |
Mark some more commonjs modules
Diffstat (limited to 'src/bun.js/modules/TTYModule.h')
-rw-r--r-- | src/bun.js/modules/TTYModule.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bun.js/modules/TTYModule.h b/src/bun.js/modules/TTYModule.h index fcc65b235..423268b32 100644 --- a/src/bun.js/modules/TTYModule.h +++ b/src/bun.js/modules/TTYModule.h @@ -62,6 +62,15 @@ inline void generateTTYSourceCode(JSC::JSGlobalObject *lexicalGlobalObject, tty->putDirect(vm, JSC::Identifier::fromString(vm, "WriteStream"_s), notimpl); exportValues.append(notimpl); + tty->putDirect(vm, + PropertyName(Identifier::fromUid( + vm.symbolRegistry().symbolForKey("CommonJS"_s))), + jsNumber(0), 0); + + for (size_t i = 0; i < exportNames.size(); i++) { + tty->putDirect(vm, exportNames[i], exportValues.at(i), 0); + } + exportNames.append(vm.propertyNames->defaultKeyword); exportValues.append(tty); } |