mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 12:54:45 +00:00
Merge 5993da79df
into a7c2d9473e
This commit is contained in:
commit
19873b42c4
4 changed files with 16 additions and 15 deletions
6
dist/setup/index.js
vendored
6
dist/setup/index.js
vendored
|
@ -96747,7 +96747,7 @@ const fs_1 = __importDefault(__nccwpck_require__(7147));
|
|||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||
const constants_1 = __nccwpck_require__(9042);
|
||||
const cache_utils_1 = __nccwpck_require__(1678);
|
||||
const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const restoreCache = (packageManager, cacheDependencyPath, nodeVersion) => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const packageManagerInfo = yield (0, cache_utils_1.getPackageManagerInfo)(packageManager);
|
||||
if (!packageManagerInfo) {
|
||||
throw new Error(`Caching for '${packageManager}' is not supported`);
|
||||
|
@ -96763,7 +96763,7 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0,
|
|||
if (!fileHash) {
|
||||
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
|
||||
}
|
||||
const keyPrefix = `node-cache-${platform}-${arch}-${packageManager}`;
|
||||
const keyPrefix = `node-cache-${platform}-${arch}-${nodeVersion}-${packageManager}`;
|
||||
const primaryKey = `${keyPrefix}-${fileHash}`;
|
||||
core.debug(`primary key is ${primaryKey}`);
|
||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||
|
@ -97913,7 +97913,7 @@ function run() {
|
|||
if (cache && (0, cache_utils_1.isCacheFeatureAvailable)()) {
|
||||
core.saveState(constants_1.State.CachePackageManager, cache);
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||
yield (0, cache_restore_1.restoreCache)(cache, cacheDependencyPath);
|
||||
yield (0, cache_restore_1.restoreCache)(cache, cacheDependencyPath, version);
|
||||
}
|
||||
const matchersPath = path.join(__dirname, '../..', '.github');
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue