Skip to content

Commit cfd3da0

Browse files
isaacscoreyfarrell
authored andcommitted
fix: Remove vestigial environment variables (#1078)
This removes the NYC_ROOT_ID and NYC_INSTRUMENTER environment variables, which are no longer used or necessary. BREAKING CHANGE: Remove NYC_ROOT_ID and NYC_INSTRUMENTER environmental variables. BREAKING CHANGE: The `root` field has been removed from processinfo files.
1 parent fe3311b commit cfd3da0

File tree

5 files changed

+2
-10
lines changed

5 files changed

+2
-10
lines changed

bin/nyc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ if ([
4141
// https://github.com/istanbuljs/nyc/issues/951
4242
SPAWN_WRAP_SHIM_ROOT: process.env.SPAWN_WRAP_SHIM_ROOT || process.env.XDG_CACHE_HOME || require('os').homedir(),
4343
NYC_CONFIG: JSON.stringify(argv),
44-
NYC_CWD: process.cwd(),
45-
NYC_ROOT_ID: nyc.rootId,
46-
NYC_INSTRUMENTER: argv.instrumenter
44+
NYC_CWD: process.cwd()
4745
}
4846

4947
if (argv['babel-cache'] === false) {

bin/wrap.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ config.isChildProcess = true
88
config._processInfo = {
99
pid: process.pid,
1010
ppid: process.ppid,
11-
parent: process.env.NYC_PROCESS_ID || null,
12-
root: process.env.NYC_ROOT_ID
11+
parent: process.env.NYC_PROCESS_ID || null
1312
}
1413
if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
1514
config._processInfo.externalId = process.env.NYC_PROCESSINFO_EXTERNAL_ID

index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const rimraf = require('rimraf')
2121
const SourceMaps = require('./lib/source-maps')
2222
const testExclude = require('test-exclude')
2323
const util = require('util')
24-
const uuid = require('uuid/v4')
2524

2625
const debugLog = util.debuglog('nyc')
2726

@@ -89,7 +88,6 @@ class NYC {
8988
this.fakeRequire = null
9089

9190
this.processInfo = new ProcessInfo(config && config._processInfo)
92-
this.rootId = this.processInfo.root || uuid()
9391

9492
this.hashCache = {}
9593
}

lib/process.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ function ProcessInfo (defaults) {
1313
this.cwd = process.cwd()
1414
this.time = Date.now()
1515
this.ppid = null
16-
this.root = null
1716
this.coverageFilename = null
1817

1918
for (var key in defaults) {

test/processinfo.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ t.test('validate the created processinfo data', t => {
6565
execArgv: [],
6666
cwd: fixturesCLI,
6767
time: Number,
68-
root: /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/,
6968
coverageFilename: resolve(fixturesCLI, tmp, f),
7069
files: [ resolvedJS ]
7170
})
@@ -86,7 +85,6 @@ t.test('check out the index', t => {
8685
},
8786
externalIds: {
8887
blorp: {
89-
root: u,
9088
children: [ u, u, u, u, u, u, u, u ]
9189
}
9290
}

0 commit comments

Comments
 (0)