build: update npm install command to use --legacy-peer-deps

This change modifies the build scripts to use --legacy-peer-deps flag when installing npm dependencies to resolve potential peer dependency conflicts during the build process. The change is applied to both bash (build.sh) and batch (build.bat) build scripts.
This commit is contained in:
Luiz Costa
2025-11-18 10:23:55 -03:00
parent 20129a1ac7
commit ac4f232e5e
787 changed files with 82341 additions and 121690 deletions
+90 -88
View File
@@ -9,107 +9,109 @@
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
meta: {
type: "suggestion",
docs: {
description: "Enforce a maximum depth that callbacks can be nested",
recommended: false,
url: "https://eslint.org/docs/latest/rules/max-nested-callbacks",
},
docs: {
description: "Enforce a maximum depth that callbacks can be nested",
recommended: false,
url: "https://eslint.org/docs/latest/rules/max-nested-callbacks"
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
},
additionalProperties: false,
},
],
},
],
messages: {
exceed: "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}.",
},
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0
},
max: {
type: "integer",
minimum: 0
}
},
additionalProperties: false
}
]
}
],
messages: {
exceed: "Too many nested callbacks ({{num}}). Maximum allowed is {{max}}."
}
},
create(context) {
//--------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------
const option = context.options[0];
let THRESHOLD = 10;
create(context) {
if (
typeof option === "object" &&
(Object.hasOwn(option, "maximum") || Object.hasOwn(option, "max"))
) {
THRESHOLD = option.maximum || option.max;
} else if (typeof option === "number") {
THRESHOLD = option;
}
//--------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------
const option = context.options[0];
let THRESHOLD = 10;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
if (
typeof option === "object" &&
(Object.prototype.hasOwnProperty.call(option, "maximum") || Object.prototype.hasOwnProperty.call(option, "max"))
) {
THRESHOLD = option.maximum || option.max;
} else if (typeof option === "number") {
THRESHOLD = option;
}
const callbackStack = [];
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Checks a given function node for too many callbacks.
* @param {ASTNode} node The node to check.
* @returns {void}
* @private
*/
function checkFunction(node) {
const parent = node.parent;
const callbackStack = [];
if (parent.type === "CallExpression") {
callbackStack.push(node);
}
/**
* Checks a given function node for too many callbacks.
* @param {ASTNode} node The node to check.
* @returns {void}
* @private
*/
function checkFunction(node) {
const parent = node.parent;
if (callbackStack.length > THRESHOLD) {
const opts = { num: callbackStack.length, max: THRESHOLD };
if (parent.type === "CallExpression") {
callbackStack.push(node);
}
context.report({ node, messageId: "exceed", data: opts });
}
}
if (callbackStack.length > THRESHOLD) {
const opts = { num: callbackStack.length, max: THRESHOLD };
/**
* Pops the call stack.
* @returns {void}
* @private
*/
function popStack() {
callbackStack.pop();
}
context.report({ node, messageId: "exceed", data: opts });
}
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
/**
* Pops the call stack.
* @returns {void}
* @private
*/
function popStack() {
callbackStack.pop();
}
return {
ArrowFunctionExpression: checkFunction,
"ArrowFunctionExpression:exit": popStack,
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
FunctionExpression: checkFunction,
"FunctionExpression:exit": popStack,
};
},
return {
ArrowFunctionExpression: checkFunction,
"ArrowFunctionExpression:exit": popStack,
FunctionExpression: checkFunction,
"FunctionExpression:exit": popStack
};
}
};