mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 09:56:46 +00:00
Regex update to fix #719
This commit is contained in:
parent
51ab6d2e30
commit
4dcdbcdee6
6 changed files with 86 additions and 207 deletions
20
dist/setup/index.js
vendored
20
dist/setup/index.js
vendored
|
@ -102143,6 +102143,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830)
|
|||
const { File: UndiciFile } = __nccwpck_require__(78511)
|
||||
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
|
||||
|
||||
let random
|
||||
try {
|
||||
const crypto = __nccwpck_require__(6005)
|
||||
random = (max) => crypto.randomInt(0, max)
|
||||
} catch {
|
||||
random = (max) => Math.floor(Math.random(max))
|
||||
}
|
||||
|
||||
let ReadableStream = globalThis.ReadableStream
|
||||
|
||||
/** @type {globalThis['File']} */
|
||||
|
@ -102228,7 +102236,7 @@ function extractBody (object, keepalive = false) {
|
|||
// Set source to a copy of the bytes held by object.
|
||||
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
|
||||
} else if (util.isFormDataLike(object)) {
|
||||
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
|
||||
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
|
||||
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
|
||||
|
||||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
@ -135072,7 +135080,7 @@ function getVersionFromFileContent(content, distributionName, versionFile) {
|
|||
const versionFileName = getFileName(versionFile);
|
||||
if (versionFileName == '.tool-versions') {
|
||||
javaVersionRegExp =
|
||||
/^(java\s+)(?:\S*-)?v?(?<version>(\d+)(\.\d+)?(\.\d+)?(\+\d+)?(-ea(\.\d+)?)?)$/m;
|
||||
/^(java\s+)(?:(?<distribution>\S+)-)?(?<version>\d+\.\d+\.\d+(\.\d+)?)(\+\d+(\.\d+)?)?(-[a-zA-Z0-9]+)?(\.LTS)?$/m;
|
||||
}
|
||||
else {
|
||||
javaVersionRegExp = /(?<version>(?<=(^|\s|-))(\d+\S*))(\s|$)/;
|
||||
|
@ -135253,6 +135261,14 @@ module.exports = require("net");
|
|||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6005:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = require("node:crypto");
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 15673:
|
||||
/***/ ((module) => {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue