From aa065255ef60b41b43ed84bf7ede151c035a7467 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Mon, 12 Sep 2016 22:57:24 -0700 Subject: [PATCH] fix: upgrade to newer versions of source-map, signal-exit, and instrument (somewhat frightening) --- package.json | 6 +++--- test/fixtures/check-instrumented.js | 2 +- .../conf-multiple-extensions/check-instrumented.es6 | 2 +- .../check-instrumented.foo.bar | 2 +- test/src/nyc-test.js | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 34ad66882..c14dbc3e1 100644 --- a/package.json +++ b/package.json @@ -83,9 +83,9 @@ "glob": "^7.0.6", "istanbul-lib-coverage": "^1.0.0", "istanbul-lib-hook": "^1.0.0-alpha.4", - "istanbul-lib-instrument": "^1.1.1", + "istanbul-lib-instrument": "^1.1.3", "istanbul-lib-report": "^1.0.0-alpha.3", - "istanbul-lib-source-maps": "^1.0.0", + "istanbul-lib-source-maps": "^1.0.1", "istanbul-reports": "^1.0.0-alpha.8", "md5-hex": "^1.2.0", "micromatch": "^2.3.11", @@ -93,7 +93,7 @@ "pkg-up": "^1.0.0", "resolve-from": "^2.0.0", "rimraf": "^2.5.4", - "signal-exit": "^3.0.0", + "signal-exit": "^3.0.1", "spawn-wrap": "^1.2.4", "test-exclude": "^2.1.2", "yargs": "^5.0.0", diff --git a/test/fixtures/check-instrumented.js b/test/fixtures/check-instrumented.js index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/check-instrumented.js +++ b/test/fixtures/check-instrumented.js @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } diff --git a/test/fixtures/conf-multiple-extensions/check-instrumented.es6 b/test/fixtures/conf-multiple-extensions/check-instrumented.es6 index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/conf-multiple-extensions/check-instrumented.es6 +++ b/test/fixtures/conf-multiple-extensions/check-instrumented.es6 @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } diff --git a/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar b/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar index 4e91f940d..b36853cbb 100644 --- a/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar +++ b/test/fixtures/conf-multiple-extensions/check-instrumented.foo.bar @@ -3,5 +3,5 @@ function probe () {} // When instrumented there will be references to variables like // __cov_pwkoI2PYHp3LJXkn_erl1Q in the probe() source. module.exports = function () { - return /\b__cov_\B/.test(probe + '') + return /\bcov_\B/.test(probe + '') } diff --git a/test/src/nyc-test.js b/test/src/nyc-test.js index 96320ebca..1fb06d683 100644 --- a/test/src/nyc-test.js +++ b/test/src/nyc-test.js @@ -314,8 +314,8 @@ describe('nyc', function () { var report = reports[0][notLoadedPath] reports.length.should.equal(1) + report.s['0'].should.equal(0) report.s['1'].should.equal(0) - report.s['2'].should.equal(0) return done() }) @@ -335,12 +335,12 @@ describe('nyc', function () { reports.length.should.equal(1) var report1 = reports[0][notLoadedPath1] + report1.s['0'].should.equal(0) report1.s['1'].should.equal(0) - report1.s['2'].should.equal(0) var report2 = reports[0][notLoadedPath2] + report2.s['0'].should.equal(0) report2.s['1'].should.equal(0) - report2.s['2'].should.equal(0) return done() }) @@ -361,8 +361,8 @@ describe('nyc', function () { var report = reports[0][notLoadedPath] reports.length.should.equal(1) + report.s['0'].should.equal(1) report.s['1'].should.equal(1) - report.s['2'].should.equal(1) return done() }) @@ -385,7 +385,7 @@ describe('nyc', function () { var report = reports[0][needsTranspilePath] reports.length.should.equal(1) - report.s['1'].should.equal(0) + report.s['0'].should.equal(0) fs.unlinkSync(needsTranspilePath) return done() @@ -414,7 +414,7 @@ describe('nyc', function () { var report = reports[0][needsTranspilePath] reports.length.should.equal(1) - report.s['1'].should.equal(0) + report.s['0'].should.equal(0) fs.unlinkSync(needsTranspilePath) return done()