Skip to content

Commit

Permalink
update deno builtins to use node: internal implementation (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford authored Aug 5, 2024
1 parent 7af7d74 commit 1107a83
Show file tree
Hide file tree
Showing 103 changed files with 376 additions and 450 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
test-firefox:
name: Firefox Browser Tests
runs-on: ubuntu-latest
runs-on: windows-latest
strategy:
matrix:
firefox: ['89.0']
Expand All @@ -30,7 +30,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: chomp test
env:
CI_BROWSER: /opt/hostedtoolcache/firefox/${{ matrix.firefox }}/x64/firefox
CI_BROWSER: C:\Program Files\Firefox_${{ matrix.firefox }}\firefox.exe
CI_BROWSER_FLAGS: -headless

test-chrome:
Expand All @@ -57,6 +57,8 @@ jobs:
- run: npm ci
- name: Setup Chomp
uses: guybedford/chomp-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: chomp test
env:
CI_BROWSER_FLAGS: --headless --screenshot
16 changes: 8 additions & 8 deletions nodelibs/browser/_stream_duplex.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { e as exports } from './chunk-bae46e69.js';
import { e as exports } from './chunk-6c718bbe.js';
import './events.js';
import './chunk-001ff647.js';
import './chunk-c1749ca1.js';
import './chunk-739d4e67.js';
import './chunk-566596b9.js';
import './chunk-32df7659.js';
import './chunk-6ad9b8b8.js';
import './chunk-605e2a90.js';
import './chunk-4bd36a8f.js';
import './chunk-44e51b61.js';
import './chunk-ce0fbc82.js';
import './chunk-b4205b57.js';
import './chunk-5decc758.js';
import './chunk-2eac56ff.js';
import './chunk-4ccc3a29.js';

var _stream_duplex = exports.Duplex;
var from = exports.Duplex.from;
Expand Down
16 changes: 8 additions & 8 deletions nodelibs/browser/_stream_passthrough.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { e as exports } from './chunk-bae46e69.js';
import { e as exports } from './chunk-6c718bbe.js';
import './events.js';
import './chunk-001ff647.js';
import './chunk-c1749ca1.js';
import './chunk-739d4e67.js';
import './chunk-566596b9.js';
import './chunk-32df7659.js';
import './chunk-6ad9b8b8.js';
import './chunk-605e2a90.js';
import './chunk-4bd36a8f.js';
import './chunk-44e51b61.js';
import './chunk-ce0fbc82.js';
import './chunk-b4205b57.js';
import './chunk-5decc758.js';
import './chunk-2eac56ff.js';
import './chunk-4ccc3a29.js';

var _stream_passthrough = exports.PassThrough;

Expand Down
16 changes: 8 additions & 8 deletions nodelibs/browser/_stream_readable.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Readable } from './stream.js';
export { Readable as default } from './stream.js';
import './chunk-bae46e69.js';
import './chunk-6c718bbe.js';
import './events.js';
import './chunk-001ff647.js';
import './chunk-c1749ca1.js';
import './chunk-739d4e67.js';
import './chunk-566596b9.js';
import './chunk-32df7659.js';
import './chunk-6ad9b8b8.js';
import './chunk-605e2a90.js';
import './chunk-4bd36a8f.js';
import './chunk-44e51b61.js';
import './chunk-ce0fbc82.js';
import './chunk-b4205b57.js';
import './chunk-5decc758.js';
import './chunk-2eac56ff.js';
import './chunk-4ccc3a29.js';
import './util.js';

var ReadableState = Readable.ReadableState;
Expand Down
16 changes: 8 additions & 8 deletions nodelibs/browser/_stream_transform.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { e as exports } from './chunk-bae46e69.js';
import { e as exports } from './chunk-6c718bbe.js';
import './events.js';
import './chunk-001ff647.js';
import './chunk-c1749ca1.js';
import './chunk-739d4e67.js';
import './chunk-566596b9.js';
import './chunk-32df7659.js';
import './chunk-6ad9b8b8.js';
import './chunk-605e2a90.js';
import './chunk-4bd36a8f.js';
import './chunk-44e51b61.js';
import './chunk-ce0fbc82.js';
import './chunk-b4205b57.js';
import './chunk-5decc758.js';
import './chunk-2eac56ff.js';
import './chunk-4ccc3a29.js';

var _stream_transform = exports.Transform;

Expand Down
16 changes: 8 additions & 8 deletions nodelibs/browser/_stream_writable.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { e as exports } from './chunk-bae46e69.js';
import { e as exports } from './chunk-6c718bbe.js';
import './events.js';
import './chunk-001ff647.js';
import './chunk-c1749ca1.js';
import './chunk-739d4e67.js';
import './chunk-566596b9.js';
import './chunk-32df7659.js';
import './chunk-6ad9b8b8.js';
import './chunk-605e2a90.js';
import './chunk-4bd36a8f.js';
import './chunk-44e51b61.js';
import './chunk-ce0fbc82.js';
import './chunk-b4205b57.js';
import './chunk-5decc758.js';
import './chunk-2eac56ff.js';
import './chunk-4ccc3a29.js';

var _stream_writable = exports.Writable;
var WritableState = exports.Writable.WritableState;
Expand Down
4 changes: 2 additions & 2 deletions nodelibs/browser/assert.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions nodelibs/browser/assert/strict.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { strict } from '../assert.js';
export { strict as default, strict } from '../assert.js';
import '../chunk-566596b9.js';
import '../chunk-32df7659.js';
import '../chunk-b4205b57.js';
import '../chunk-5decc758.js';

const {
fail,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { p as process } from './chunk-6ad9b8b8.js';
import { p as process } from './chunk-2eac56ff.js';

var exports$1 = {},
_dewExec = false;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,56 +1,8 @@
import { y } from './chunk-001ff647.js';
import './chunk-739d4e67.js';
import { X } from './chunk-566596b9.js';
import { p as process } from './chunk-6ad9b8b8.js';
import { e as e$1 } from './chunk-605e2a90.js';

var exports$g = {},
_dewExec$g = false;
function dew$g() {
if (_dewExec$g) return exports$g;
_dewExec$g = true;

if (typeof Object.create === "function") {
// implementation from standard node.js 'util' module
exports$g = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
};
} else {
// old school shim for old browsers
exports$g = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor;

var TempCtor = function () {};

TempCtor.prototype = superCtor.prototype;
ctor.prototype = new TempCtor();
ctor.prototype.constructor = ctor;
}
};
}

return exports$g;
}

var exports$f = {},
_dewExec$f = false;
function dew$f() {
if (_dewExec$f) return exports$f;
_dewExec$f = true;
exports$f = y.EventEmitter;
return exports$f;
}
import { y } from './chunk-4bd36a8f.js';
import './chunk-ce0fbc82.js';
import { X } from './chunk-b4205b57.js';
import { p as process } from './chunk-2eac56ff.js';
import { a as e$1 } from './chunk-4ccc3a29.js';

var exports$2$1 = {},
_dewExec$2$1 = false;
Expand Down Expand Up @@ -277,23 +229,23 @@ function dew$1$1() {
return exports$1$1;
}

