aboutsummaryrefslogtreecommitdiff
path: root/src/js/out/modules/node/v8.js
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-06-01 21:16:47 -0400
committerGravatar GitHub <noreply@github.com> 2023-06-01 18:16:47 -0700
commit4df1d37ddc54242c339765f22fb90ba2e9e3a99a (patch)
treed63ede76463e7ecba78a4d4b31e5e8158193552f /src/js/out/modules/node/v8.js
parent03ffd1c732aaaa30b5481f197221ce96da559e63 (diff)
downloadbun-4df1d37ddc54242c339765f22fb90ba2e9e3a99a.tar.gz
bun-4df1d37ddc54242c339765f22fb90ba2e9e3a99a.tar.zst
bun-4df1d37ddc54242c339765f22fb90ba2e9e3a99a.zip
Bundle and minify `.exports.js` files. (#3036)
* move all exports.js into src/js * finalize the sort of this * and it works * add test.ts to gitignore * okay * convert some to ts just to show * finish up * fixup makefile * minify syntax in dev * finish rebase * dont minify all modules * merge * finish rebase merge * flaky test that hangs
Diffstat (limited to 'src/js/out/modules/node/v8.js')
-rw-r--r--src/js/out/modules/node/v8.js139
1 files changed, 139 insertions, 0 deletions
diff --git a/src/js/out/modules/node/v8.js b/src/js/out/modules/node/v8.js
new file mode 100644
index 000000000..eb7a6568b
--- /dev/null
+++ b/src/js/out/modules/node/v8.js
@@ -0,0 +1,139 @@
+function throwNotImplemented(feature, issue) {
+ throw hideFromStack(throwNotImplemented), new NotImplementedError(feature, issue);
+}
+function hideFromStack(...fns) {
+ for (let fn of fns)
+ Object.defineProperty(fn, "name", {
+ value: "::bunternal::"
+ });
+}
+
+class NotImplementedError extends Error {
+ code;
+ constructor(feature, issue) {
+ super(feature + " is not yet implemented in Bun." + (issue ? " Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/" + issue : ""));
+ this.name = "NotImplementedError", this.code = "ERR_NOT_IMPLEMENTED", hideFromStack(NotImplementedError);
+ }
+}
+
+// src/js/node/v8.ts
+var notimpl = function(message) {
+ throwNotImplemented("node:v8 " + message);
+}, cachedDataVersionTag = function() {
+ notimpl("cachedDataVersionTag");
+}, getHeapSnapshot = function() {
+ notimpl("getHeapSnapshot");
+}, getHeapStatistics = function() {
+ notimpl("getHeapStatistics");
+}, getHeapSpaceStatistics = function() {
+ notimpl("getHeapSpaceStatistics");
+}, getHeapCodeStatistics = function() {
+ notimpl("getHeapCodeStatistics");
+}, setFlagsFromString = function() {
+ notimpl("setFlagsFromString");
+}, deserialize = function() {
+ notimpl("deserialize");
+}, takeCoverage = function() {
+ notimpl("takeCoverage");
+}, stopCoverage = function() {
+ notimpl("stopCoverage");
+}, serialize = function() {
+ notimpl("serialize");
+}, writeHeapSnapshot = function() {
+ notimpl("writeHeapSnapshot");
+}, setHeapSnapshotNearHeapLimit = function() {
+ notimpl("setHeapSnapshotNearHeapLimit");
+};
+
+class Deserializer {
+ constructor() {
+ notimpl("Deserializer");
+ }
+}
+
+class Serializer {
+ constructor() {
+ notimpl("Serializer");
+ }
+}
+
+class DefaultDeserializer extends Deserializer {
+ constructor() {
+ super(...arguments);
+ }
+}
+
+class DefaultSerializer extends Serializer {
+ constructor() {
+ super(...arguments);
+ }
+}
+
+class GCProfiler {
+ constructor() {
+ notimpl("GCProfiler");
+ }
+}
+var promiseHooks = {
+ createHook: () => {
+ notimpl("createHook");
+ },
+ onInit: () => {
+ notimpl("onInit");
+ },
+ onBefore: () => {
+ notimpl("onBefore");
+ },
+ onAfter: () => {
+ notimpl("onAfter");
+ },
+ onSettled: () => {
+ notimpl("onSettled");
+ }
+}, startupSnapshot = {
+ addDeserializeCallback: () => notimpl("addDeserializeCallback"),
+ addSerializeCallback: () => notimpl("addSerializeCallback"),
+ setDeserializeMainFunction: () => notimpl("setDeserializeMainFunction"),
+ isBuildingSnapshot: () => notimpl("isBuildingSnapshot")
+}, defaultObject = {
+ cachedDataVersionTag,
+ getHeapSnapshot,
+ getHeapStatistics,
+ getHeapSpaceStatistics,
+ getHeapCodeStatistics,
+ setFlagsFromString,
+ deserialize,
+ takeCoverage,
+ stopCoverage,
+ serialize,
+ writeHeapSnapshot,
+ setHeapSnapshotNearHeapLimit,
+ promiseHooks,
+ startupSnapshot,
+ Deserializer,
+ Serializer,
+ [Symbol.for("CommonJS")]: 0
+};
+hideFromStack(notimpl, cachedDataVersionTag, getHeapSnapshot, getHeapStatistics, getHeapSpaceStatistics, getHeapCodeStatistics, setFlagsFromString, deserialize, takeCoverage, stopCoverage, serialize, writeHeapSnapshot, setHeapSnapshotNearHeapLimit, Deserializer, Serializer, DefaultDeserializer, DefaultSerializer, GCProfiler);
+export {
+ writeHeapSnapshot,
+ takeCoverage,
+ stopCoverage,
+ startupSnapshot,
+ setHeapSnapshotNearHeapLimit,
+ setFlagsFromString,
+ serialize,
+ promiseHooks,
+ getHeapStatistics,
+ getHeapSpaceStatistics,
+ getHeapSnapshot,
+ getHeapCodeStatistics,
+ deserialize,
+ defaultObject as default,
+ cachedDataVersionTag,
+ Serializer,
+ GCProfiler,
+ Deserializer,
+ DefaultSerializer,
+ DefaultDeserializer
+};