This file contains 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
foo\bar 000644 000765 000024 00000000000 14102565404 013002 0 ustar 00isaacs staff 000000 000000 |
This file contains 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/index.js b/index.js | |
index 56cbd66..b88f64b 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -8,6 +8,7 @@ const EOF = Symbol('EOF') | |
const MAYBE_EMIT_END = Symbol('maybeEmitEnd') | |
const EMITTED_END = Symbol('emittedEnd') | |
const EMITTING_END = Symbol('emittingEnd') | |
+const EMITTED_ERROR = Symbol('emittedError') | |
const CLOSED = Symbol('closed') |
This file contains 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/index.js b/index.js | |
index 56cbd66..b88f64b 100644 | |
--- a/index.js | |
+++ b/index.js | |
@@ -8,6 +8,7 @@ const EOF = Symbol('EOF') | |
const MAYBE_EMIT_END = Symbol('maybeEmitEnd') | |
const EMITTED_END = Symbol('emittedEnd') | |
const EMITTING_END = Symbol('emittingEnd') | |
+const EMITTED_ERROR = Symbol('emittedError') | |
const CLOSED = Symbol('closed') |
This file contains 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
#!/usr/bin/env node | |
const re = /\/+$/ | |
const batchStrings = [ | |
new Array(Math.pow(2, 20) + 1).join('/'), | |
new Array(Math.pow(2, 18) + 1).join('/'), | |
new Array(Math.pow(2, 17) + 1).join('/'), | |
new Array(Math.pow(2, 16) + 1).join('/'), | |
new Array(Math.pow(2, 15) + 1).join('/'), | |
new Array(Math.pow(2, 14) + 1).join('/'), |
This file contains 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
$ tree | |
. | |
โโโ .npmrc | |
โโโ foo | |
โ โโโ .npmrc | |
โ โโโ a | |
โ โ โโโ b | |
โ โ โโโ c | |
โ โ โโโ d | |
โ โ โโโ e |
This file contains 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 npa = require('npm-package-arg') | |
const semver = require('semver') | |
const { checkEngine } = require('npm-install-checks') | |
const engineOk = (manifest, npmVersion, nodeVersion) => { | |
try { | |
checkEngine(manifest, npmVersion, nodeVersion) | |
return true |
This file contains 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
#!/bin/bash | |
mkdir -p gh-274/folder1 | |
touch gh-274/folder1/main.js | |
touch gh-274/index.js | |
tree gh-274/ | |
node - <<JS | |
const tar = require('./') | |
tar.c({ |
This file contains 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
const fs = require('fs') | |
const gfs = require('./') | |
const filename = 'foo' | |
console.log('starting') | |
// fill up the set of available file descriptors | |
const fds = [] | |
while (true) { | |
try { | |
fds.push(fs.openSync(filename, 'w')) |
This file contains 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
const {promisify} = require('util') | |
const rpj = promisify(require('read-package-json')) | |
const rpjf = require('read-package-json-fast') | |
const pj = require.resolve('./package.json') | |
Promise.all([ | |
rpj(pj), | |
rpjf(pj), | |
]).then(console.log) |
This file contains 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
#!/usr/bin/env node | |
const doFlush = process.argv.includes('flush') | |
const child = () => { | |
const N = 1e6 | |
for (let i = 0; i < N; i++) { | |
const arr = [i,i,i,i,i,i,i,i,i,i] | |
const a = arr.toString() + ' ' + arr.length |