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
+13 -67
View File
@@ -22,13 +22,16 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* eslint-disable no-underscore-dangle */
/* eslint-disable no-undefined */
import estraverse from "estraverse";
import esrecurse from "esrecurse";
import Reference from "./reference.js";
import Variable from "./variable.js";
import PatternVisitor from "./pattern-visitor.js";
import { Definition, ParameterDefinition } from "./definition.js";
import { assert } from "./assert.js";
import assert from "assert";
const { Syntax } = estraverse;
@@ -48,7 +51,7 @@ function traverseIdentifierInPattern(options, rootPattern, referencer, callback)
visitor.visit(rootPattern);
// Process the right hand nodes recursively.
if (referencer !== null && referencer !== void 0) {
if (referencer !== null && referencer !== undefined) {
visitor.rightHandNodes.forEach(referencer.visit, referencer);
}
}
@@ -59,9 +62,6 @@ function traverseIdentifierInPattern(options, rootPattern, referencer, callback)
// FIXME: Now, we don't create module environment, because the context is
// implementation dependent.
/**
* Visitor for import specifiers.
*/
class Importer extends esrecurse.Visitor {
constructor(declaration, referencer) {
super(null, referencer.options);
@@ -108,9 +108,7 @@ class Importer extends esrecurse.Visitor {
}
}
/**
* Referencing variables and creating bindings.
*/
// Referencing variables and creating bindings.
class Referencer extends esrecurse.Visitor {
constructor(options, scopeManager) {
super(null, options);
@@ -274,6 +272,8 @@ class Referencer extends esrecurse.Visitor {
));
}
this.visit(node.superClass);
this.scopeManager.__nestClassScope(node);
if (node.id) {
@@ -284,8 +284,6 @@ class Referencer extends esrecurse.Visitor {
node
));
}
this.visit(node.superClass);
this.visit(node.body);
this.close(node);
@@ -395,7 +393,7 @@ class Referencer extends esrecurse.Visitor {
this.currentScope().__define(pattern,
new Definition(
Variable.CatchClause,
pattern,
node.param,
node,
null,
null,
@@ -434,7 +432,7 @@ class Referencer extends esrecurse.Visitor {
this.currentScope().__referencing(node);
}
// eslint-disable-next-line class-methods-use-this -- Desired as instance method
// eslint-disable-next-line class-methods-use-this
PrivateIdentifier() {
// Do nothing.
@@ -484,9 +482,9 @@ class Referencer extends esrecurse.Visitor {
this.visitProperty(node);
}
BreakStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
BreakStatement() {} // eslint-disable-line class-methods-use-this
ContinueStatement() {} // eslint-disable-line class-methods-use-this -- Desired as instance method
ContinueStatement() {} // eslint-disable-line class-methods-use-this
LabeledStatement(node) {
this.visit(node.body);
@@ -645,62 +643,10 @@ class Referencer extends esrecurse.Visitor {
this.visit(local);
}
MetaProperty() { // eslint-disable-line class-methods-use-this -- Desired as instance method
MetaProperty() { // eslint-disable-line class-methods-use-this
// do nothing.
}
JSXIdentifier(node) {
// Special case: "this" should not count as a reference
if (this.scopeManager.__isJSXEnabled() && node.name !== "this") {
this.currentScope().__referencing(node);
}
}
JSXMemberExpression(node) {
this.visit(node.object);
}
JSXElement(node) {
if (this.scopeManager.__isJSXEnabled()) {
this.visit(node.openingElement);
node.children.forEach(this.visit, this);
} else {
this.visitChildren(node);
}
}
JSXOpeningElement(node) {
if (this.scopeManager.__isJSXEnabled()) {
const nameNode = node.name;
const isComponentName = nameNode.type === "JSXIdentifier" && nameNode.name[0].toUpperCase() === nameNode.name[0];
const isComponent = isComponentName || nameNode.type === "JSXMemberExpression";
// we only want to visit JSXIdentifier nodes if they are capitalized
if (isComponent) {
this.visit(nameNode);
}
}
node.attributes.forEach(this.visit, this);
}
JSXAttribute(node) {
if (node.value) {
this.visit(node.value);
}
}
JSXExpressionContainer(node) {
this.visit(node.expression);
}
JSXNamespacedName(node) {
this.visit(node.namespace);
this.visit(node.name);
}
}
export default Referencer;