MCPcopy Create free account
hub / github.com/cypress-io/github-action / lockHash

Function lockHash

index.js:109–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107const useNpm = () => fs.existsSync(packageLockFilename)
108
109const lockHash = () => {
110 const lockFilename = useYarn()
111 ? yarnFilename
112 : usePnpm()
113 ? pnpmLockFilename
114 : useNpm()
115 ? packageLockFilename
116 : noLockFile()
117 const fileHash = hasha.fromFileSync(lockFilename)
118 debug(`Hash from file ${lockFilename} is ${fileHash}`)
119 return fileHash
120}
121
122const noLockFile = () => {
123 core.error(

Callers 2

getNpmCacheFunction · 0.85
getCypressBinaryCacheFunction · 0.85

Calls 4

useYarnFunction · 0.85
usePnpmFunction · 0.85
useNpmFunction · 0.85
noLockFileFunction · 0.85

Tested by

no test coverage detected