@inquirer/core 1.0.1 → 1.0.3

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022 Simon Boudrias
1
+ Copyright (c) 2023 Simon Boudrias
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
package/README.md CHANGED
@@ -135,5 +135,5 @@ export default createPrompt((config, done) => {
135
135
 
136
136
  # License
137
137
 
138
- Copyright (c) 2022 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))
138
+ Copyright (c) 2023 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))<br/>
139
139
  Licensed under the MIT license.
package/dist/cjs/index.js CHANGED
@@ -29,12 +29,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.createPrompt = exports.useRef = exports.useKeypress = exports.useEffect = exports.useState = exports.usePrefix = void 0;
30
30
  const node_readline_1 = __importDefault(require("node:readline"));
31
31
  const mute_stream_1 = __importDefault(require("mute-stream"));
32
- const screen_manager_mjs_1 = __importDefault(require("./lib/screen-manager.mjs"));
33
- const options_mjs_1 = require("./lib/options.mjs");
34
- var prefix_mjs_1 = require("./lib/prefix.mjs");
32
+ const screen_manager_mjs_1 = __importDefault(require("./lib/screen-manager.js"));
33
+ const options_mjs_1 = require("./lib/options.js");
34
+ var prefix_mjs_1 = require("./lib/prefix.js");
35
35
  Object.defineProperty(exports, "usePrefix", { enumerable: true, get: function () { return prefix_mjs_1.usePrefix; } });
36
- __exportStar(require("./lib/key.mjs"), exports);
37
- __exportStar(require("./lib/Paginator.mjs"), exports);
36
+ __exportStar(require("./lib/key.js"), exports);
37
+ __exportStar(require("./lib/Paginator.js"), exports);
38
38
  const hooks = [];
39
39
  const hooksCleanup = [];
40
40
  const hooksEffect = [];
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Paginator = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const cli_width_1 = __importDefault(require("cli-width"));
9
- const utils_mjs_1 = require("./utils.mjs");
9
+ const utils_mjs_1 = require("./utils.js");
10
10
  /**
11
11
  * The paginator keeps track of a pointer index in a list and returns
12
12
  * a subset of the choices if the list is too long.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.usePrefix = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const cli_spinners_1 = __importDefault(require("cli-spinners"));
9
- const index_mjs_1 = require("../index.mjs");
9
+ const index_mjs_1 = require("../index.js");
10
10
  const spinner = cli_spinners_1.default.dots;
11
11
  function usePrefix(isLoading = false) {
12
12
  const [tick, setTick] = (0, index_mjs_1.useState)(0);
@@ -30,8 +30,8 @@ const cli_width_1 = __importDefault(require("cli-width"));
30
30
  const strip_ansi_1 = __importDefault(require("strip-ansi"));
31
31
  const string_width_1 = __importDefault(require("string-width"));
32
32
  const ansi_escapes_1 = __importDefault(require("ansi-escapes"));
33
- const util = __importStar(require("./readline.mjs"));
34
- const utils_mjs_1 = require("./utils.mjs");
33
+ const util = __importStar(require("./readline.js"));
34
+ const utils_mjs_1 = require("./utils.js");
35
35
  const height = (content) => content.split('\n').length;
36
36
  const lastLine = (content) => { var _a; return (_a = content.split('\n').pop()) !== null && _a !== void 0 ? _a : ''; };
37
37
  class ScreenManager {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inquirer/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "engines": {
5
5
  "node": ">=14.18.0"
6
6
  },
@@ -57,28 +57,27 @@
57
57
  "license": "MIT",
58
58
  "homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/core/README.md",
59
59
  "dependencies": {
60
- "@inquirer/type": "^1.0.0",
61
- "ansi-escapes": "^6.0.0",
62
- "chalk": "^5.2.0",
63
- "cli-spinners": "^2.7.0",
60
+ "@inquirer/type": "^1.0.2",
61
+ "ansi-escapes": "^4.3.2",
62
+ "chalk": "^4.1.2",
63
+ "cli-spinners": "^2.8.0",
64
64
  "cli-width": "^4.0.0",
65
65
  "lodash": "^4.17.21",
66
66
  "mute-stream": "^1.0.0",
67
67
  "run-async": "^2.3.0",
68
- "string-width": "^5.1.2",
68
+ "string-width": "^4.2.3",
69
69
  "strip-ansi": "^7.0.1",
70
- "wrap-ansi": "^8.1.0"
70
+ "wrap-ansi": "^6.0.1"
71
71
  },
72
72
  "devDependencies": {
73
- "@inquirer/testing": "^1.0.0",
74
- "@jest/globals": "^29.5.0"
73
+ "@inquirer/testing": "^1.0.2"
75
74
  },
76
75
  "scripts": {
77
76
  "tsc": "yarn run clean && yarn run tsc:esm && yarn run tsc:cjs",
78
77
  "clean": "rm -rf dist",
79
78
  "tsc:esm": "tsc -p ./tsconfig.esm.json",
80
79
  "tsc:cjs": "tsc -p ./tsconfig.cjs.json && yarn run fix-ext",
81
- "fix-ext": "ts-node ../../tools/rename-ext.ts"
80
+ "fix-ext": "node --no-warnings=ExperimentalWarning --loader ts-node/esm ../../tools/rename-ext.mts"
82
81
  },
83
82
  "publishConfig": {
84
83
  "access": "public"
@@ -95,5 +94,5 @@
95
94
  }
96
95
  }
97
96
  },
98
- "gitHead": "e93c4cb14f0c35ebd1efb065776b90f48899b075"
97
+ "gitHead": "865c589ffbc4a66f328dc4e64a08646200c755f3"
99
98
  }