Skip to content

Commit 781e8d9

Browse files
committed
try reverting pipeline change
1 parent 3d1fa46 commit 781e8d9

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

dist/restore/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) {
204269204269
// EXTERNAL MODULE: external "fs/promises"
204270204270
var promises_ = __nccwpck_require__(91943);
204271204271
var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_);
204272-
;// CONCATENATED MODULE: external "stream/promises"
204273-
const external_stream_promises_namespaceObject = require("stream/promises");
204274204272
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
204275204273
/*!
204276204274
* Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -249750,7 +249748,6 @@ class Workspace {
249750249748

249751249749

249752249750

249753-
249754249751
const HOME = external_os_default().homedir();
249755249752
const config_CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo");
249756249753
const STATE_CONFIG = "RUST_CACHE_CONFIG";
@@ -249812,7 +249809,7 @@ class CacheConfig {
249812249809
key += `-${inputKey}`;
249813249810
}
249814249811
const job = process.env.GITHUB_JOB;
249815-
if ((job) && getInput("add-job-id-key").toLowerCase() == "true") {
249812+
if (job && getInput("add-job-id-key").toLowerCase() == "true") {
249816249813
key += `-${job}`;
249817249814
}
249818249815
}
@@ -249951,7 +249948,9 @@ class CacheConfig {
249951249948
}
249952249949
keyFiles = sort_and_uniq(keyFiles);
249953249950
for (const file of keyFiles) {
249954-
await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher);
249951+
for await (const chunk of (0,external_fs_.createReadStream)(file)) {
249952+
hasher.update(chunk);
249953+
}
249955249954
}
249956249955
keyFiles.push(...parsedKeyFiles);
249957249956
self.keyFiles = sort_and_uniq(keyFiles);

dist/save/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) {
204269204269
// EXTERNAL MODULE: external "fs/promises"
204270204270
var promises_ = __nccwpck_require__(91943);
204271204271
var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_);
204272-
;// CONCATENATED MODULE: external "stream/promises"
204273-
const external_stream_promises_namespaceObject = require("stream/promises");
204274204272
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
204275204273
/*!
204276204274
* Copyright (c) Squirrel Chat et al., All rights reserved.
@@ -249750,7 +249748,6 @@ class Workspace {
249750249748

249751249749

249752249750

249753-
249754249751
const HOME = external_os_default().homedir();
249755249752
const CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo");
249756249753
const STATE_CONFIG = "RUST_CACHE_CONFIG";
@@ -249812,7 +249809,7 @@ class CacheConfig {
249812249809
key += `-${inputKey}`;
249813249810
}
249814249811
const job = process.env.GITHUB_JOB;
249815-
if ((job) && getInput("add-job-id-key").toLowerCase() == "true") {
249812+
if (job && getInput("add-job-id-key").toLowerCase() == "true") {
249816249813
key += `-${job}`;
249817249814
}
249818249815
}
@@ -249951,7 +249948,9 @@ class CacheConfig {
249951249948
}
249952249949
keyFiles = sort_and_uniq(keyFiles);
249953249950
for (const file of keyFiles) {
249954-
await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher);
249951+
for await (const chunk of (0,external_fs_.createReadStream)(file)) {
249952+
hasher.update(chunk);
249953+
}
249955249954
}
249956249955
keyFiles.push(...parsedKeyFiles);
249957249956
self.keyFiles = sort_and_uniq(keyFiles);

src/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as glob from "@actions/glob";
33
import crypto from "crypto";
44
import fs from "fs/promises";
55
import { createReadStream } from "fs";
6-
import { pipeline } from "stream/promises";
76
import os from "os";
87
import path from "path";
98
import * as toml from "smol-toml";
@@ -84,7 +83,7 @@ export class CacheConfig {
8483
}
8584

8685
const job = process.env.GITHUB_JOB;
87-
if ((job) && core.getInput("add-job-id-key").toLowerCase() == "true") {
86+
if (job && core.getInput("add-job-id-key").toLowerCase() == "true") {
8887
key += `-${job}`;
8988
}
9089
}
@@ -256,7 +255,9 @@ export class CacheConfig {
256255
keyFiles = sort_and_uniq(keyFiles);
257256

258257
for (const file of keyFiles) {
259-
await pipeline(createReadStream(file), hasher);
258+
for await (const chunk of createReadStream(file)) {
259+
hasher.update(chunk);
260+
}
260261
}
261262

262263
keyFiles.push(...parsedKeyFiles);

0 commit comments

Comments
 (0)