diff options
author | 2023-08-02 16:27:36 -0700 | |
---|---|---|
committer | 2023-08-02 16:27:36 -0700 | |
commit | c2a77cf7ec9de9eadf938046bdf78e58561c8a6d (patch) | |
tree | 0f90f1b323061455875333c9f40592b303585973 /src/js/node/wasi.js | |
parent | 7656b4b17e91f15b58eeab8f45b78c416ec6a045 (diff) | |
download | bun-c2a77cf7ec9de9eadf938046bdf78e58561c8a6d.tar.gz bun-c2a77cf7ec9de9eadf938046bdf78e58561c8a6d.tar.zst bun-c2a77cf7ec9de9eadf938046bdf78e58561c8a6d.zip |
Rewrite built-in modules to use CommonJS over ESM (#3814)
* stfdsafsd
sadffdsa
stuff
finish commonjs stuff
asdf
not done but work
not done but work
not done yet but this is how far i am
remove files
lol
update built files
uncomment everything in events lol
export default
stuff
* afdsafsd
* its not perfect but almost done
* okay
* cool
* remove temp file
* finish rebase
* revert settings.json
* a
* ch-ch-ch-ch-changes
* okay
* remove this check in release for now
* sxdcfghnjm,
* lkjhgf
* fmt
* filename can be null
* Update NodeModuleModule.h
* weee
* fmt
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/js/node/wasi.js')
-rw-r--r-- | src/js/node/wasi.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/js/node/wasi.js b/src/js/node/wasi.js index ea693585a..c8b051cd3 100644 --- a/src/js/node/wasi.js +++ b/src/js/node/wasi.js @@ -8,7 +8,7 @@ /** **/ // constants is injected into the top of this file -const nodeFsConstants = constants; +const nodeFsConstants = $processBindingConstants.fs; var __getOwnPropNames = Object.getOwnPropertyNames; @@ -769,9 +769,9 @@ var require_wasi = __commonJS({ process.kill(process.pid, signal); }, randomFillSync: array => crypto.getRandomValues(array), - isTTY: fd => import.meta.require("node:tty").isatty(fd), + isTTY: fd => require("node:tty").isatty(fd), fs: Bun.fs(), - path: import.meta.require("node:path"), + path: require("node:path"), }; return (defaultConfig = { @@ -1936,8 +1936,4 @@ var require_wasi = __commonJS({ exports.default = WASI; }, }); -const WASIExport = require_wasi(); -const WASI = WASIExport.default; -WASIExport[Symbol.for("CommonJS")] = 0; -export { WASIExport as WASI }; -export default WASIExport; +export default { WASI: require_wasi().default }; |