mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
Bump smol-toml from 1.6.1 to 1.7.0 (#474)
* Bump smol-toml from 1.6.1 to 1.7.0 Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.6.1 to 1.7.0. - [Release notes](https://github.com/squirrelchat/smol-toml/releases) - [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: smol-toml dependency-version: 1.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Help Renovate out (exec 'npm run build-dist') --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
This commit is contained in:
Vendored
+305
-281
@@ -36511,184 +36511,6 @@ const parse = function (data, opts = {}) {
|
||||
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = '';
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, ' ');
|
||||
codeblock += ': ';
|
||||
codeblock += l;
|
||||
codeblock += '\n';
|
||||
if (i === line) {
|
||||
codeblock += ' '.repeat(numberLen + column + 2);
|
||||
codeblock += '^\n';
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
class TomlError extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}\n\n${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/util.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
function isEscaped(str, ptr) {
|
||||
let i = 0;
|
||||
while (str[ptr - ++i] === '\\')
|
||||
;
|
||||
return --i && (i % 2);
|
||||
}
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf('\n', start);
|
||||
if (str[idx - 1] === '\r')
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === '\n')
|
||||
return i;
|
||||
if (c === '\r' && str[i + 1] === '\n')
|
||||
return i + 1;
|
||||
if ((c < '\x20' && c !== '\t') || c === '\x7f') {
|
||||
throw new TomlError('control characters are not allowed in comments', {
|
||||
toml: str,
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === ' ' || c === '\t' || (!banNewLines && (c === '\n' || c === '\r' && str[ptr + 1] === '\n')))
|
||||
ptr++;
|
||||
// Tucking the return statement here would save 5 characters >:)
|
||||
// But TypeScript fails to detect there is no way to exit the loop so it complains about the lack of final return
|
||||
if (banComments || c !== '#')
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === '#') {
|
||||
i = indexOfNewline(str, i);
|
||||
}
|
||||
else if (c === sep) {
|
||||
return i + 1;
|
||||
}
|
||||
else if (c === end || (banNewLines && (c === '\n' || (c === '\r' && str[i + 1] === '\n')))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError('cannot find end of structure', {
|
||||
toml: str,
|
||||
ptr: ptr
|
||||
});
|
||||
}
|
||||
function getStringEnd(str, seek) {
|
||||
let first = str[seek];
|
||||
let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2]
|
||||
? str.slice(seek, seek + 3)
|
||||
: first;
|
||||
seek += target.length - 1;
|
||||
do
|
||||
seek = str.indexOf(target, ++seek);
|
||||
while (seek > -1 && first !== "'" && isEscaped(str, seek));
|
||||
if (seek > -1) {
|
||||
seek += target.length;
|
||||
if (target.length > 1) {
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
if (str[seek] === first)
|
||||
seek++;
|
||||
}
|
||||
}
|
||||
return seek;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/date.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -36817,7 +36639,72 @@ class TomlDate extends Date {
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
||||
//# sourceMappingURL=date.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
function getLineColFromPtr(string, ptr) {
|
||||
let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
|
||||
return [lines.length, lines.pop().length + 1];
|
||||
}
|
||||
function makeCodeBlock(string, line, column) {
|
||||
let lines = string.split(/\r\n|\n|\r/g);
|
||||
let codeblock = '';
|
||||
let numberLen = (Math.log10(line + 1) | 0) + 1;
|
||||
for (let i = line - 1; i <= line + 1; i++) {
|
||||
let l = lines[i - 1];
|
||||
if (!l)
|
||||
continue;
|
||||
codeblock += i.toString().padEnd(numberLen, ' ');
|
||||
codeblock += ': ';
|
||||
codeblock += l;
|
||||
codeblock += '\n';
|
||||
if (i === line) {
|
||||
codeblock += ' '.repeat(numberLen + column + 2);
|
||||
codeblock += '^\n';
|
||||
}
|
||||
}
|
||||
return codeblock;
|
||||
}
|
||||
class TomlError extends Error {
|
||||
line;
|
||||
column;
|
||||
codeblock;
|
||||
constructor(message, options) {
|
||||
const [line, column] = getLineColFromPtr(options.toml, options.ptr);
|
||||
const codeblock = makeCodeBlock(options.toml, line, column);
|
||||
super(`Invalid TOML document: ${message}\n\n${codeblock}`, options);
|
||||
this.line = line;
|
||||
this.column = column;
|
||||
this.codeblock = codeblock;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=error.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/primitive.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -36848,102 +36735,159 @@ class TomlDate extends Date {
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// let CTRL_REGEX = /[\x00-\x08\x0f-\x1f\x7f]/
|
||||
let INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
|
||||
let FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
|
||||
let LEADING_ZERO = /^[+-]?0[0-9_]/;
|
||||
let ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
|
||||
let ESC_MAP = {
|
||||
b: '\b',
|
||||
t: '\t',
|
||||
n: '\n',
|
||||
f: '\f',
|
||||
r: '\r',
|
||||
e: '\x1b',
|
||||
'"': '"',
|
||||
'\\': '\\',
|
||||
};
|
||||
function parseString(str, ptr = 0, endPtr = str.length) {
|
||||
let isLiteral = str[ptr] === '\'';
|
||||
let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
|
||||
function parseString(str, ptr) {
|
||||
let c = str[ptr++];
|
||||
let first = c;
|
||||
let isLiteral = c === "'";
|
||||
let isMultiline = c === str[ptr] && c === str[ptr + 1];
|
||||
if (isMultiline) {
|
||||
endPtr -= 2;
|
||||
if (str[ptr += 2] === '\r')
|
||||
ptr++;
|
||||
if (str[ptr] === '\n')
|
||||
// Trim initial newline
|
||||
if (str[ptr += 2] === '\n')
|
||||
ptr++;
|
||||
else if (str[ptr] === '\r' && str[ptr + 1] === '\n')
|
||||
ptr += 2;
|
||||
}
|
||||
let tmp = 0;
|
||||
let isEscape;
|
||||
/*
|
||||
The fast path does not seem to bring significant performance gains, so it's commented out.
|
||||
Kept for reference and/or future fafoing.
|
||||
|
||||
Without: spec 5.08 µs/iter 3.88 ipc (99.44% cache) 23.90 branch misses 28.61k cycles 111.01k instructions
|
||||
5MB 115.73 ms/iter 2.51 ipc (98.36% cache) 3.12M branch misses 619.30M cycles 1.56G instructions
|
||||
|
||||
With: spec 5.09 µs/iter 3.90 ipc (99.46% cache) 24.42 branch misses 28.57k cycles 111.49k instructions
|
||||
5MB 113.89 ms/iter 2.47 ipc (98.38% cache) 3.12M branch misses 611.94M cycles 1.51G instructions
|
||||
|
||||
if (c === "'") {
|
||||
// Literal strings fast path - no transform needs to occur; just grab the str and that's it
|
||||
let endPtr = str.indexOf(isMultiline ? "'''" : "'", ptr)
|
||||
if (endPtr < 0) {
|
||||
throw new TomlError("unfinished string literal", { toml: str, ptr })
|
||||
}
|
||||
|
||||
if (isMultiline) {
|
||||
// If the string ends with 4-5 quotes, then the first 1-2 are part of the string
|
||||
if (str[endPtr + 3] === "'") endPtr++
|
||||
if (str[endPtr + 3] === "'") endPtr++
|
||||
}
|
||||
|
||||
let string = str.slice(ptr, endPtr)
|
||||
if (CTRL_REGEX.test(string)) {
|
||||
let match = string.match(CTRL_REGEX)!
|
||||
throw new TomlError('control characters are not allowed in strings', { toml: str, ptr: ptr + (match.index ?? 0) })
|
||||
}
|
||||
return [string, endPtr + (isMultiline ? 3 : 1)]
|
||||
}
|
||||
*/
|
||||
let parsed = '';
|
||||
let sliceStart = ptr;
|
||||
while (ptr < endPtr - 1) {
|
||||
let c = str[ptr++];
|
||||
if (c === '\n' || (c === '\r' && str[ptr] === '\n')) {
|
||||
if (!isMultiline) {
|
||||
throw new TomlError('newlines are not allowed in strings', {
|
||||
toml: str,
|
||||
ptr: ptr - 1,
|
||||
});
|
||||
}
|
||||
// states:
|
||||
// 0 - decoding
|
||||
// 1 - decoding escape
|
||||
// 2 - whitespace escape (no newline encountered yet, must fail on non-whitespace)
|
||||
// 3 - whitespace escape (newline encountered, allowed to transition back to normal decode)
|
||||
let state = 0;
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
c = str[i];
|
||||
// Deal with newlines first, since that simplifies control character checking and handling across all states
|
||||
if (isMultiline && (c === '\n' || (c === '\r' && str[i + 1] === '\n'))) {
|
||||
state = state && 3;
|
||||
}
|
||||
// Control characters are banned in TOML, so we throw an error if we encounter them
|
||||
else if ((c < '\x20' && c !== '\t') || c === '\x7f') {
|
||||
throw new TomlError('control characters are not allowed in strings', {
|
||||
toml: str,
|
||||
ptr: ptr - 1,
|
||||
ptr: i,
|
||||
});
|
||||
}
|
||||
if (isEscape) {
|
||||
isEscape = false;
|
||||
if (c === 'x' || c === 'u' || c === 'U') {
|
||||
// Unicode escape
|
||||
let code = str.slice(ptr, (ptr += (c === 'x' ? 2 : c === 'u' ? 4 : 8)));
|
||||
if (!ESCAPE_REGEX.test(code)) {
|
||||
throw new TomlError('invalid unicode escape', {
|
||||
toml: str,
|
||||
ptr: tmp,
|
||||
});
|
||||
}
|
||||
try {
|
||||
parsed += String.fromCodePoint(parseInt(code, 16));
|
||||
}
|
||||
catch {
|
||||
throw new TomlError('invalid unicode escape', {
|
||||
toml: str,
|
||||
ptr: tmp,
|
||||
});
|
||||
}
|
||||
// The string might terminate while we're parsing through a newline escape.
|
||||
// It must have encountered a newline; otherwise, it'll simply fail in another branch.
|
||||
else if ((!state || state === 3) && c === first && (!isMultiline || (str[i + 1] === first && str[i + 2] === first))) {
|
||||
if (isMultiline) {
|
||||
// If the string ends with 4-5 quotes, then the first 1-2 are part of the string
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
if (str[i + 3] === first)
|
||||
i++;
|
||||
}
|
||||
else if (isMultiline && (c === '\n' || c === ' ' || c === '\t' || c === '\r')) {
|
||||
// Multiline escape
|
||||
ptr = skipVoid(str, ptr - 1, true);
|
||||
if (str[ptr] !== '\n' && str[ptr] !== '\r') {
|
||||
throw new TomlError('invalid escape: only line-ending whitespace may be escaped', {
|
||||
toml: str,
|
||||
ptr: tmp,
|
||||
});
|
||||
}
|
||||
ptr = skipVoid(str, ptr);
|
||||
return [
|
||||
// If we're in a newline escape still, then there's nothing to add.
|
||||
// Also try to avoid concat if there's nothing to add to parsed, or nothing has been added to parsed.
|
||||
state ? parsed : parsed + str.slice(sliceStart, i),
|
||||
i + (isMultiline ? 3 : 1),
|
||||
];
|
||||
}
|
||||
else if (!state) {
|
||||
if (!isLiteral && c === '\\') {
|
||||
parsed += str.slice(sliceStart, (sliceStart = i));
|
||||
state = 1;
|
||||
}
|
||||
else if (c in ESC_MAP) {
|
||||
// Classic escape
|
||||
parsed += ESC_MAP[c];
|
||||
}
|
||||
else if (state === 1) {
|
||||
if (c === 'x' || c === 'u' || c === 'U') { // Unicode escape
|
||||
let value = 0;
|
||||
let len = c === 'x' ? 2 : c === 'u' ? 4 : 8;
|
||||
for (let j = 0; j < len; j++, i++) {
|
||||
let hex = str.charCodeAt(i + 1);
|
||||
let digit =
|
||||
/* 0-9 */ hex >= 0x30 && hex <= 0x39 ? hex - 0x30 :
|
||||
/* A-F */ hex >= 0x41 && hex <= 0x46 ? hex - 0x41 + 10 :
|
||||
/* a-f */ hex >= 0x61 && hex <= 0x66 ? hex - 0x61 + 10 : -1;
|
||||
if (digit < 0)
|
||||
throw new TomlError('invalid non-hex character in unicode escape', { toml: str, ptr: i + 1 });
|
||||
value = (value << 4) | digit;
|
||||
}
|
||||
// Because JS does bitwise on signed 32bit integers, all 0xfzzzzzzz values are actually seen as negative
|
||||
if (value < 0 || value > 0x10ffff || (value >= 0xd800 && value <= 0xdfff)) {
|
||||
throw new TomlError('invalid unicode escape', { toml: str, ptr: i });
|
||||
}
|
||||
parsed += String.fromCodePoint(value);
|
||||
sliceStart = i + 1;
|
||||
state = 0;
|
||||
}
|
||||
else if (c === ' ' || c === '\t') { // If it was a newline, it'd have been handled earlier
|
||||
state = 2;
|
||||
}
|
||||
else {
|
||||
throw new TomlError('unrecognized escape sequence', {
|
||||
if (c === 'b')
|
||||
parsed += '\b';
|
||||
else if (c === 't')
|
||||
parsed += '\t';
|
||||
else if (c === 'n')
|
||||
parsed += '\n';
|
||||
else if (c === 'f')
|
||||
parsed += '\f';
|
||||
else if (c === 'r')
|
||||
parsed += '\r';
|
||||
else if (c === 'e')
|
||||
parsed += '\x1b';
|
||||
else if (c === '"')
|
||||
parsed += '"';
|
||||
else if (c === '\\')
|
||||
parsed += '\\';
|
||||
else
|
||||
throw new TomlError('unrecognized escape sequence', { toml: str, ptr: i });
|
||||
sliceStart = i + 1;
|
||||
state = 0;
|
||||
}
|
||||
}
|
||||
else if (c !== ' ' && c !== '\t') {
|
||||
if (state === 2) {
|
||||
throw new TomlError('invalid escape: only line-ending whitespace may be escaped', {
|
||||
toml: str,
|
||||
ptr: tmp,
|
||||
ptr: sliceStart,
|
||||
});
|
||||
}
|
||||
sliceStart = ptr;
|
||||
}
|
||||
else if (!isLiteral && c === '\\') {
|
||||
tmp = ptr - 1;
|
||||
isEscape = true;
|
||||
parsed += str.slice(sliceStart, tmp);
|
||||
// State cannot be zero, or we'd have branched earlier already.
|
||||
// If it's a backslash, immediately transition to the escape state so it can be processed.
|
||||
state = !isLiteral && c === '\\' ? 1 : 0;
|
||||
sliceStart = i;
|
||||
}
|
||||
}
|
||||
return parsed + str.slice(sliceStart, endPtr - 1);
|
||||
throw new TomlError('unfinished string', { toml: str, ptr });
|
||||
}
|
||||
function parseValue(value, toml, ptr, integersAsBigInt) {
|
||||
// Constant values
|
||||
@@ -36998,7 +36942,94 @@ function parseValue(value, toml, ptr, integersAsBigInt) {
|
||||
}
|
||||
return date;
|
||||
}
|
||||
//# sourceMappingURL=primitive.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/util.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
function indexOfNewline(str, start = 0, end = str.length) {
|
||||
let idx = str.indexOf('\n', start);
|
||||
if (str[idx - 1] === '\r')
|
||||
idx--;
|
||||
return idx <= end ? idx : -1;
|
||||
}
|
||||
function skipComment(str, ptr) {
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === '\n')
|
||||
return i;
|
||||
if (c === '\r' && str[i + 1] === '\n')
|
||||
return i + 1;
|
||||
if ((c < '\x20' && c !== '\t') || c === '\x7f') {
|
||||
throw new TomlError('control characters are not allowed in comments', {
|
||||
toml: str,
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
}
|
||||
return str.length;
|
||||
}
|
||||
function skipVoid(str, ptr, banNewLines, banComments) {
|
||||
let c;
|
||||
while (1) {
|
||||
while ((c = str[ptr]) === ' ' || c === '\t' || (!banNewLines && (c === '\n' || (c === '\r' && str[ptr + 1] === '\n'))))
|
||||
ptr++;
|
||||
// Tucking the return statement here would save 5 characters >:)
|
||||
// But TypeScript fails to detect there is no way to exit the loop so it complains about the lack of final return
|
||||
if (banComments || c !== '#')
|
||||
break;
|
||||
ptr = skipComment(str, ptr);
|
||||
}
|
||||
return ptr;
|
||||
}
|
||||
function skipUntil(str, ptr, sep, end, banNewLines = false) {
|
||||
if (!end) {
|
||||
ptr = indexOfNewline(str, ptr);
|
||||
return ptr < 0 ? str.length : ptr;
|
||||
}
|
||||
for (let i = ptr; i < str.length; i++) {
|
||||
let c = str[i];
|
||||
if (c === '#') {
|
||||
i = indexOfNewline(str, i);
|
||||
}
|
||||
else if (c === sep) {
|
||||
return i + 1;
|
||||
}
|
||||
else if (c === end || (banNewLines && (c === '\n' || (c === '\r' && str[i + 1] === '\n')))) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new TomlError('cannot find end of structure', {
|
||||
toml: str,
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/extract.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -37046,7 +37077,7 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
if (depth === 0) {
|
||||
throw new TomlError('document contains excessively nested structures. aborting.', {
|
||||
toml: str,
|
||||
ptr: ptr
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
let c = str[ptr];
|
||||
@@ -37067,10 +37098,8 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
}
|
||||
return [value, endPtr];
|
||||
}
|
||||
let endPtr;
|
||||
if (c === '"' || c === "'") {
|
||||
endPtr = getStringEnd(str, ptr);
|
||||
let parsed = parseString(str, ptr, endPtr);
|
||||
let [parsed, endPtr] = parseString(str, ptr);
|
||||
if (end) {
|
||||
endPtr = skipVoid(str, endPtr);
|
||||
if (str[endPtr] && str[endPtr] !== ',' && str[endPtr] !== end && str[endPtr] !== '\n' && str[endPtr] !== '\r') {
|
||||
@@ -37079,28 +37108,30 @@ function extractValue(str, ptr, end, depth, integersAsBigInt) {
|
||||
ptr: endPtr,
|
||||
});
|
||||
}
|
||||
endPtr += (+(str[endPtr] === ','));
|
||||
if (str[endPtr] === ',')
|
||||
endPtr++;
|
||||
}
|
||||
return [parsed, endPtr];
|
||||
}
|
||||
endPtr = skipUntil(str, ptr, ',', end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - (+(str[endPtr - 1] === ',')));
|
||||
let endPtr = skipUntil(str, ptr, ',', end);
|
||||
let slice = sliceAndTrimEndOf(str, ptr, endPtr - (str[endPtr - 1] === ',' ? 1 : 0));
|
||||
if (!slice[0]) {
|
||||
throw new TomlError('incomplete key-value declaration: no value specified', {
|
||||
toml: str,
|
||||
ptr: ptr
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
if (end && slice[1] > -1) {
|
||||
endPtr = skipVoid(str, ptr + slice[1]);
|
||||
endPtr += +(str[endPtr] === ',');
|
||||
if (str[endPtr] === ',')
|
||||
endPtr++;
|
||||
}
|
||||
return [
|
||||
parseValue(slice[0], str, ptr, integersAsBigInt),
|
||||
endPtr,
|
||||
];
|
||||
}
|
||||
|
||||
//# sourceMappingURL=extract.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/struct.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -37145,24 +37176,18 @@ function parseKey(str, ptr, end = '=') {
|
||||
});
|
||||
}
|
||||
do {
|
||||
let c = str[ptr = ++dot];
|
||||
let c = str[(ptr = ++dot)];
|
||||
// If it's whitespace, ignore
|
||||
if (c !== ' ' && c !== '\t') {
|
||||
// If it's a string
|
||||
if (c === '"' || c === '\'') {
|
||||
if (c === '"' || c === "'") {
|
||||
if (c === str[ptr + 1] && c === str[ptr + 2]) {
|
||||
throw new TomlError('multiline strings are not allowed in keys', {
|
||||
toml: str,
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
let eos = getStringEnd(str, ptr);
|
||||
if (eos < 0) {
|
||||
throw new TomlError('unfinished string encountered', {
|
||||
toml: str,
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
let [part, eos] = parseString(str, ptr);
|
||||
dot = str.indexOf('.', eos);
|
||||
let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
|
||||
let newLine = indexOfNewline(strEnd);
|
||||
@@ -37187,7 +37212,7 @@ function parseKey(str, ptr, end = '=') {
|
||||
});
|
||||
}
|
||||
}
|
||||
parsed.push(parseString(str, ptr, eos));
|
||||
parsed.push(part);
|
||||
}
|
||||
else {
|
||||
// Normal raw key part consumption and validation
|
||||
@@ -37286,7 +37311,7 @@ function parseArray(str, ptr, depth, integersAsBigInt) {
|
||||
}
|
||||
return [res, ptr];
|
||||
}
|
||||
|
||||
//# sourceMappingURL=struct.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/parse.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -37349,8 +37374,7 @@ function peekTable(key, table, meta, type) {
|
||||
}
|
||||
m[k] = {
|
||||
t: i < key.length - 1 && type === 2 /* Type.ARRAY */
|
||||
? 3 /* Type.ARRAY_DOTTED */
|
||||
: type,
|
||||
? 3 /* Type.ARRAY_DOTTED */ : type,
|
||||
d: false,
|
||||
i: 0,
|
||||
c: {},
|
||||
@@ -37391,7 +37415,7 @@ function parse_parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
|
||||
for (let ptr = skipVoid(toml, 0); ptr < toml.length;) {
|
||||
if (toml[ptr] === '[') {
|
||||
let isTableArray = toml[++ptr] === '[';
|
||||
let k = parseKey(toml, ptr += +isTableArray, ']');
|
||||
let k = parseKey(toml, (ptr += +isTableArray), ']');
|
||||
if (isTableArray) {
|
||||
if (toml[k[1] - 1] !== ']') {
|
||||
throw new TomlError('expected end of table declaration', {
|
||||
@@ -37429,14 +37453,14 @@ function parse_parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
|
||||
if (toml[ptr] && toml[ptr] !== '\n' && toml[ptr] !== '\r') {
|
||||
throw new TomlError('each key-value declaration must be followed by an end-of-line', {
|
||||
toml: toml,
|
||||
ptr: ptr
|
||||
ptr: ptr,
|
||||
});
|
||||
}
|
||||
ptr = skipVoid(toml, ptr);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=parse.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/stringify.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -37497,7 +37521,7 @@ function stringifyValue(val, type, depth, numberAsFloat) {
|
||||
return 'inf';
|
||||
if (val === -Infinity)
|
||||
return '-inf';
|
||||
if (numberAsFloat && Number.isInteger(val))
|
||||
if (Number.isInteger(val) && (numberAsFloat || !Number.isSafeInteger(val)))
|
||||
return val.toFixed(1);
|
||||
return val.toString();
|
||||
}
|
||||
@@ -37605,7 +37629,7 @@ function stringify(obj, { maxDepth = 1000, numbersAsFloat = false } = {}) {
|
||||
return str + '\n';
|
||||
return str;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=stringify.js.map
|
||||
;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/index.js
|
||||
/*!
|
||||
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
||||
@@ -37640,7 +37664,7 @@ function stringify(obj, { maxDepth = 1000, numbersAsFloat = false } = {}) {
|
||||
|
||||
/* harmony default export */ const dist = ({ parse: parse_parse, stringify: stringify, TomlDate: TomlDate, TomlError: TomlError });
|
||||
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
;// CONCATENATED MODULE: ./src/setup-beam.js
|
||||
|
||||
|
||||
|
||||
Generated
+17
-4
@@ -12,7 +12,7 @@
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"csv-parse": "7.0.0",
|
||||
"semver": "7.7.4",
|
||||
"smol-toml": "1.6.1"
|
||||
"smol-toml": "1.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
@@ -2299,6 +2299,19 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/markdownlint-cli/node_modules/smol-toml": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
|
||||
"integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/cyyynthia"
|
||||
}
|
||||
},
|
||||
"node_modules/matcher": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
|
||||
@@ -3337,9 +3350,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/smol-toml": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
|
||||
"integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz",
|
||||
"integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
"@actions/tool-cache": "4.0.0",
|
||||
"csv-parse": "7.0.0",
|
||||
"semver": "7.7.4",
|
||||
"smol-toml": "1.6.1"
|
||||
"smol-toml": "1.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
|
||||
Reference in New Issue
Block a user