Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: security patches and ci improvement #1487

Open
wants to merge 94 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
ab34ca8
revert: chore: remove package-lock.json
cschanaj Aug 26, 2022
31500bb
chore(deps): run npm audit fix
cschanaj Aug 26, 2022
1176f51
chore(deps): upgrade tap and fix test script
cschanaj Aug 26, 2022
1c9fc3b
ci: add node.js github workflow
cschanaj Aug 26, 2022
c0ad222
ci: disable npm update-notifier message
cschanaj Aug 26, 2022
dc08e96
ci: update .github/workflows/node.js.yml
cschanaj Aug 26, 2022
f4e8b72
ci: get ride of tap deprecation warning
cschanaj Aug 26, 2022
c6e20c3
fix: add an empty ending newline
cschanaj Aug 26, 2022
4e79f68
chore(deps-dev): bump deprecate package [email protected]
cschanaj Aug 26, 2022
bfa9f22
fix: add an empty ending newline
cschanaj Aug 26, 2022
96ff578
ci: run test on node 10
cschanaj Aug 26, 2022
c25dbf1
revert: ci: run test on node 10
cschanaj Aug 26, 2022
f4d6f9c
chore(deps): run npm audit fix --force
cschanaj Aug 26, 2022
6e6d28c
ci: add .github/dependabot.yml
cschanaj Aug 26, 2022
151dc1a
ci: update .github/dependabot.yml
cschanaj Aug 26, 2022
9b827f4
ci: run node workflow on node lts as well
cschanaj Aug 26, 2022
c8f7efd
chore(deps): bump istanbul-reports from 3.0.2 to 3.1.5 (#9)
dependabot[bot] Aug 26, 2022
88bcaa0
chore(deps): bump istanbul-lib-source-maps from 4.0.0 to 4.0.1 (#8)
dependabot[bot] Aug 26, 2022
f32fc19
chore(deps): bump istanbul-lib-instrument from 4.0.3 to 5.2.0 (#7)
dependabot[bot] Aug 26, 2022
19bb979
chore(deps): bump yargs from 15.3.1 to 17.5.1 (#5)
dependabot[bot] Aug 26, 2022
63c9578
chore(deps): update standard from 14.3.1 to 17.0.0 (#10)
cschanaj Aug 26, 2022
ea1bf96
chore(deps): update decamelize from 1.2.0 to 5.0.1 (#11)
cschanaj Aug 26, 2022
5b22d6d
ci: update appveyor.yml (#12)
cschanaj Aug 30, 2022
973a07b
fix: update appveyor.yml (#13)
cschanaj Aug 30, 2022
a72306d
ci: update appveyor.yml (#15)
cschanaj Aug 31, 2022
a7258e3
ci: nodejs workflow on macos-latest (#14)
cschanaj Aug 31, 2022
1e55d48
chore(deps): bump glob from 7.1.6 to 8.0.3 (#20)
dependabot[bot] Sep 4, 2022
43ee97e
chore(deps): bump convert-source-map from 1.7.0 to 1.8.0 (#19)
dependabot[bot] Sep 4, 2022
0fd7df6
chore(deps-dev): bump source-map-support from 0.5.19 to 0.5.21 (#17)
dependabot[bot] Sep 4, 2022
6490dba
revert: "chore(deps): bump glob from 7.1.6 to 8.0.3 (#20)"
cschanaj Oct 2, 2022
a1f9958
ci: update dependabot schedule to quarterly
cschanaj Oct 2, 2022
24c7964
chore(deps-dev): bump uuid from 8.3.2 to 9.0.0 (#23)
dependabot[bot] Oct 2, 2022
25a5d60
chore(deps): bump yargs from 17.5.1 to 17.6.0 (#22)
dependabot[bot] Oct 2, 2022
db0bf00
revert: "ci: update dependabot schedule to quarterly"
cschanaj Oct 2, 2022
c4b3b37
chore(deps): bump istanbul-lib-processinfo from 2.0.2 to 2.0.3 (#27)
dependabot[bot] Oct 2, 2022
2189e9b
chore(deps): bump @istanbuljs/schema from 0.1.2 to 0.1.3 (#24)
dependabot[bot] Oct 2, 2022
e6eea6e
chore(deps): bump p-map from 3.0.0 to 4.0.0 (#25)
dependabot[bot] Oct 2, 2022
3d6b990
chore(deps): bump find-cache-dir from 3.3.1 to 3.3.2 (#26)
dependabot[bot] Oct 2, 2022
7d30254
chore(deps): bump @istanbuljs/load-nyc-config from 1.0.0 to 1.1.0 (#28)
dependabot[bot] Oct 2, 2022
25b6d1c
chore(deps): bump find-up from 4.1.0 to 5.0.0 (#21)
dependabot[bot] Oct 2, 2022
520a747
ci: remove node 12
cschanaj Dec 4, 2022
f925da6
chore(deps-dev): bump tap from 16.3.0 to 16.3.2 (#32)
dependabot[bot] Dec 4, 2022
e342ed9
ci: fix appveyor npm issue
cschanaj Dec 4, 2022
5a90d14
ci: fix appveyor npm upgrade issue
cschanaj Dec 4, 2022
bd28e61
revert: ci: fix appveyor npm issue
cschanaj Dec 4, 2022
7a68fdd
ci: remove node 12 from appveyor build
cschanaj Dec 4, 2022
dbc3190
chore(deps): bump glob from 7.1.6 to 8.0.3 (#31)
dependabot[bot] Dec 4, 2022
86f8432
chore(deps): bump yargs from 17.6.0 to 17.6.2 (#33)
dependabot[bot] Dec 4, 2022
04d1ab4
chore(deps): bump convert-source-map from 1.8.0 to 2.0.0 (#30)
dependabot[bot] Dec 4, 2022
341deeb
fix: breakage due to glob version changes
cschanaj Dec 4, 2022
8c5845b
ci: breakage due to glob version changes again
cschanaj Dec 4, 2022
7cf5ed3
revert: "chore(deps): bump glob from 7.1.6 to 8.0.3 (#31)"
cschanaj Dec 4, 2022
95b309d
revert: "ci: breakage due to glob version changes again"
cschanaj Dec 4, 2022
b532e5c
revert: "fix: breakage due to glob version changes"
cschanaj Dec 4, 2022
29f1714
chore(deps): bump istanbul-lib-instrument from 5.2.0 to 5.2.1 (#36)
dependabot[bot] Feb 1, 2023
ec38faf
chore(deps-dev): bump which from 2.0.2 to 3.0.0 (#34)
dependabot[bot] Feb 1, 2023
681da47
chore(deps): bump rimraf from 3.0.2 to 4.1.2
dependabot[bot] Feb 1, 2023
1acad2b
chore(deps-dev): bump tap from 16.3.2 to 16.3.4 (#37)
dependabot[bot] Feb 5, 2023
44b1a3f
fix: no longer need to promisify rimraf since v4
cschanaj Feb 5, 2023
e0dc7f6
Merge pull request #38 from cschanaj/dependabot/npm_and_yarn/rimraf-4…
dependabot[bot] Feb 5, 2023
b0a6cda
fix: npm-run-clean.js not working on windows
cschanaj Feb 5, 2023
ce76279
chore(deps): bump glob from 7.1.6 to 7.2.3 (#39)
dependabot[bot] Feb 5, 2023
99f9884
chore(deps): bump yargs from 17.6.2 to 17.7.1 (#42)
dependabot[bot] Mar 4, 2023
5895551
chore(deps): bump glob from 7.2.3 to 9.1.0 (#41)
dependabot[bot] Mar 4, 2023
7bbb915
fix: toggle glob windowsPathsNoEscape to true
cschanaj Mar 4, 2023
27931c0
deps: npm audit fix json5 and qs
cschanaj Mar 4, 2023
a028d42
chore: update engines.node in package.json
cschanaj Mar 4, 2023
b8d6fc7
ci: repalce travis appveyor with nodejs action (#43)
cschanaj Mar 5, 2023
11b6844
chore(deps): bump yargs from 17.7.1 to 17.7.2 (#48)
dependabot[bot] Jun 29, 2023
b3be4d3
chore(deps): bump glob from 9.1.0 to 10.2.6 (#51)
dependabot[bot] Jun 29, 2023
eabc98f
chore(deps): bump rimraf from 4.1.2 to 5.0.1 (#52)
dependabot[bot] Jun 29, 2023
1d49bc6
chore(deps-dev): bump tap from 16.3.4 to 16.3.7 (#53)
dependabot[bot] Jul 2, 2023
90d223e
chore(deps-dev): bump which from 3.0.0 to 3.0.1 (#54)
dependabot[bot] Jul 2, 2023
92e2fed
chore(deps-dev): bump standard from 17.0.0 to 17.1.0 (#55)
dependabot[bot] Jul 2, 2023
8bfa79d
chore(deps-dev): bump tap from 16.3.7 to 16.3.8 (#56)
dependabot[bot] Aug 6, 2023
98c6b5f
chore(deps): bump glob from 10.2.6 to 10.3.3 (#57)
dependabot[bot] Aug 6, 2023
8f4306a
chore(deps): bump signal-exit from 3.0.7 to 4.1.0 (#58)
dependabot[bot] Aug 6, 2023
9466197
ci!: run test on node/20.x and v4 github actions (#64)
cschanaj Dec 2, 2023
1e0987d
chore(deps): bump glob from 10.3.3 to 10.3.10 (#62)
dependabot[bot] Dec 2, 2023
c451119
chore(deps-dev): bump which from 3.0.1 to 4.0.0 (#60)
dependabot[bot] Dec 2, 2023
0a7293f
chore(deps): bump istanbul-lib-report from 3.0.0 to 3.0.1 (#59)
dependabot[bot] Dec 2, 2023
59d6b91
chore: github action for npm publish
cschanaj Dec 2, 2023
9e091d3
chore!: update min node version to node/18.x
cschanaj Dec 2, 2023
a02bafc
docs: update README.md to indicate project status
cschanaj Dec 2, 2023
db1c261
v17.0.0
cschanaj Dec 2, 2023
92aa807
ci: npm publish action with node/lts
cschanaj Dec 2, 2023
6b4db61
17.0.1
cschanaj Dec 2, 2023
e3dfe34
ci: update npm-publish.yml to update npm
cschanaj Dec 2, 2023
334f0a1
17.0.2
cschanaj Dec 2, 2023
6808e6f
chore(deps): bump p-map from 4.0.0 to 6.0.0 (#46)
dependabot[bot] Dec 3, 2023
dc21cdf
chore(deps): bump p-map from 6.0.0 to 7.0.1 (#67)
dependabot[bot] Feb 3, 2024
359234f
chore(deps): bump istanbul-lib-coverage from 3.2.0 to 3.2.2 (#69)
dependabot[bot] Feb 3, 2024
8db0204
chore(deps): bump rimraf from 5.0.1 to 5.0.5 (#71)
dependabot[bot] Jul 13, 2024
b95de88
chore(deps): bump make-dir from 3.1.0 to 4.0.0 (#72)
dependabot[bot] Jul 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
commit-message:
prefix: chore
prefix-development: chore
include: scope
34 changes: 34 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install -g npm
# Use latest npm versions
- run: npm ci
- run: npm run build --if-present
- run: npm test
35 changes: 35 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm install -g npm
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- run: npm install -g npm
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ test/build/
self-coverage/
*.swp
needs-transpile.js
tap-snapshots/test/
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock=false
update-notifier=false
1 change: 0 additions & 1 deletion .taprc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"jobs": 1,
"timeout": 360,
"bail": false,
"esm": false,
"node-arg": [
"--require",
"./self-coverage-helper.js"
Expand Down
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# nyc

[![Build Status](https://img.shields.io/travis/istanbuljs/nyc/master.svg)](https://travis-ci.org/istanbuljs/nyc)
[![Windows Build Status](https://img.shields.io/appveyor/ci/istanbuljs/nyc/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/istanbuljs/nyc/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/github/istanbuljs/nyc/master.svg)](https://coveralls.io/r/istanbuljs/nyc?branch=master)
[![NPM version](https://img.shields.io/npm/v/nyc.svg)](https://www.npmjs.com/package/nyc)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![community slack](https://devtoolscommunity.herokuapp.com/badge.svg)](https://devtoolscommunity.herokuapp.com)

_Having problems? want to contribute? join our [community slack](https://devtoolscommunity.herokuapp.com)_.

### This fork is maintained on best-effort basis. Please seek alternatives and migrate away ASAP.

![Node.js CI / build](https://github.com/cschanaj/nyc/actions/workflows/node.js.yml/badge.svg)

Istanbul's state of the art command line interface, with support for:

Expand Down
31 changes: 0 additions & 31 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion bin/nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function main () {
if (!argv.instrument) argv.instrumenter = './lib/instrumenters/noop'
else argv.instrumenter = './lib/instrumenters/istanbul'

var nyc = (new NYC(argv))
const nyc = (new NYC(argv))
if (argv.clean) {
await nyc.reset()
} else {
Expand Down
15 changes: 6 additions & 9 deletions build-self-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path')
const fs = require('fs')
const istanbul = require('istanbul-lib-instrument')
const makeDir = require('make-dir')
const glob = require('glob')
const { glob } = require('glob')

const instrumenter = istanbul.createInstrumenter({
coverageVariable: '___NYC_SELF_COVERAGE___',
Expand All @@ -22,23 +22,20 @@ function instrumentFile (name) {
fs.writeFileSync(outputPath, instrumentedSource)
}

function instrumentGlob (pattern) {
const result = glob.sync(pattern, {
cwd: __dirname,
nodir: true
})
async function instrumentGlob (pattern) {
const result = await glob(pattern, { windowsPathsNoEscape: true })

result.forEach(file => {
instrumentFile(file)
})
}

function instrumentAll () {
async function instrumentAll () {
/* package.json is just being copied so the instrumented copy of lib/hash.js can find it. */
const globPatterns = ['package.json', 'index.js', 'bin/*.js', 'lib/**/*.js']

globPatterns.forEach(pattern => {
instrumentGlob(pattern)
await globPatterns.forEach(async pattern => {
await instrumentGlob(pattern)
})
}

Expand Down
35 changes: 19 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ const cachingTransform = require('caching-transform')
const findCacheDir = require('find-cache-dir')
const fs = require('./lib/fs-promises')
const os = require('os')
const { debuglog, promisify } = require('util')
const glob = promisify(require('glob'))
const { debuglog } = require('util')
const { glob } = require('glob')
const Hash = require('./lib/hash')
const libCoverage = require('istanbul-lib-coverage')
const libHook = require('istanbul-lib-hook')
const { ProcessInfo, ProcessDB } = require('istanbul-lib-processinfo')
const mkdirp = require('make-dir')
const Module = require('module')
const onExit = require('signal-exit')
const { onExit } = require('signal-exit')
const path = require('path')
const rimraf = promisify(require('rimraf'))
const { rimraf } = require('rimraf')
const SourceMaps = require('./lib/source-maps')
const TestExclude = require('test-exclude')
const pMap = require('p-map')
const getPackageType = require('get-package-type')

const debugLog = debuglog('nyc')
Expand All @@ -32,7 +31,7 @@ const selfCoverageHelper = global[nycSelfCoverageHelper] || {
}

function coverageFinder () {
var coverage = global.__coverage__
let coverage = global.__coverage__
if (typeof __coverage__ === 'object') coverage = __coverage__
if (!coverage) coverage = global.__coverage__ = {}
return coverage
Expand Down Expand Up @@ -105,7 +104,7 @@ class NYC {
// when running --all we should not load source-file from
// cache, we want to instead return the fake source.
disableCache: this._disableCachingTransform(),
ext: ext
ext
}
if (this._eagerInstantiation) {
opts.transform = this._transformFactory(this.cacheDirectory)
Expand Down Expand Up @@ -153,8 +152,8 @@ class NYC {
}

_readTranspiledSource (filePath) {
var source = null
var ext = path.extname(filePath)
let source = null
let ext = path.extname(filePath)
if (typeof Module._extensions[ext] === 'undefined') {
ext = '.js'
}
Expand Down Expand Up @@ -182,7 +181,7 @@ class NYC {
this._loadAdditionalModules()

this.fakeRequire = true
const files = await this.exclude.glob(this.cwd)
const files = await this.exclude.glob(this.cwd, { windowsPathsNoEscape: true })
for (const relFile of files) {
const filename = path.resolve(this.cwd, relFile)
const ext = path.extname(filename)
Expand Down Expand Up @@ -233,17 +232,19 @@ class NYC {
this._loadAdditionalModules()

const stats = await fs.lstat(input)
const { default: pMap } = await import('p-map')
if (stats.isDirectory()) {
inputDir = input

const filesToInstrument = await this.exclude.glob(input)
const filesToInstrument = await this.exclude.glob(input, { windowsPathsNoEscape: true })

const concurrency = output ? os.cpus().length : 1
if (this.config.completeCopy && output) {
const files = await glob(path.resolve(input, '**'), {
dot: true,
nodir: true,
ignore: ['**/.git', '**/.git/**', path.join(output, '**')]
ignore: ['**/.git', '**/.git/**', path.join(output, '**')],
windowsPathsNoEscape: true
})
const destDirs = new Set(
files.map(src => path.dirname(path.join(output, path.relative(input, src))))
Expand Down Expand Up @@ -386,7 +387,7 @@ class NYC {
}

writeCoverageFile () {
var coverage = coverageFinder()
const coverage = coverageFinder()

// Remove any files that should be excluded but snuck into the coverage
Object.keys(coverage).forEach(function (absFile) {
Expand All @@ -403,8 +404,8 @@ class NYC {
}, this)
}

var id = this.processInfo.uuid
var coverageFilename = path.resolve(this.tempDirectory(), id + '.json')
const id = this.processInfo.uuid
const coverageFilename = path.resolve(this.tempDirectory(), id + '.json')

fs.writeFileSync(
coverageFilename,
Expand All @@ -420,6 +421,7 @@ class NYC {
async getCoverageMapFromAllCoverageFiles (baseDirectory) {
const map = libCoverage.createCoverageMap({})
const files = await this.coverageFiles(baseDirectory)
const { default: pMap } = await import('p-map')

await pMap(
files,
Expand Down Expand Up @@ -493,7 +495,7 @@ class NYC {

_checkCoverage (summary, thresholds, file) {
Object.keys(thresholds).forEach(function (key) {
var coverage = summary[key].pct
const coverage = summary[key].pct
if (coverage < thresholds[key]) {
process.exitCode = 1
if (file) {
Expand Down Expand Up @@ -522,6 +524,7 @@ class NYC {
// TODO: Remove from nyc v16
async coverageData (baseDirectory) {
const files = await this.coverageFiles(baseDirectory)
const { default: pMap } = await import('p-map')
return pMap(
files,
f => this.coverageFileLoad(f, baseDirectory),
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
option.alias = setup.nycAlias
}

const optionName = decamelize(name, '-')
const optionName = decamelize(name, { separator: '-' })
yargs.option(optionName, option)
if (!setup.nycCommands.includes(command)) {
yargs.hide(optionName)
Expand Down
3 changes: 1 addition & 2 deletions lib/commands/instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

const NYC = require('../../index.js')
const path = require('path')
const { promisify } = require('util')
const resolveFrom = require('resolve-from')
const rimraf = promisify(require('rimraf'))
const { rimraf } = require('rimraf')
const { cliWrapper, setupOptions } = require('./helpers.js')

exports.command = 'instrument <input> [output]'
Expand Down
2 changes: 1 addition & 1 deletion lib/commands/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports.builder = function (yargs) {

exports.handler = cliWrapper(async argv => {
process.env.NYC_CWD = process.cwd()
var nyc = new NYC(argv)
const nyc = new NYC(argv)
await nyc.report().catch(suppressEPIPE)
if (argv.checkCoverage) {
await nyc.checkCoverage({
Expand Down
4 changes: 2 additions & 2 deletions lib/instrumenters/istanbul.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ function InstrumenterIstanbul (options) {

return {
instrumentSync (code, filename, { sourceMap, registerMap }) {
var instrumented = instrumenter.instrumentSync(code, filename, sourceMap)
let instrumented = instrumenter.instrumentSync(code, filename, sourceMap)
if (instrumented !== code) {
registerMap()
}

// the instrumenter can optionally produce source maps,
// this is useful for features like remapping stack-traces.
if (options.produceSourceMap) {
var lastSourceMap = instrumenter.lastSourceMap()
const lastSourceMap = instrumenter.lastSourceMap()
/* istanbul ignore else */
if (lastSourceMap) {
instrumented += '\n' + convertSourceMap.fromObject(lastSourceMap).toComment()
Expand Down
Loading