var exports$e = {},
_dewExec$e = false;
function dew$e() {
if (_dewExec$e) return exports$e;
_dewExec$e = true;
var exports$g = {},
_dewExec$g = false;
function dew$g() {
if (_dewExec$g) return exports$g;
_dewExec$g = true;

const base64 = dew$2$1();

const ieee754 = dew$1$1();

const customInspectSymbol = typeof Symbol === "function" && typeof Symbol["for"] === "function" ? Symbol["for"]("nodejs.util.inspect.custom") // eslint-disable-line dot-notation
: null;
exports$e.Buffer = Buffer;
exports$e.SlowBuffer = SlowBuffer;
exports$e.INSPECT_MAX_BYTES = 50;
exports$g.Buffer = Buffer;
exports$g.SlowBuffer = SlowBuffer;
exports$g.INSPECT_MAX_BYTES = 50;
const K_MAX_LENGTH = 2147483647;
exports$e.kMaxLength = K_MAX_LENGTH;
exports$g.kMaxLength = K_MAX_LENGTH;
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
Expand Down Expand Up @@ -903,7 +855,7 @@ function dew$e() {

Buffer.prototype.inspect = function inspect() {
let str = "";
const max = exports$e.INSPECT_MAX_BYTES;
const max = exports$g.INSPECT_MAX_BYTES;
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
if (this.length > max) str += " ... ";
return "<Buffer " + str + ">";
Expand Down Expand Up @@ -2353,15 +2305,63 @@ function dew$e() {
throw new Error("BigInt not supported");
}

return exports$e;
return exports$g;
}

var buffer = dew$e();
var buffer = dew$g();

buffer.Buffer;
buffer.INSPECT_MAX_BYTES;
buffer.kMaxLength;

var exports$f = {},
_dewExec$f = false;
function dew$f() {
if (_dewExec$f) return exports$f;
_dewExec$f = true;

if (typeof Object.create === "function") {
// implementation from standard node.js 'util' module
exports$f = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor;
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
}
};
} else {
// old school shim for old browsers
exports$f = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor;

var TempCtor = function () {};

TempCtor.prototype = superCtor.prototype;
ctor.prototype = new TempCtor();
ctor.prototype.constructor = ctor;
}
};
}

return exports$f;
}

var exports$e = {},
_dewExec$e = false;
function dew$e() {
if (_dewExec$e) return exports$e;
_dewExec$e = true;
exports$e = y.EventEmitter;
return exports$e;
}

var exports$d = {},
_dewExec$d = false;
function dew$d() {
Expand Down Expand Up @@ -3029,7 +3029,7 @@ function dew$8() {

/*<replacement>*/

var Stream = dew$f();
var Stream = dew$e();
/*</replacement>*/


Expand Down Expand Up @@ -3062,7 +3062,7 @@ function dew$8() {

var errorOrDestroy = destroyImpl.errorOrDestroy;

dew$g()(Writable, Stream);
dew$f()(Writable, Stream);

function nop() {}

Expand Down Expand Up @@ -3691,7 +3691,7 @@ function dew$7() {

var Writable = dew$8();

dew$g()(Duplex, Readable);
dew$f()(Duplex, Readable);

{
// Allow the keys array to be GC'ed.
Expand Down Expand Up @@ -4166,7 +4166,7 @@ function dew$3() {
/*<replacement>*/


var Stream = dew$f();
var Stream = dew$e();
/*</replacement>*/


Expand Down Expand Up @@ -4213,7 +4213,7 @@ function dew$3() {
var createReadableStreamAsyncIterator;
var from;

dew$g()(Readable, Stream);
dew$f()(Readable, Stream);

var errorOrDestroy = destroyImpl.errorOrDestroy;
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
Expand Down Expand Up @@ -5266,7 +5266,7 @@ function dew$2() {

var Duplex = dew$7();

dew$g()(Transform, Duplex);
dew$f()(Transform, Duplex);

function afterTransform(er, data) {
var ts = this._transformState;
Expand Down Expand Up @@ -5407,7 +5407,7 @@ function dew$1() {

var Transform = dew$2();

dew$g()(PassThrough, Transform);
dew$f()(PassThrough, Transform);

function PassThrough(options) {
if (!(this instanceof PassThrough)) return new PassThrough(options);
Expand Down Expand Up @@ -5522,4 +5522,4 @@ function dew() {
return exports;
}

export { dew$8 as a, dew$7 as b, dew$2 as c, dew$3 as d, dew$1 as e, dew$6 as f, dew as g, dew$g as h, buffer as i };
export { dew$3 as a, buffer as b, dew$8 as c, dew$f as d, dew$7 as e, dew$2 as f, dew$1 as g, dew$6 as h, dew as i };
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit 1107a83

Please sign in to comment.