@cypress/github-action 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +22 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -74706,6 +74706,7 @@ const yarnFilename = path.join(
74706
74706
  findYarnWorkspaceRoot(workingDirectory) || workingDirectory,
74707
74707
  'yarn.lock'
74708
74708
  )
74709
+ const pnpmLockFilename = path.join(workingDirectory, 'pnpm-lock.yaml')
74709
74710
  const packageLockFilename = path.join(
74710
74711
  workingDirectory,
74711
74712
  'package-lock.json'
@@ -74713,8 +74714,14 @@ const packageLockFilename = path.join(
74713
74714
 
74714
74715
  const useYarn = () => fs.existsSync(yarnFilename)
74715
74716
 
74717
+ const usePnpm = () => fs.existsSync(pnpmLockFilename)
74718
+
74716
74719
  const lockHash = () => {
74717
- const lockFilename = useYarn() ? yarnFilename : packageLockFilename
74720
+ const lockFilename = useYarn()
74721
+ ? yarnFilename
74722
+ : usePnpm()
74723
+ ? pnpmLockFilename
74724
+ : packageLockFilename
74718
74725
  const fileHash = hasha.fromFileSync(lockFilename)
74719
74726
  debug(`Hash from file ${lockFilename} is ${fileHash}`)
74720
74727
  return fileHash
@@ -74729,6 +74736,8 @@ const getNpmCache = () => {
74729
74736
  if (!key) {
74730
74737
  if (useYarn()) {
74731
74738
  key = `yarn-${platformAndArch}-${hash}`
74739
+ } else if (usePnpm()) {
74740
+ key = `pnpm-${platformAndArch}-${hash}`
74732
74741
  } else {
74733
74742
  key = `npm-${platformAndArch}-${hash}`
74734
74743
  }
@@ -74738,6 +74747,8 @@ const getNpmCache = () => {
74738
74747
 
74739
74748
  if (useYarn()) {
74740
74749
  o.inputPath = path.join(homeDirectory, '.cache', 'yarn')
74750
+ } else if (usePnpm()) {
74751
+ o.inputPath = NPM_CACHE_FOLDER
74741
74752
  } else {
74742
74753
  o.inputPath = NPM_CACHE_FOLDER
74743
74754
  }
@@ -74842,9 +74853,18 @@ const install = () => {
74842
74853
  cypressCommandOptions
74843
74854
  )
74844
74855
  })
74856
+ } else if (usePnpm()) {
74857
+ debug('installing NPM dependencies using pnpm')
74858
+ return io.which('pnpm', true).then((pnpmPath) => {
74859
+ debug(`pnpm at "${pnpmPath}"`)
74860
+ return exec.exec(
74861
+ quote(pnpmPath),
74862
+ ['install', '--frozen-lockfile'],
74863
+ cypressCommandOptions
74864
+ )
74865
+ })
74845
74866
  } else {
74846
74867
  debug('installing NPM dependencies')
74847
-
74848
74868
  return io.which('npm', true).then((npmPath) => {
74849
74869
  debug(`npm at "${npmPath}"`)
74850
74870
  return exec.exec(quote(npmPath), ['ci'], cypressCommandOptions)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "GitHub Action for running Cypress end-to-end tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",