Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203780,8 +203780,6 @@ function glob_hashFiles(patterns_1) {
// EXTERNAL MODULE: external "fs/promises"
var promises_ = __nccwpck_require__(73292);
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.
Expand Down Expand Up @@ -249078,7 +249076,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";
Expand Down Expand Up @@ -249139,7 +249136,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}`;
}
}
Expand Down Expand Up @@ -249278,7 +249275,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);
Expand Down
9 changes: 4 additions & 5 deletions dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203769,8 +203769,6 @@ function glob_hashFiles(patterns_1) {
// EXTERNAL MODULE: external "fs/promises"
var promises_ = __nccwpck_require__(73292);
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.
Expand Down Expand Up @@ -249067,7 +249065,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";
Expand Down Expand Up @@ -249128,7 +249125,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}`;
}
}
Expand Down Expand Up @@ -249267,7 +249264,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);
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "rust-cache",
"version": "2.9.0",
"version": "2.9.1",
"description": "A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.",
"keywords": [
"actions",
Expand Down
7 changes: 4 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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}`;
}
}
Expand Down Expand Up @@ -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);
Expand Down
Loading