@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.
Files changed (2) hide show
  1. package/CacheKey.js +6 -8
  2. 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 path of ordered) {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/github-actions",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "private": false,
5
5
  "description": "The GitHub Actions runtime: env, inputs, outputs, state, logging, cache, artifacts, blob storage, OIDC and the token bridge.",
6
6
  "keywords": [