@@ -319,7 +319,8 @@ function createHttpClient() {
319
319
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
320
320
}
321
321
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
322
- const components = paths;
322
+ // don't pass changes upstream
323
+ const components = paths.slice();
323
324
// Add compression method to cache version to restore
324
325
// compressed cache as per compression method
325
326
if (compressionMethod) {
@@ -608,26 +609,21 @@ function resolvePaths(patterns) {
608
609
implicitDescendants: false
609
610
});
610
611
try {
611
- for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
612
+ for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true ) {
612
613
_c = _g.value;
613
614
_e = false;
614
- try {
615
- const file = _c;
616
- const relativeFile = path
617
- .relative(workspace, file)
618
- .replace(new RegExp(`\\${path.sep}`, 'g'), '/');
619
- core.debug(`Matched: ${relativeFile}`);
620
- // Paths are made relative so the tar entries are all relative to the root of the workspace.
621
- if (relativeFile === '') {
622
- // path.relative returns empty string if workspace and file are equal
623
- paths.push('.');
624
- }
625
- else {
626
- paths.push(`${relativeFile}`);
627
- }
615
+ const file = _c;
616
+ const relativeFile = path
617
+ .relative(workspace, file)
618
+ .replace(new RegExp(`\\${path.sep}`, 'g'), '/');
619
+ core.debug(`Matched: ${relativeFile}`);
620
+ // Paths are made relative so the tar entries are all relative to the root of the workspace.
621
+ if (relativeFile === '') {
622
+ // path.relative returns empty string if workspace and file are equal
623
+ paths.push('.');
628
624
}
629
- finally {
630
- _e = true ;
625
+ else {
626
+ paths.push(`${relativeFile}`) ;
631
627
}
632
628
}
633
629
}
@@ -711,7 +707,10 @@ function assertDefined(name, value) {
711
707
exports.assertDefined = assertDefined;
712
708
function isGhes() {
713
709
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
714
- return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
710
+ const hostname = ghUrl.hostname.trimEnd().toUpperCase();
711
+ const isGitHubHost = hostname === 'GITHUB.COM';
712
+ const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
713
+ return !isGitHubHost && !isGheHost;
715
714
}
716
715
exports.isGhes = isGhes;
717
716
//# sourceMappingURL=cacheUtils.js.map
@@ -729,20 +728,20 @@ var CacheFilename;
729
728
(function (CacheFilename) {
730
729
CacheFilename["Gzip"] = "cache.tgz";
731
730
CacheFilename["Zstd"] = "cache.tzst";
732
- })(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
731
+ })(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
733
732
var CompressionMethod;
734
733
(function (CompressionMethod) {
735
734
CompressionMethod["Gzip"] = "gzip";
736
735
// Long range mode was added to zstd in v1.3.2.
737
736
// This enum is for earlier version of zstd that does not have --long support
738
737
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
739
738
CompressionMethod["Zstd"] = "zstd";
740
- })(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
739
+ })(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
741
740
var ArchiveToolType;
742
741
(function (ArchiveToolType) {
743
742
ArchiveToolType["GNU"] = "gnu";
744
743
ArchiveToolType["BSD"] = "bsd";
745
- })(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
744
+ })(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
746
745
// The default number of retry attempts.
747
746
exports.DefaultRetryAttempts = 2;
748
747
// The default delay in milliseconds between retry attempts.
@@ -8551,7 +8550,7 @@ class HttpClient {
8551
8550
if (this._keepAlive && useProxy) {
8552
8551
agent = this._proxyAgent;
8553
8552
}
8554
- if (this._keepAlive && !useProxy) {
8553
+ if (!useProxy) {
8555
8554
agent = this._agent;
8556
8555
}
8557
8556
// if agent is already assigned use that agent.
@@ -8583,16 +8582,12 @@ class HttpClient {
8583
8582
agent = tunnelAgent(agentOptions);
8584
8583
this._proxyAgent = agent;
8585
8584
}
8586
- // if reusing agent across request and tunneling agent isn't assigned create a new agent
8587
- if (this._keepAlive && !agent) {
8585
+ // if tunneling agent isn't assigned create a new agent
8586
+ if (!agent) {
8588
8587
const options = { keepAlive: this._keepAlive, maxSockets };
8589
8588
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
8590
8589
this._agent = agent;
8591
8590
}
8592
- // if not using private agent and tunnel agent isn't setup then use global agent
8593
- if (!agent) {
8594
- agent = usingSsl ? https.globalAgent : http.globalAgent;
8595
- }
8596
8591
if (usingSsl && this._ignoreSslError) {
8597
8592
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
8598
8593
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
@@ -55566,35 +55561,43 @@ const coerce = (version, options) => {
55566
55561
55567
55562
let match = null
55568
55563
if (!options.rtl) {
55569
- match = version.match(re[t.COERCE])
55564
+ match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
55570
55565
} else {
55571
55566
// Find the right-most coercible string that does not share
55572
55567
// a terminus with a more left-ward coercible string.
55573
55568
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
55569
+ // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
55574
55570
//
55575
55571
// Walk through the string checking with a /g regexp
55576
55572
// Manually set the index so as to pick up overlapping matches.
55577
55573
// Stop when we get a match that ends at the string end, since no
55578
55574
// coercible string can be more right-ward without the same terminus.
55575
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
55579
55576
let next
55580
- while ((next = re[t.COERCERTL] .exec(version)) &&
55577
+ while ((next = coerceRtlRegex .exec(version)) &&
55581
55578
(!match || match.index + match[0].length !== version.length)
55582
55579
) {
55583
55580
if (!match ||
55584
55581
next.index + next[0].length !== match.index + match[0].length) {
55585
55582
match = next
55586
55583
}
55587
- re[t.COERCERTL] .lastIndex = next.index + next[1].length + next[2].length
55584
+ coerceRtlRegex .lastIndex = next.index + next[1].length + next[2].length
55588
55585
}
55589
55586
// leave it in a clean state
55590
- re[t.COERCERTL] .lastIndex = -1
55587
+ coerceRtlRegex .lastIndex = -1
55591
55588
}
55592
55589
55593
55590
if (match === null) {
55594
55591
return null
55595
55592
}
55596
55593
55597
- return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
55594
+ const major = match[2]
55595
+ const minor = match[3] || '0'
55596
+ const patch = match[4] || '0'
55597
+ const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
55598
+ const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
55599
+
55600
+ return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
55598
55601
}
55599
55602
module.exports = coerce
55600
55603
@@ -56286,12 +56289,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
56286
56289
56287
56290
// Coercion.
56288
56291
// Extract anything that could conceivably be a part of a valid semver
56289
- createToken('COERCE ', `${'(^|[^\\d])' +
56292
+ createToken('COERCEPLAIN ', `${'(^|[^\\d])' +
56290
56293
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
56291
56294
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
56292
- `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
56295
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
56296
+ createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
56297
+ createToken('COERCEFULL', src[t.COERCEPLAIN] +
56298
+ `(?:${src[t.PRERELEASE]})?` +
56299
+ `(?:${src[t.BUILD]})?` +
56293
56300
`(?:$|[^\\d])`)
56294
56301
createToken('COERCERTL', src[t.COERCE], true)
56302
+ createToken('COERCERTLFULL', src[t.COERCEFULL], true)
56295
56303
56296
56304
// Tilde ranges.
56297
56305
// Meaning is "reasonably at or greater than"
@@ -70422,6 +70430,9 @@ function httpRedirectFetch (fetchParams, response) {
70422
70430
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
70423
70431
request.headersList.delete('authorization')
70424
70432
70433
+ // https://fetch.spec.whatwg.org/#authentication-entries
70434
+ request.headersList.delete('proxy-authorization', true)
70435
+
70425
70436
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
70426
70437
request.headersList.delete('cookie')
70427
70438
request.headersList.delete('host')
@@ -88028,9 +88039,9 @@ const sys = __importStar(__nccwpck_require__(5632));
88028
88039
const fs_1 = __importDefault(__nccwpck_require__(7147));
88029
88040
const os_1 = __importDefault(__nccwpck_require__(2037));
88030
88041
const utils_1 = __nccwpck_require__(1314);
88031
- function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch() ) {
88032
- var _a;
88033
- return __awaiter(this, void 0, void 0, function* () {
88042
+ function getGo(versionSpec_1, checkLatest_1, auth_1 ) {
88043
+ return __awaiter(this, arguments, void 0, function* (versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
88044
+ var _a;
88034
88045
let manifest;
88035
88046
const osPlat = os_1.default.platform();
88036
88047
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
@@ -88206,8 +88217,8 @@ function getManifest(auth) {
88206
88217
});
88207
88218
}
88208
88219
exports.getManifest = getManifest;
88209
- function getInfoFromManifest(versionSpec, stable, auth, arch = os_1.default.arch(), manifest ) {
88210
- return __awaiter(this, void 0 , void 0, function* () {
88220
+ function getInfoFromManifest(versionSpec_1, stable_1, auth_1 ) {
88221
+ return __awaiter(this, arguments , void 0, function* (versionSpec, stable, auth, arch = os_1.default.arch(), manifest ) {
88211
88222
let info = null;
88212
88223
if (!manifest) {
88213
88224
core.debug('No manifest cached');
@@ -88241,8 +88252,8 @@ function getInfoFromDist(versionSpec, arch) {
88241
88252
};
88242
88253
});
88243
88254
}
88244
- function findMatch(versionSpec, arch = os_1.default.arch() ) {
88245
- return __awaiter(this, void 0 , void 0, function* () {
88255
+ function findMatch(versionSpec_1 ) {
88256
+ return __awaiter(this, arguments , void 0, function* (versionSpec, arch = os_1.default.arch() ) {
88246
88257
const archFilter = sys.getArch(arch);
88247
88258
const platFilter = sys.getPlatform();
88248
88259
let result;
0 commit comments