aboutsummaryrefslogtreecommitdiff
path: root/src/js/node/zlib.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-07-11 19:14:34 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-11 19:14:34 -0700
commitcbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch)
tree43a00501f3cde495967e116f0b660777051551f8 /src/js/node/zlib.js
parent1f900cff453700b19bca2acadfe26da4468c1282 (diff)
parent34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff)
downloadbun-jarred/esm-conditions.tar.gz
bun-jarred/esm-conditions.tar.zst
bun-jarred/esm-conditions.zip
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to 'src/js/node/zlib.js')
-rw-r--r--src/js/node/zlib.js110
1 files changed, 71 insertions, 39 deletions
diff --git a/src/js/node/zlib.js b/src/js/node/zlib.js
index 1414f4664..77a9e8089 100644
--- a/src/js/node/zlib.js
+++ b/src/js/node/zlib.js
@@ -3,6 +3,41 @@
// This is a very slow module!
// It should really be fixed. It will show up in benchmarking. It also loads
// slowly. We need to fix it!
+import { default as assert } from "node:assert";
+import * as AssertModule from "node:assert";
+import * as BufferModule from "node:buffer";
+import * as StreamModule from "node:stream";
+import * as Util from "node:util";
+
+export var Deflate,
+ Inflate,
+ Gzip,
+ Gunzip,
+ DeflateRaw,
+ InflateRaw,
+ Unzip,
+ createDeflate,
+ createInflate,
+ createDeflateRaw,
+ createInflateRaw,
+ createGzip,
+ createGunzip,
+ createUnzip,
+ deflate,
+ deflateSync,
+ gzip,
+ gzipSync,
+ deflateRaw,
+ deflateRawSync,
+ unzip,
+ unzipSync,
+ inflate,
+ inflateSync,
+ gunzip,
+ gunzipSync,
+ inflateRaw,
+ inflateRawSync,
+ constants;
var __create = Object.create;
var __defProp = Object.defineProperty;
@@ -38,8 +73,6 @@ var __toESM = (mod, isNodeMode, target) => (
);
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
-const require = id => import.meta.require(id);
-
// node_modules/pako/lib/zlib/zstream.js
var require_zstream = __commonJS({
"node_modules/pako/lib/zlib/zstream.js"(exports, module2) {
@@ -3593,7 +3626,7 @@ var require_constants = __commonJS({
var require_binding = __commonJS({
"node_modules/browserify-zlib/lib/binding.js"(exports) {
"use strict";
- var assert = require("assert");
+
var Zstream = require_zstream();
var zlib_deflate = require_deflate();
var zlib_inflate = require_inflate();
@@ -3937,12 +3970,12 @@ var require_binding = __commonJS({
var require_lib = __commonJS({
"node_modules/browserify-zlib/lib/index.js"(exports) {
"use strict";
- var Buffer2 = require("buffer").Buffer;
- var Transform = require("stream").Transform;
+ var Buffer2 = BufferModule.Buffer;
+ var Transform = StreamModule.Transform;
var binding = require_binding();
- var util = require("util");
- var assert = require("assert").ok;
- var kMaxLength = require("buffer").kMaxLength;
+ var util = Util;
+ var assert = AssertModule.ok;
+ var kMaxLength = BufferModule.kMaxLength;
var kRangeErrorMessage =
"Cannot create final Buffer. It would be larger than 0x" + kMaxLength.toString(16) + " bytes";
binding.Z_MIN_WINDOWBITS = 8;
@@ -4437,36 +4470,35 @@ var require_lib = __commonJS({
// zlib.js
var zlib_exports = require_lib();
zlib_exports[Symbol.for("CommonJS")] = 0;
+
export default zlib_exports;
-export var {
- Deflate,
- Inflate,
- Gzip,
- Gunzip,
- DeflateRaw,
- InflateRaw,
- Unzip,
- createDeflate,
- createInflate,
- createDeflateRaw,
- createInflateRaw,
- createGzip,
- createGunzip,
- createUnzip,
- deflate,
- deflateSync,
- gzip,
- gzipSync,
- deflateRaw,
- deflateRawSync,
- unzip,
- unzipSync,
- inflate,
- inflateSync,
- gunzip,
- gunzipSync,
- inflateRaw,
- inflateRawSync,
- constants,
-} = zlib_exports;
+Deflate = zlib_exports.Deflate;
+Inflate = zlib_exports.Inflate;
+Gzip = zlib_exports.Gzip;
+Gunzip = zlib_exports.Gunzip;
+DeflateRaw = zlib_exports.DeflateRaw;
+InflateRaw = zlib_exports.InflateRaw;
+Unzip = zlib_exports.Unzip;
+createDeflate = zlib_exports.createDeflate;
+createInflate = zlib_exports.createInflate;
+createDeflateRaw = zlib_exports.createDeflateRaw;
+createInflateRaw = zlib_exports.createInflateRaw;
+createGzip = zlib_exports.createGzip;
+createGunzip = zlib_exports.createGunzip;
+createUnzip = zlib_exports.createUnzip;
+deflate = zlib_exports.deflate;
+deflateSync = zlib_exports.deflateSync;
+gzip = zlib_exports.gzip;
+gzipSync = zlib_exports.gzipSync;
+deflateRaw = zlib_exports.deflateRaw;
+deflateRawSync = zlib_exports.deflateRawSync;
+unzip = zlib_exports.unzip;
+unzipSync = zlib_exports.unzipSync;
+inflate = zlib_exports.inflate;
+inflateSync = zlib_exports.inflateSync;
+gunzip = zlib_exports.gunzip;
+gunzipSync = zlib_exports.gunzipSync;
+inflateRaw = zlib_exports.inflateRaw;
+inflateRawSync = zlib_exports.inflateRawSync;
+constants = zlib_exports.constants;