Skip to content

Instantly share code, notes, and snippets.

View isaacs's full-sized avatar
🔮
only way out is through

isaacs isaacs

🔮
only way out is through
View GitHub Profile
diff --git a/lib/index.js b/lib/index.js
index 0bf91c1..70b9cbf 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -6,4 +6,4 @@ const { resolve } = require('path')
const eslintrc = resolve(__dirname, './.eslintrc.json')
const args = ['-c', eslintrc, ...process.argv.slice(2)]
const result = spawnSync(whichSync('eslint'), args, { stdio: 'inherit' })
-process.exitCode = result.exitCode
+process.exitCode = result.status
diff --cc lib/setup.js
index ebf498b,159dbda..0000000
--- a/lib/setup.js
+++ b/lib/setup.js
@@@ -1,9 -1,9 +1,16 @@@
#!/usr/bin/env node
const { resolve } = require('path')
+const cwd = process.cwd()
const { readdirSync, writeFileSync, existsSync } = require('fs')
const Node = require('./lib/node.js')
const gatherDepSet = require('./lib/gather-dep-set.js')
const tree = new Node({
path: '/some/path',
pkg: { name: 'root', version: '1.0.0', dependencies: { a: '', e: '' }},
children: [
{ pkg: { name: 'a', version: '1.0.0', dependencies: { b: '', c: '' }}},
{ pkg: { name: 'b', version: '1.0.0', dependencies: { d: '' }}},
{ pkg: { name: 'c', version: '1.0.0' }},
@isaacs
isaacs / y.js
Last active August 24, 2021 15:57
const Node = require('./lib/node.js')
const gatherDepSet = require('./lib/gather-dep-set.js')
const tree = new Node({
path: '/some/path/to/root',
pkg: { name: 'root', version: '1.0.0', dependencies: { a: '1', e: '1.x' }},
children: [
{ pkg: { name: 'a', version: '1.0.0', dependencies: { b: '1.x', c: '1.0.x' }}},
{ pkg: { name: 'b', version: '1.0.0', dependencies: { d: '1.0.0' }}},
{ pkg: { name: 'c', version: '1.0.0' }},
diff --git a/lib/arborist/reify.js b/lib/arborist/reify.js
index 965435f8..275563b3 100644
--- a/lib/arborist/reify.js
+++ b/lib/arborist/reify.js
@@ -326,6 +326,16 @@ module.exports = cls => class Reifier extends cls {
if (actual)
filterNodes.push(actual)
}
+ if (this[_includeWorkspaceRoot]) {
+ for (const tree of [this.idealTree, this.actualTree]) {
foo\bar000644 000765 000024 00000000000 14102565404 013002 0ustar00isaacsstaff000000 000000
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')
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')
#!/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('/'),