From 1e08a3e72343feba8922da383e3e4e1f92236fcd Mon Sep 17 00:00:00 2001 From: Baptiste Gallet Date: Wed, 23 Oct 2019 16:18:30 +0200 Subject: [PATCH 1/3] Add support for relative path option --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 7193ba5cc..39b2fd32e 100755 --- a/index.js +++ b/index.js @@ -428,6 +428,7 @@ class NYC { reports.create(_reporter, { skipEmpty: this.config.skipEmpty, skipFull: this.config.skipFull, + relative: this.config.relative === 'true', maxCols: process.stdout.columns || 100 }).execute(context) }) From a7d31efbcd490b829aa0e75740db5aa5b26bdfba Mon Sep 17 00:00:00 2001 From: Baptiste Gallet Date: Wed, 20 Nov 2019 12:03:26 +0100 Subject: [PATCH 2/3] use projectRoot instead of relative --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 016a576fb..a86530a86 100755 --- a/index.js +++ b/index.js @@ -57,6 +57,7 @@ class NYC { this._showProcessTree = config.showProcessTree || false this._eagerInstantiation = config.eager || false this.cwd = config.cwd || process.cwd() + this.projectRoot = config.projectRoot || this.cwd this.reporter = [].concat(config.reporter || 'text') this.cacheDirectory = (config.cacheDir && path.resolve(config.cacheDir)) || findCacheDir({ name: 'nyc', cwd: this.cwd }) @@ -440,7 +441,7 @@ class NYC { reports.create(_reporter, { skipEmpty: this.config.skipEmpty, skipFull: this.config.skipFull, - relative: this.config.relative === 'true', + projectRoot: this.projectRoot, maxCols: process.stdout.columns || 100 }).execute(context) }) From ca85273926a7fde7aab6c6e82689bf0b33fe7164 Mon Sep 17 00:00:00 2001 From: bgalletbgallet Date: Tue, 17 Dec 2019 09:47:27 +0100 Subject: [PATCH 3/3] Update index.js --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index a86530a86..9b23adec7 100755 --- a/index.js +++ b/index.js @@ -57,7 +57,6 @@ class NYC { this._showProcessTree = config.showProcessTree || false this._eagerInstantiation = config.eager || false this.cwd = config.cwd || process.cwd() - this.projectRoot = config.projectRoot || this.cwd this.reporter = [].concat(config.reporter || 'text') this.cacheDirectory = (config.cacheDir && path.resolve(config.cacheDir)) || findCacheDir({ name: 'nyc', cwd: this.cwd }) @@ -441,7 +440,7 @@ class NYC { reports.create(_reporter, { skipEmpty: this.config.skipEmpty, skipFull: this.config.skipFull, - projectRoot: this.projectRoot, + projectRoot: this.cwd, maxCols: process.stdout.columns || 100 }).execute(context) })