Update dependencies (#20)
All checks were successful
Lint / pre-commit Linting (push) Successful in 29s

- @actions/core
- glob
- screeps-api

Reviewed-on: #20
Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de>
Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
2025-04-12 13:43:45 +02:00
committed by Philipp Horstenkamp
parent 1aa7be2b73
commit 318515b9c4
634 changed files with 49143 additions and 4925 deletions

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

@ -1,37 +1,54 @@
'use strict';
var stripAnsi = require('strip-ansi');
var codePointAt = require('code-point-at');
var isFullwidthCodePoint = require('is-fullwidth-code-point');
import stripAnsi from 'strip-ansi';
import eastAsianWidth from 'eastasianwidth';
import emojiRegex from '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) {
export default function stringWidth(string, options = {}) {
if (typeof string !== 'string' || string.length === 0) {
return 0;
}
var width = 0;
options = {
ambiguousIsNarrow: true,
...options
};
str = stripAnsi(str);
string = stripAnsi(string);
for (var i = 0; i < str.length; i++) {
var code = codePointAt(str, i);
if (string.length === 0) {
return 0;
}
// ignore control characters
if (code <= 0x1f || (code >= 0x7f && code <= 0x9f)) {
string = string.replace(emojiRegex(), ' ');
const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
let width = 0;
for (const character of string) {
const codePoint = character.codePointAt(0);
// Ignore control characters
if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) {
continue;
}
// surrogates
if (code >= 0x10000) {
i++;
// Ignore combining characters
if (codePoint >= 0x300 && codePoint <= 0x36F) {
continue;
}
if (isFullwidthCodePoint(code)) {
width += 2;
} else {
width++;
const code = eastAsianWidth.eastAsianWidth(character);
switch (code) {
case 'F':
case 'W':
width += 2;
break;
case 'A':
width += ambiguousCharacterWidth;
break;
default:
width += 1;
}
}
return width;
};
}