chore(dependency): upgrade packages

This commit is contained in:
Jay Trees
2025-07-08 14:47:27 +02:00
parent 839e7a14f8
commit 237cabbd2a
6655 changed files with 262207 additions and 296553 deletions

48
node_modules/string-width/index.js generated vendored
View File

@@ -1,37 +1,47 @@
'use strict';
var stripAnsi = require('strip-ansi');
var codePointAt = require('code-point-at');
var isFullwidthCodePoint = require('is-fullwidth-code-point');
const stripAnsi = require('strip-ansi');
const isFullwidthCodePoint = require('is-fullwidth-code-point');
const emojiRegex = require('emoji-regex');
// https://github.com/nodejs/io.js/blob/cff7300a578be1b10001f2d967aaedc88aee6402/lib/readline.js#L1345
module.exports = function (str) {
if (typeof str !== 'string' || str.length === 0) {
const stringWidth = string => {
if (typeof string !== 'string' || string.length === 0) {
return 0;
}
var width = 0;
string = stripAnsi(string);
str = stripAnsi(str);
if (string.length === 0) {
return 0;
}
for (var i = 0; i < str.length; i++) {
var code = codePointAt(str, i);
string = string.replace(emojiRegex(), ' ');
// ignore control characters
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
let width = 0;
for (let i = 0; i < string.length; i++) {
const code = string.codePointAt(i);
// Ignore control characters
if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) {
continue;
}
// surrogates
if (code >= 0x10000) {
// Ignore combining characters
if (code >= 0x300 && code <= 0x36F) {
continue;
}
// Surrogates
if (code > 0xFFFF) {
i++;
}
if (isFullwidthCodePoint(code)) {
width += 2;
} else {
width++;
}
width += isFullwidthCodePoint(code) ? 2 : 1;
}
return width;
};
module.exports = stringWidth;
// TODO: remove this in the next major version
module.exports.default = stringWidth;