Skip to content

Commit

Permalink
fix: harmonize npm name usage in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed May 5, 2023
1 parent ad8e313 commit 1b7b27a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74479,7 +74479,7 @@ const noLockFile = () => {
process.exit(1)
}

// enforce the same NPM cache folder across different operating systems
// enforce the same npm cache folder across different operating systems
const NPM_CACHE_FOLDER = path.join(homeDirectory, '.npm')
const getNpmCache = () => {
const o = {}
Expand All @@ -74505,7 +74505,7 @@ const getNpmCache = () => {
o.inputPath = NPM_CACHE_FOLDER
}

// use exact restore key to prevent NPM cache from growing
// use exact restore key to prevent npm cache from growing
// https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/
o.restoreKeys = o.primaryKey = key
return o
Expand All @@ -74532,21 +74532,21 @@ const getCypressBinaryCache = () => {
}

const restoreCachedNpm = () => {
debug('trying to restore cached NPM modules')
debug('trying to restore cached npm modules')
const NPM_CACHE = getNpmCache()
return restoreCache([NPM_CACHE.inputPath], NPM_CACHE.primaryKey, [
NPM_CACHE.restoreKeys
]).catch((e) => {
console.warn('Restoring NPM cache error: %s', e.message)
console.warn('Restoring npm cache error: %s', e.message)
})
}

const saveCachedNpm = () => {
debug('saving NPM modules')
debug('saving npm modules')
const NPM_CACHE = getNpmCache()
return saveCache([NPM_CACHE.inputPath], NPM_CACHE.primaryKey).catch(
(e) => {
console.warn('Saving NPM cache error: %s', e.message)
console.warn('Saving npm cache error: %s', e.message)
}
)
}
Expand Down Expand Up @@ -74584,7 +74584,7 @@ const install = () => {
// prevent lots of progress messages during install
core.exportVariable('CI', '1')
core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER)
// set NPM cache path in case the user has custom install command
// set npm cache path in case the user has custom install command
core.exportVariable('npm_config_cache', NPM_CACHE_FOLDER)

// Note: need to quote found tool to avoid Windows choking on
Expand All @@ -74596,7 +74596,7 @@ const install = () => {
}

if (useYarn()) {
debug('installing NPM dependencies using Yarn')
debug('installing npm dependencies using Yarn')
return io.which('yarn', true).then((yarnPath) => {
debug(`yarn at "${yarnPath}"`)
return exec.exec(
Expand All @@ -74606,7 +74606,7 @@ const install = () => {
)
})
} else if (usePnpm()) {
debug('installing NPM dependencies using pnpm')
debug('installing npm dependencies using pnpm')
return io.which('pnpm', true).then((pnpmPath) => {
debug(`pnpm at "${pnpmPath}"`)
return exec.exec(
Expand All @@ -74616,7 +74616,7 @@ const install = () => {
)
})
} else {
debug('installing NPM dependencies')
debug('installing npm dependencies')
return io.which('npm', true).then((npmPath) => {
debug(`npm at "${npmPath}"`)
return exec.exec(quote(npmPath), ['ci'], cypressCommandOptions)
Expand Down Expand Up @@ -75033,7 +75033,7 @@ const runTests = async () => {
return runTestsUsingCommandLine()
}

debug('Running Cypress tests using NPM module API')
debug('Running Cypress tests using Module API')
debug(`requiring cypress dependency, cwd is ${process.cwd()}`)
debug(`working directory ${workingDirectory}`)
debug(`resolved cypress ${cypressModulePath}`)
Expand Down
22 changes: 11 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const noLockFile = () => {
process.exit(1)
}

// enforce the same NPM cache folder across different operating systems
// enforce the same npm cache folder across different operating systems
const NPM_CACHE_FOLDER = path.join(homeDirectory, '.npm')
const getNpmCache = () => {
const o = {}
Expand All @@ -154,7 +154,7 @@ const getNpmCache = () => {
o.inputPath = NPM_CACHE_FOLDER
}

// use exact restore key to prevent NPM cache from growing
// use exact restore key to prevent npm cache from growing
// https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/
o.restoreKeys = o.primaryKey = key
return o
Expand All @@ -181,21 +181,21 @@ const getCypressBinaryCache = () => {
}

const restoreCachedNpm = () => {
debug('trying to restore cached NPM modules')
debug('trying to restore cached npm modules')
const NPM_CACHE = getNpmCache()
return restoreCache([NPM_CACHE.inputPath], NPM_CACHE.primaryKey, [
NPM_CACHE.restoreKeys
]).catch((e) => {
console.warn('Restoring NPM cache error: %s', e.message)
console.warn('Restoring npm cache error: %s', e.message)
})
}

const saveCachedNpm = () => {
debug('saving NPM modules')
debug('saving npm modules')
const NPM_CACHE = getNpmCache()
return saveCache([NPM_CACHE.inputPath], NPM_CACHE.primaryKey).catch(
(e) => {
console.warn('Saving NPM cache error: %s', e.message)
console.warn('Saving npm cache error: %s', e.message)
}
)
}
Expand Down Expand Up @@ -233,7 +233,7 @@ const install = () => {
// prevent lots of progress messages during install
core.exportVariable('CI', '1')
core.exportVariable('CYPRESS_CACHE_FOLDER', CYPRESS_CACHE_FOLDER)
// set NPM cache path in case the user has custom install command
// set npm cache path in case the user has custom install command
core.exportVariable('npm_config_cache', NPM_CACHE_FOLDER)

// Note: need to quote found tool to avoid Windows choking on
Expand All @@ -245,7 +245,7 @@ const install = () => {
}

if (useYarn()) {
debug('installing NPM dependencies using Yarn')
debug('installing npm dependencies using Yarn')
return io.which('yarn', true).then((yarnPath) => {
debug(`yarn at "${yarnPath}"`)
return exec.exec(
Expand All @@ -255,7 +255,7 @@ const install = () => {
)
})
} else if (usePnpm()) {
debug('installing NPM dependencies using pnpm')
debug('installing npm dependencies using pnpm')
return io.which('pnpm', true).then((pnpmPath) => {
debug(`pnpm at "${pnpmPath}"`)
return exec.exec(
Expand All @@ -265,7 +265,7 @@ const install = () => {
)
})
} else {
debug('installing NPM dependencies')
debug('installing npm dependencies')
return io.which('npm', true).then((npmPath) => {
debug(`npm at "${npmPath}"`)
return exec.exec(quote(npmPath), ['ci'], cypressCommandOptions)
Expand Down Expand Up @@ -682,7 +682,7 @@ const runTests = async () => {
return runTestsUsingCommandLine()
}

debug('Running Cypress tests using NPM module API')
debug('Running Cypress tests using Module API')
debug(`requiring cypress dependency, cwd is ${process.cwd()}`)
debug(`working directory ${workingDirectory}`)
debug(`resolved cypress ${cypressModulePath}`)
Expand Down

0 comments on commit 1b7b27a

Please sign in to comment.