This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const {EventEmitter, once} = require('events') | |
const fs = require('fs/promises') | |
const { | |
setImmediate: defer | |
, setTimeout: sleep | |
} = require('timers/promises') | |
const tap = require('tap') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const fs = require('fs').promises | |
const path = require('path') | |
async function* getPaths(p, depth = 0) { | |
const dir = await fs.opendir(p, { | |
bufferSize: 1 | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/v8/src/base/platform/platform-macos.cc b/deps/v8/src/base/platform/platform-macos.cc | |
index bee6b30f7c..055da2605e 100644 | |
--- a/deps/v8/src/base/platform/platform-macos.cc | |
+++ b/deps/v8/src/base/platform/platform-macos.cc | |
@@ -49,7 +49,7 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() { | |
for (unsigned int i = 0; i < images_count; ++i) { | |
const mach_header* header = _dyld_get_image_header(i); | |
if (header == nullptr) continue; | |
-#if V8_HOST_ARCH_X64 | |
+#if V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Mac", | |
"intelliSenseMode": "clang-x64", | |
"cppStandard": "gnu++14", | |
"includePath": [ | |
"src/**", | |
"deps/histogram/src/", | |
"deps/uvwasi/include/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const http = require('http') | |
const url = require('url') | |
function random(ar) { | |
return ar[Math.floor(Math.random() * ar.length)] | |
} | |
function createDownstream() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const Module = require('module') | |
const original = Module.prototype.require | |
const items = new Map() | |
function sorter(a, b) { | |
if (a < b) return -1 | |
if (a > b) return 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const {promisify} = require('util') | |
const args = process.argv.splice(2) | |
for (const arg of args) { | |
if (arg === 'async-listener') require('async-listener') | |
} | |
const sleep = promisify(setTimeout) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const EE = require('events') | |
const emit = EE.prototype.emit | |
EE.prototype.emit = function(name, ...args) { | |
if (this.constructor) { | |
console.log('EMIT', this.constructor.name, name) | |
} else { | |
console.log('EMIT', '<unknown>', name) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After | |
const {test} = require('tap') | |
test('GET /users', async (t) => { | |
const user_state = {} | |
const {body: org} = await request | |
.post('/organizations') | |
.expect(200) | |
NewerOlder