@effected/github-actions 0.9.1 → 0.9.2
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.
- package/CacheKey.js +6 -8
- package/package.json +1 -1
package/CacheKey.js
CHANGED
|
@@ -278,15 +278,13 @@ var CacheKey = class CacheKey extends Schema.Class("CacheKey")(Schema.Struct({
|
|
|
278
278
|
const fs = yield* FileSystem.FileSystem;
|
|
279
279
|
const ordered = [...new Set(files)].sort();
|
|
280
280
|
if (ordered.length === 0) return Option.none();
|
|
281
|
+
const digests = yield* Effect.all(ordered.map((path) => fs.readFile(path).pipe(Effect.mapError((cause) => new CacheKeyError({
|
|
282
|
+
reason: "readFailed",
|
|
283
|
+
path,
|
|
284
|
+
cause
|
|
285
|
+
})), Effect.map((bytes) => createHash("sha256").update(bytes).digest()))), { concurrency: 8 });
|
|
281
286
|
const accumulator = createHash("sha256");
|
|
282
|
-
for (const
|
|
283
|
-
const bytes = yield* fs.readFile(path).pipe(Effect.mapError((cause) => new CacheKeyError({
|
|
284
|
-
reason: "readFailed",
|
|
285
|
-
path,
|
|
286
|
-
cause
|
|
287
|
-
})));
|
|
288
|
-
accumulator.update(createHash("sha256").update(bytes).digest());
|
|
289
|
-
}
|
|
287
|
+
for (const digest of digests) accumulator.update(digest);
|
|
290
288
|
return Option.some(accumulator.digest("hex"));
|
|
291
289
|
});
|
|
292
290
|
/**
|
package/package.json
CHANGED