Skip to content

Commit

Permalink
fix: Remove vestigial environment variables (#1078)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
isaacs authored and coreyfarrell committed May 10, 2019
1 parent fe3311b commit cfd3da0
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
4 changes: 1 addition & 3 deletions bin/nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ if ([
// https://github.com/istanbuljs/nyc/issues/951
SPAWN_WRAP_SHIM_ROOT: process.env.SPAWN_WRAP_SHIM_ROOT || process.env.XDG_CACHE_HOME || require('os').homedir(),
NYC_CONFIG: JSON.stringify(argv),
NYC_CWD: process.cwd(),
NYC_ROOT_ID: nyc.rootId,
NYC_INSTRUMENTER: argv.instrumenter
NYC_CWD: process.cwd()
}

if (argv['babel-cache'] === false) {
Expand Down
3 changes: 1 addition & 2 deletions bin/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ config.isChildProcess = true
config._processInfo = {
pid: process.pid,
ppid: process.ppid,
parent: process.env.NYC_PROCESS_ID || null,
root: process.env.NYC_ROOT_ID
parent: process.env.NYC_PROCESS_ID || null
}
if (process.env.NYC_PROCESSINFO_EXTERNAL_ID) {
config._processInfo.externalId = process.env.NYC_PROCESSINFO_EXTERNAL_ID
Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const rimraf = require('rimraf')
const SourceMaps = require('./lib/source-maps')
const testExclude = require('test-exclude')
const util = require('util')
const uuid = require('uuid/v4')

const debugLog = util.debuglog('nyc')

Expand Down Expand Up @@ -89,7 +88,6 @@ class NYC {
this.fakeRequire = null

this.processInfo = new ProcessInfo(config && config._processInfo)
this.rootId = this.processInfo.root || uuid()

this.hashCache = {}
}
Expand Down
1 change: 0 additions & 1 deletion lib/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function ProcessInfo (defaults) {
this.cwd = process.cwd()
this.time = Date.now()
this.ppid = null
this.root = null
this.coverageFilename = null

for (var key in defaults) {
Expand Down
2 changes: 0 additions & 2 deletions test/processinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ t.test('validate the created processinfo data', t => {
execArgv: [],
cwd: fixturesCLI,
time: Number,
root: /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/,
coverageFilename: resolve(fixturesCLI, tmp, f),
files: [ resolvedJS ]
})
Expand All @@ -86,7 +85,6 @@ t.test('check out the index', t => {
},
externalIds: {
blorp: {
root: u,
children: [ u, u, u, u, u, u, u, u ]
}
}
Expand Down

0 comments on commit cfd3da0

Please sign in to comment.