Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
- updated most dependencies to their latest version
- didn't update to the last chalk version since it's in pure ESM
- modified calls to cosmiconfig since it's API changed exposing
  different objects for sync and async calls
- updated ignore to v5, and per the upgrade guide, I enabled relative
  paths manually.
  • Loading branch information
juanpcapurro committed Jan 18, 2023
1 parent afe7b6d commit 2ac73a1
Show file tree
Hide file tree
Showing 4 changed files with 4,739 additions and 6,263 deletions.
8 changes: 4 additions & 4 deletions lib/config/config-file.js
@@ -1,7 +1,7 @@
const path = require('path')
const fs = require('fs')
const _ = require('lodash')
const cosmiconfig = require('cosmiconfig')
const { cosmiconfigSync } = require('cosmiconfig')
const { ConfigMissingError } = require('../common/errors')
const packageJson = require('../../package.json')

Expand Down Expand Up @@ -51,14 +51,14 @@ const loadConfig = configFile => {
]
}

const explorer = cosmiconfig(moduleName, cosmiconfigOptions)
const explorer = cosmiconfigSync(moduleName, cosmiconfigOptions)

// if a specific path was specified, just load it and ignore default paths
if (configFile) {
return explorer.loadSync(configFile).config
return explorer.load(configFile).config
}

const searchedFor = explorer.searchSync(appDirectory)
const searchedFor = explorer.search(appDirectory)
if (!searchedFor) {
throw new ConfigMissingError()
}
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Expand Up @@ -59,7 +59,7 @@ function processFile(file, config) {
}

function processPath(path, config) {
const ignoreFilter = ignore().add(config.excludedFiles)
const ignoreFilter = ignore({allowRelativePaths: true}).add(config.excludedFiles)

const allFiles = glob.sync(path, {})
const files = ignoreFilter.filter(allFiles)
Expand Down

0 comments on commit 2ac73a1

Please sign in to comment.