From 781e8d91ab29deb65464798965e49853f963b561 Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Thu, 12 Mar 2026 18:11:51 +0100 Subject: [PATCH] try reverting pipeline change --- dist/restore/index.js | 9 ++++----- dist/save/index.js | 9 ++++----- src/config.ts | 7 ++++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index ae97e99..aeb1b47 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) { // EXTERNAL MODULE: external "fs/promises" var promises_ = __nccwpck_require__(91943); var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_); -;// CONCATENATED MODULE: external "stream/promises" -const external_stream_promises_namespaceObject = require("stream/promises"); ;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js /*! * Copyright (c) Squirrel Chat et al., All rights reserved. @@ -249750,7 +249748,6 @@ class Workspace { - const HOME = external_os_default().homedir(); const config_CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo"); const STATE_CONFIG = "RUST_CACHE_CONFIG"; @@ -249812,7 +249809,7 @@ class CacheConfig { key += `-${inputKey}`; } const job = process.env.GITHUB_JOB; - if ((job) && getInput("add-job-id-key").toLowerCase() == "true") { + if (job && getInput("add-job-id-key").toLowerCase() == "true") { key += `-${job}`; } } @@ -249951,7 +249948,9 @@ class CacheConfig { } keyFiles = sort_and_uniq(keyFiles); for (const file of keyFiles) { - await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher); + for await (const chunk of (0,external_fs_.createReadStream)(file)) { + hasher.update(chunk); + } } keyFiles.push(...parsedKeyFiles); self.keyFiles = sort_and_uniq(keyFiles); diff --git a/dist/save/index.js b/dist/save/index.js index 0c7c302..086922b 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -204269,8 +204269,6 @@ function glob_hashFiles(patterns_1) { // EXTERNAL MODULE: external "fs/promises" var promises_ = __nccwpck_require__(91943); var promises_default = /*#__PURE__*/__nccwpck_require__.n(promises_); -;// CONCATENATED MODULE: external "stream/promises" -const external_stream_promises_namespaceObject = require("stream/promises"); ;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js /*! * Copyright (c) Squirrel Chat et al., All rights reserved. @@ -249750,7 +249748,6 @@ class Workspace { - const HOME = external_os_default().homedir(); const CARGO_HOME = process.env.CARGO_HOME || external_path_default().join(HOME, ".cargo"); const STATE_CONFIG = "RUST_CACHE_CONFIG"; @@ -249812,7 +249809,7 @@ class CacheConfig { key += `-${inputKey}`; } const job = process.env.GITHUB_JOB; - if ((job) && getInput("add-job-id-key").toLowerCase() == "true") { + if (job && getInput("add-job-id-key").toLowerCase() == "true") { key += `-${job}`; } } @@ -249951,7 +249948,9 @@ class CacheConfig { } keyFiles = sort_and_uniq(keyFiles); for (const file of keyFiles) { - await (0,external_stream_promises_namespaceObject.pipeline)((0,external_fs_.createReadStream)(file), hasher); + for await (const chunk of (0,external_fs_.createReadStream)(file)) { + hasher.update(chunk); + } } keyFiles.push(...parsedKeyFiles); self.keyFiles = sort_and_uniq(keyFiles); diff --git a/src/config.ts b/src/config.ts index d562033..482a043 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,7 +3,6 @@ import * as glob from "@actions/glob"; import crypto from "crypto"; import fs from "fs/promises"; import { createReadStream } from "fs"; -import { pipeline } from "stream/promises"; import os from "os"; import path from "path"; import * as toml from "smol-toml"; @@ -84,7 +83,7 @@ export class CacheConfig { } const job = process.env.GITHUB_JOB; - if ((job) && core.getInput("add-job-id-key").toLowerCase() == "true") { + if (job && core.getInput("add-job-id-key").toLowerCase() == "true") { key += `-${job}`; } } @@ -256,7 +255,9 @@ export class CacheConfig { keyFiles = sort_and_uniq(keyFiles); for (const file of keyFiles) { - await pipeline(createReadStream(file), hasher); + for await (const chunk of createReadStream(file)) { + hasher.update(chunk); + } } keyFiles.push(...parsedKeyFiles);