mirror of
https://github.com/actions/setup-node.git
synced 2026-06-28 17:19:57 +00:00
Run npm run build as suggested
This commit is contained in:
parent
cbe3ec3ea1
commit
6ef1113e78
15
dist/setup/index.js
vendored
15
dist/setup/index.js
vendored
@ -73030,7 +73030,7 @@ const path_1 = __importDefault(__nccwpck_require__(1017));
|
|||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const constants_1 = __nccwpck_require__(9042);
|
const constants_1 = __nccwpck_require__(9042);
|
||||||
const cache_utils_1 = __nccwpck_require__(1678);
|
const cache_utils_1 = __nccwpck_require__(1678);
|
||||||
const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
|
const restoreCache = (packageManager, cacheDependencyPath, cacheInvalidateAfterDays) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
|
const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
|
||||||
if (!packageManagerInfo) {
|
if (!packageManagerInfo) {
|
||||||
throw new Error(`Caching for '${packageManager}' is not supported`);
|
throw new Error(`Caching for '${packageManager}' is not supported`);
|
||||||
@ -73044,9 +73044,15 @@ const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0,
|
|||||||
if (!fileHash) {
|
if (!fileHash) {
|
||||||
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
|
throw new Error('Some specified paths were not resolved, unable to cache dependencies.');
|
||||||
}
|
}
|
||||||
const keyPrefix = `${platform}-setup-node-`;
|
const numericCacheInvalidateAfterDays = cacheInvalidateAfterDays && cacheInvalidateAfterDays === '0'
|
||||||
|
? 0
|
||||||
|
: (parseInt(cacheInvalidateAfterDays || '', 10) || 120);
|
||||||
|
const timedInvalidationPrefix = numericCacheInvalidateAfterDays
|
||||||
|
? Math.floor(Date.now() / (1000 * 60 * 60 * 24 * numericCacheInvalidateAfterDays)) % 1000 // % 1000 to get a rolling prefix between 0 and 999 rather than a possibly infinitely large
|
||||||
|
: 0;
|
||||||
|
const keyPrefix = `${platform}-${timedInvalidationPrefix}-setup-node-`;
|
||||||
const primaryKey = `${keyPrefix}${packageManager}-${fileHash}`;
|
const primaryKey = `${keyPrefix}${packageManager}-${fileHash}`;
|
||||||
const restoreKeys = [`${keyPrefix}${packageManager}-`, keyPrefix];
|
const restoreKeys = [`${keyPrefix}${packageManager}-`];
|
||||||
core.debug(`primary key is ${primaryKey}`);
|
core.debug(`primary key is ${primaryKey}`);
|
||||||
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
core.saveState(constants_1.State.CachePrimaryKey, primaryKey);
|
||||||
const cacheKey = yield cache.restoreCache([cachePath], primaryKey, restoreKeys);
|
const cacheKey = yield cache.restoreCache([cachePath], primaryKey, restoreKeys);
|
||||||
@ -73981,7 +73987,8 @@ function run() {
|
|||||||
}
|
}
|
||||||
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
|
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
|
||||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||||
yield cache_restore_1.restoreCache(cache, cacheDependencyPath);
|
const cacheInvalidateAfterDays = core.getInput('cache-invalidate-after-days');
|
||||||
|
yield cache_restore_1.restoreCache(cache, cacheDependencyPath, cacheInvalidateAfterDays);
|
||||||
}
|
}
|
||||||
const matchersPath = path.join(__dirname, '../..', '.github');
|
const matchersPath = path.join(__dirname, '../..', '.github');
|
||||||
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user