@markuplint/cli-utils 4.4.11 → 4.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.4.13](https://github.com/markuplint/markuplint/compare/@markuplint/cli-utils@4.4.12...@markuplint/cli-utils@4.4.13) (2025-11-05)
7
+
8
+ **Note:** Version bump only for package @markuplint/cli-utils
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.4.12](https://github.com/markuplint/markuplint/compare/@markuplint/cli-utils@4.4.11...@markuplint/cli-utils@4.4.12) (2025-08-13)
15
+
16
+ ### Bug Fixes
17
+
18
+ - **cli-utils:** correct width calc for multibyte chars ([4d853d0](https://github.com/markuplint/markuplint/commit/4d853d0dc16fc69e701fa091bb6d1ec1374a3997))
19
+ - ensure that each `clean` command correctly removes build files ([110b78e](https://github.com/markuplint/markuplint/commit/110b78e85379d29a84ca68325127344a87a570b6))
20
+
6
21
  ## [4.4.11](https://github.com/markuplint/markuplint/compare/@markuplint/cli-utils@4.4.10...@markuplint/cli-utils@4.4.11) (2025-04-13)
7
22
 
8
23
  **Note:** Version bump only for package @markuplint/cli-utils
package/lib/get-width.js CHANGED
@@ -2,11 +2,10 @@
2
2
  import eastasianwidth from 'eastasianwidth';
3
3
  const eaw = eastasianwidth;
4
4
  export function getWidth(s) {
5
- return s.replaceAll(
6
- // All characters
7
- /./g,
8
- // Wide characters to multi dots
9
- char => '•'.repeat(
10
- // Get the number of character width
11
- eaw.characterLength(char))).length;
5
+ let width = 0;
6
+ for (const char of s) {
7
+ // Get the number of character width per Unicode code point
8
+ width += eaw.characterLength(char);
9
+ }
10
+ return width;
12
11
  }
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@markuplint/cli-utils",
3
- "version": "4.4.11",
3
+ "version": "4.4.13",
4
4
  "description": "Utilities for CLI of Markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
7
7
  "license": "MIT",
8
- "private": false,
9
8
  "type": "module",
10
9
  "exports": {
11
10
  ".": {
@@ -19,7 +18,7 @@
19
18
  "scripts": {
20
19
  "build": "tsc --project tsconfig.build.json",
21
20
  "dev": "tsc --watch --project tsconfig.build.json",
22
- "clean": "tsc --build --clean"
21
+ "clean": "tsc --build --clean tsconfig.build.json"
23
22
  },
24
23
  "dependencies": {
25
24
  "detect-installed": "2.0.4",
@@ -27,7 +26,7 @@
27
26
  "enquirer": "2.4.1",
28
27
  "has-yarn": "3.0.0",
29
28
  "picocolors": "1.1.1",
30
- "strip-ansi": "7.1.0"
29
+ "strip-ansi": "7.1.2"
31
30
  },
32
- "gitHead": "eb36d59f7e13d4e59ff3f3c4eabb5ec06c070eb0"
31
+ "gitHead": "6213ea30269ef404f030e67bbcc7fc7443ec1060"
33
32
  }