@inquirer/ansi 1.0.2 → 2.0.1

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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@inquirer/ansi",
3
- "version": "1.0.2",
3
+ "version": "2.0.1",
4
4
  "engines": {
5
- "node": ">=18"
5
+ "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0"
6
6
  },
7
7
  "author": "Simon Boudrias <admin@simonboudrias.com>",
8
8
  "license": "MIT",
@@ -55,22 +55,10 @@
55
55
  "dist"
56
56
  ],
57
57
  "devDependencies": {
58
- "@arethetypeswrong/cli": "^0.18.2",
59
- "@repo/tsconfig": "0.0.0",
60
- "tshy": "^3.0.3"
61
- },
62
- "tshy": {
63
- "exclude": [
64
- "src/**/*.test.ts"
65
- ],
66
- "exports": {
67
- "./package.json": "./package.json",
68
- ".": "./src/index.ts"
69
- }
58
+ "typescript": "^5.9.3"
70
59
  },
71
60
  "scripts": {
72
- "tsc": "tshy",
73
- "attw": "attw --pack"
61
+ "tsc": "tsc"
74
62
  },
75
63
  "type": "module",
76
64
  "publishConfig": {
@@ -79,19 +67,10 @@
79
67
  "exports": {
80
68
  "./package.json": "./package.json",
81
69
  ".": {
82
- "import": {
83
- "types": "./dist/esm/index.d.ts",
84
- "default": "./dist/esm/index.js"
85
- },
86
- "require": {
87
- "types": "./dist/commonjs/index.d.ts",
88
- "default": "./dist/commonjs/index.js"
89
- }
70
+ "types": "./dist/index.d.ts",
71
+ "default": "./dist/index.js"
90
72
  }
91
73
  },
92
- "main": "./dist/commonjs/index.js",
93
- "types": "./dist/commonjs/index.d.ts",
94
- "module": "./dist/esm/index.js",
95
74
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/main/packages/ansi/README.md",
96
- "gitHead": "6881993e517e76fa891b72e1f5086fd11f7676ac"
75
+ "gitHead": "cce79ce3b9bbdfb4dbb798078cf3b94b9adc7d1b"
97
76
  }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eraseLines = exports.cursorTo = exports.cursorDown = exports.cursorUp = exports.cursorShow = exports.cursorHide = exports.cursorLeft = void 0;
4
- const ESC = '\u001B[';
5
- /** Move cursor to first column */
6
- exports.cursorLeft = ESC + 'G';
7
- /** Hide the cursor */
8
- exports.cursorHide = ESC + '?25l';
9
- /** Show the cursor */
10
- exports.cursorShow = ESC + '?25h';
11
- /** Move cursor up by count rows */
12
- const cursorUp = (rows = 1) => (rows > 0 ? `${ESC}${rows}A` : '');
13
- exports.cursorUp = cursorUp;
14
- /** Move cursor down by count rows */
15
- const cursorDown = (rows = 1) => rows > 0 ? `${ESC}${rows}B` : '';
16
- exports.cursorDown = cursorDown;
17
- /** Move cursor to position (x, y) */
18
- const cursorTo = (x, y) => {
19
- if (typeof y === 'number' && !Number.isNaN(y)) {
20
- return `${ESC}${y + 1};${x + 1}H`;
21
- }
22
- return `${ESC}${x + 1}G`;
23
- };
24
- exports.cursorTo = cursorTo;
25
- const eraseLine = ESC + '2K';
26
- /** Erase the specified number of lines above the cursor */
27
- const eraseLines = (lines) => lines > 0 ? (eraseLine + (0, exports.cursorUp)(1)).repeat(lines - 1) + eraseLine + exports.cursorLeft : '';
28
- exports.eraseLines = eraseLines;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,14 +0,0 @@
1
- /** Move cursor to first column */
2
- export declare const cursorLeft: string;
3
- /** Hide the cursor */
4
- export declare const cursorHide: string;
5
- /** Show the cursor */
6
- export declare const cursorShow: string;
7
- /** Move cursor up by count rows */
8
- export declare const cursorUp: (rows?: number) => string;
9
- /** Move cursor down by count rows */
10
- export declare const cursorDown: (rows?: number) => string;
11
- /** Move cursor to position (x, y) */
12
- export declare const cursorTo: (x: number, y?: number) => string;
13
- /** Erase the specified number of lines above the cursor */
14
- export declare const eraseLines: (lines: number) => string;
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
File without changes
File without changes