Skip to content

Commit

Permalink
chore(deps): bump glob from 7.2.3 to 9.1.0 (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Mar 4, 2023
1 parent 99f9884 commit 5895551
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ environment:
PLATFORM: x64
- NODEJS_VERSION: "16"
PLATFORM: x64
- NODEJS_VERSION: "14"
PLATFORM: x64

install:
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:NODEJS_VERSION) $env:PLATFORM
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)

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
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ 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')
Expand Down
2 changes: 1 addition & 1 deletion npm-run-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ const patterns = [
]

patterns.forEach(pattern => {
glob.sync(pattern)
glob.globSync(pattern)
.forEach((f) => rimraf(f))
})
Loading

0 comments on commit 5895551

Please sign in to comment.