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:
1 parent
20129a1ac7
commit
ac4f232e5e
787 files changed
+82341
-121690
No files matched your search
+21
-19
@@ -5,6 +5,12 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Requirements
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
const Graphemer = require("graphemer").default;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -12,8 +18,8 @@
|
||||
// eslint-disable-next-line no-control-regex -- intentionally including control characters
|
||||
const ASCII_REGEX = /^[\u0000-\u007f]*$/u;
|
||||
|
||||
/** @type {Intl.Segmenter | undefined} */
|
||||
let segmenter;
|
||||
/** @type {Graphemer | undefined} */
|
||||
let splitter;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Public Interface
|
||||
@@ -25,10 +31,10 @@ let segmenter;
|
||||
* @returns {string} The converted string
|
||||
*/
|
||||
function upperCaseFirst(string) {
|
||||
if (string.length <= 1) {
|
||||
return string.toUpperCase();
|
||||
}
|
||||
return string[0].toUpperCase() + string.slice(1);
|
||||
if (string.length <= 1) {
|
||||
return string.toUpperCase();
|
||||
}
|
||||
return string[0].toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,22 +43,18 @@ function upperCaseFirst(string) {
|
||||
* @returns {number} The number of graphemes in `value`.
|
||||
*/
|
||||
function getGraphemeCount(value) {
|
||||
if (ASCII_REGEX.test(value)) {
|
||||
return value.length;
|
||||
}
|
||||
if (ASCII_REGEX.test(value)) {
|
||||
return value.length;
|
||||
}
|
||||
|
||||
segmenter ??= new Intl.Segmenter("en-US"); // en-US locale should be supported everywhere
|
||||
let graphemeCount = 0;
|
||||
if (!splitter) {
|
||||
splitter = new Graphemer();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars -- for-of needs a variable
|
||||
for (const unused of segmenter.segment(value)) {
|
||||
graphemeCount++;
|
||||
}
|
||||
|
||||
return graphemeCount;
|
||||
return splitter.countGraphemes(value);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
upperCaseFirst,
|
||||
getGraphemeCount,
|
||||
upperCaseFirst,
|
||||
getGraphemeCount
|
||||
};
|
||||
Reference in new issue
Block a user