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
+13
-35
@@ -9,42 +9,20 @@
|
||||
// Public Interface
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns a global expression matching placeholders in messages.
|
||||
* @returns {RegExp} Global regular expression matching placeholders
|
||||
*/
|
||||
function getPlaceholderMatcher() {
|
||||
return /\{\{([^{}]+)\}\}/gu;
|
||||
}
|
||||
module.exports = (text, data) => {
|
||||
if (!data) {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces {{ placeholders }} in the message with the provided data.
|
||||
* Does not replace placeholders not available in the data.
|
||||
* @param {string} text Original message with potential placeholders
|
||||
* @param {Record<string, string>} data Map of placeholder name to its value
|
||||
* @returns {string} Message with replaced placeholders
|
||||
*/
|
||||
function interpolate(text, data) {
|
||||
if (!data) {
|
||||
return text;
|
||||
}
|
||||
// Substitution content for any {{ }} markers.
|
||||
return text.replace(/\{\{([^{}]+?)\}\}/gu, (fullMatch, termWithWhitespace) => {
|
||||
const term = termWithWhitespace.trim();
|
||||
|
||||
const matcher = getPlaceholderMatcher();
|
||||
if (term in data) {
|
||||
return data[term];
|
||||
}
|
||||
|
||||
// Substitution content for any {{ }} markers.
|
||||
return text.replace(matcher, (fullMatch, termWithWhitespace) => {
|
||||
const term = termWithWhitespace.trim();
|
||||
|
||||
if (term in data) {
|
||||
return data[term];
|
||||
}
|
||||
|
||||
// Preserve old behavior: If parameter name not provided, don't replace it.
|
||||
return fullMatch;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getPlaceholderMatcher,
|
||||
interpolate,
|
||||
// Preserve old behavior: If parameter name not provided, don't replace it.
|
||||
return fullMatch;
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user