Comparing version 3.0.1-alpha.0 to 3.0.2-alpha.0
@@ -10,3 +10,3 @@ { | ||
}, | ||
"version": "3.0.1-alpha.0", | ||
"version": "3.0.2-alpha.0", | ||
"main": "lib/index.js", | ||
@@ -48,3 +48,3 @@ "bin": { | ||
}, | ||
"gitHead": "b67874e277f5f43c7cf4aa8e4e52565593e8025b" | ||
"gitHead": "7858341a8feea3ad48bcf48bed1dcd88f4dee811" | ||
} |
@@ -14,10 +14,4 @@ import { Hasher } from "backfill-hasher"; | ||
const config = createConfig(); | ||
const { | ||
outputGlob, | ||
packageRoot | ||
} = config; | ||
const hasher = new Hasher( | ||
{ packageRoot, outputGlob }, | ||
"ci-pipeline" | ||
); | ||
const { outputGlob, packageRoot } = config; | ||
const hasher = new Hasher({ packageRoot, outputGlob }, "ci-pipeline"); | ||
const hash = await hasher.createPackageHash(); | ||
@@ -38,10 +32,7 @@ return hash; | ||
} = config; | ||
const cacheStorage = getCacheStorageProvider( | ||
cacheStorageConfig, | ||
internalCacheFolder | ||
); | ||
const hasher = new Hasher( | ||
{ packageRoot, outputGlob }, | ||
"ci-pipeline" | ||
const cacheStorage = getCacheStorageProvider( | ||
cacheStorageConfig, | ||
internalCacheFolder | ||
); | ||
const hasher = new Hasher({ packageRoot, outputGlob }, "ci-pipeline"); | ||
const hash = await hasher.createPackageHash(); | ||
@@ -51,3 +42,6 @@ const fetch = await cacheStorage.fetch(hash); | ||
await fsExtra.mkdirp(path.join(packageRoot, "node_modules")); | ||
await fsExtra.writeJson(path.join(packageRoot, "node_modules", "cache-hit.json"), fetch); | ||
await fsExtra.writeJson( | ||
path.join(packageRoot, "node_modules", "cache-hit.json"), | ||
fetch | ||
); | ||
} | ||
@@ -63,5 +57,6 @@ | ||
fs.statSync(path.join(process.cwd(), "node_modules", "cache-hit.json")); | ||
const content = await fs.promises.readFile(path.join(process.cwd(), "node_modules", "cache-hit.json")); | ||
const content = await fs.promises.readFile( | ||
path.join(process.cwd(), "node_modules", "cache-hit.json") | ||
); | ||
return JSON.parse(content.toString()); | ||
} catch { | ||
@@ -74,2 +69,3 @@ return false; | ||
* Store the cache to the cache storage. | ||
* | ||
*/ | ||
@@ -84,10 +80,7 @@ export async function populateCache() { | ||
} = config; | ||
const cacheStorage = getCacheStorageProvider( | ||
cacheStorageConfig, | ||
internalCacheFolder | ||
); | ||
const hasher = new Hasher( | ||
{ packageRoot, outputGlob }, | ||
"ci-pipeline" | ||
const cacheStorage = getCacheStorageProvider( | ||
cacheStorageConfig, | ||
internalCacheFolder | ||
); | ||
const hasher = new Hasher({ packageRoot, outputGlob }, "ci-pipeline"); | ||
@@ -94,0 +87,0 @@ const hash = await hasher.createPackageHash(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240553
1018