cli-truncate 4.0.0 → 5.0.0

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +8 -7
package/index.js CHANGED
@@ -77,8 +77,8 @@ export default function cliTruncate(text, columns, options = {}) {
77
77
 
78
78
  return (
79
79
  sliceAnsi(text, 0, half)
80
- + truncationCharacter
81
- + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length)
80
+ + truncationCharacter
81
+ + sliceAnsi(text, length - (columns - half) + stringWidth(truncationCharacter), length)
82
82
  );
83
83
  }
84
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-truncate",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Truncate a string to a specific width in the terminal",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/cli-truncate",
@@ -15,8 +15,9 @@
15
15
  "types": "./index.d.ts",
16
16
  "default": "./index.js"
17
17
  },
18
+ "sideEffects": false,
18
19
  "engines": {
19
- "node": ">=18"
20
+ "node": ">=20"
20
21
  },
21
22
  "scripts": {
22
23
  "test": "xo && ava && tsd"
@@ -40,12 +41,12 @@
40
41
  "string"
41
42
  ],
42
43
  "dependencies": {
43
- "slice-ansi": "^5.0.0",
44
- "string-width": "^7.0.0"
44
+ "slice-ansi": "^7.1.0",
45
+ "string-width": "^8.0.0"
45
46
  },
46
47
  "devDependencies": {
47
- "ava": "^5.3.1",
48
- "tsd": "^0.29.0",
49
- "xo": "^0.56.0"
48
+ "ava": "^6.4.1",
49
+ "tsd": "^0.33.0",
50
+ "xo": "^1.2.2"
50
51
  }
51
52
  }