aboutsummaryrefslogtreecommitdiff
path: root/src/node_fallbacks.zig
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-06-24 02:23:39 -0400
committerGravatar GitHub <noreply@github.com> 2023-06-23 23:23:39 -0700
commit5ae8e5d773c6b57fe166681ffa9cdc153f69427b (patch)
treefa7331a152f6d947ee49977109f77162b669924a /src/node_fallbacks.zig
parent4ff920c915403dd7abac18c6a80a7b9c468ee52b (diff)
downloadbun-5ae8e5d773c6b57fe166681ffa9cdc153f69427b.tar.gz
bun-5ae8e5d773c6b57fe166681ffa9cdc153f69427b.tar.zst
bun-5ae8e5d773c6b57fe166681ffa9cdc153f69427b.zip
Make node-fallbacks build as esm not cjs / Fix `node-fetch` (#3377)
* Make node-fallbacks build as esm not cjs. * fix stuff
Diffstat (limited to 'src/node_fallbacks.zig')
-rw-r--r--src/node_fallbacks.zig54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/node_fallbacks.zig b/src/node_fallbacks.zig
index 170907e58..51da04be0 100644
--- a/src/node_fallbacks.zig
+++ b/src/node_fallbacks.zig
@@ -67,7 +67,7 @@ const vercel_fetch_import_path = "/bun-vfs/node_modules/@vercel/fetch/index.js";
const assert_package_json = PackageJSON{
.name = "assert",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("assert@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -76,7 +76,7 @@ const assert_package_json = PackageJSON{
const buffer_package_json = PackageJSON{
.name = "buffer",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("buffer@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -85,7 +85,7 @@ const buffer_package_json = PackageJSON{
const console_package_json = PackageJSON{
.name = "console",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("console@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -94,7 +94,7 @@ const console_package_json = PackageJSON{
const constants_package_json = PackageJSON{
.name = "constants",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("constants@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -103,7 +103,7 @@ const constants_package_json = PackageJSON{
const crypto_package_json = PackageJSON{
.name = "crypto",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("crypto@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -112,7 +112,7 @@ const crypto_package_json = PackageJSON{
const domain_package_json = PackageJSON{
.name = "domain",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("domain@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -121,7 +121,7 @@ const domain_package_json = PackageJSON{
const events_package_json = PackageJSON{
.name = "events",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("events@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -130,7 +130,7 @@ const events_package_json = PackageJSON{
const http_package_json = PackageJSON{
.name = "http",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("http@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -139,7 +139,7 @@ const http_package_json = PackageJSON{
const https_package_json = PackageJSON{
.name = "https",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("https@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -148,7 +148,7 @@ const https_package_json = PackageJSON{
const net_package_json = PackageJSON{
.name = "net",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("net@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -157,7 +157,7 @@ const net_package_json = PackageJSON{
const os_package_json = PackageJSON{
.name = "os",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("os@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -166,7 +166,7 @@ const os_package_json = PackageJSON{
const path_package_json = PackageJSON{
.name = "path",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("path@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -175,7 +175,7 @@ const path_package_json = PackageJSON{
const process_package_json = PackageJSON{
.name = "process",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("process@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -184,7 +184,7 @@ const process_package_json = PackageJSON{
const punycode_package_json = PackageJSON{
.name = "punycode",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("punycode@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -193,7 +193,7 @@ const punycode_package_json = PackageJSON{
const querystring_package_json = PackageJSON{
.name = "querystring",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("querystring@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -202,7 +202,7 @@ const querystring_package_json = PackageJSON{
const stream_package_json = PackageJSON{
.name = "stream",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("stream@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -211,7 +211,7 @@ const stream_package_json = PackageJSON{
const string_decoder_package_json = PackageJSON{
.name = "string_decoder",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = brk: {
@setEvalBranchQuota(9999);
break :brk @truncate(u32, bun.hash("string_decoder@0.0.0-polyfill"));
@@ -225,7 +225,7 @@ const string_decoder_package_json = PackageJSON{
const sys_package_json = PackageJSON{
.name = "sys",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("sys@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -234,7 +234,7 @@ const sys_package_json = PackageJSON{
const timers_package_json = PackageJSON{
.name = "timers",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("timers@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -243,7 +243,7 @@ const timers_package_json = PackageJSON{
const tty_package_json = PackageJSON{
.name = "tty",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("tty@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -252,7 +252,7 @@ const tty_package_json = PackageJSON{
const url_package_json = PackageJSON{
.name = "url",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("url@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -261,7 +261,7 @@ const url_package_json = PackageJSON{
const util_package_json = PackageJSON{
.name = "util",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("util@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -270,7 +270,7 @@ const util_package_json = PackageJSON{
const zlib_package_json = PackageJSON{
.name = "zlib",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("zlib@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -280,7 +280,7 @@ const zlib_package_json = PackageJSON{
const node_fetch_package_json = PackageJSON{
.name = "node-fetch",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("node-fetch@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -289,7 +289,7 @@ const node_fetch_package_json = PackageJSON{
const isomorphic_fetch_package_json = PackageJSON{
.name = "isomorphic-fetch",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("isomorphic-fetch@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -298,7 +298,7 @@ const isomorphic_fetch_package_json = PackageJSON{
const supports_color_package_json = PackageJSON{
.name = "supports-color",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("supports-color@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,
@@ -308,7 +308,7 @@ const supports_color_package_json = PackageJSON{
const vercel_fetch_package_json = PackageJSON{
.name = "@vercel/fetch",
.version = "0.0.0-polyfill",
- .module_type = .cjs,
+ .module_type = .esm,
.hash = @truncate(u32, bun.hash("@vercel/fetch@0.0.0-polyfill")),
.main_fields = undefined,
.browser_map = undefined,