@cjser/inquirer__external-editor 3.0.3-cjser.2 → 3.0.4-cjser.2

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/README.md CHANGED
@@ -77,6 +77,19 @@ try {
77
77
  }
78
78
  ```
79
79
 
80
+ ### Windows editor commands
81
+
82
+ On Windows, prefer setting `$VISUAL` or `$EDITOR` to the editor executable
83
+ rather than a `.cmd` or `.bat` shim. This package launches the editor directly
84
+ instead of through a shell so editor arguments and temporary file paths are not
85
+ interpreted as shell commands.
86
+
87
+ For example, use `Code.exe` with `--wait` instead of `code.cmd`:
88
+
89
+ ```powershell
90
+ setx VISUAL '"C:\Program Files\Microsoft VS Code\Code.exe" --wait'
91
+ ```
92
+
80
93
  #### API
81
94
 
82
95
  **Convenience Functions**
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // packages/@cjser/inquirer__external-editor.tmp-26-1780252414390/dist/index.js
29
+ // packages/@cjser/inquirer__external-editor.tmp-25-1788288342955/dist/index.js
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  CreateFileError: () => CreateFileError,
@@ -46,7 +46,7 @@ var import_node_os = __toESM(require("node:os"), 1);
46
46
  var import_node_crypto = require("node:crypto");
47
47
  var import_iconv_lite = __toESM(require("iconv-lite"), 1);
48
48
 
49
- // packages/@cjser/inquirer__external-editor.tmp-26-1780252414390/dist/errors.js
49
+ // packages/@cjser/inquirer__external-editor.tmp-25-1788288342955/dist/errors.js
50
50
  var CreateFileError = class extends Error {
51
51
  name = "CreateFileError";
52
52
  originalError;
@@ -80,7 +80,7 @@ var RemoveFileError = class extends Error {
80
80
  }
81
81
  };
82
82
 
83
- // packages/@cjser/inquirer__external-editor.tmp-26-1780252414390/dist/parse-editor-command.js
83
+ // packages/@cjser/inquirer__external-editor.tmp-25-1788288342955/dist/parse-editor-command.js
84
84
  function parseEditorCommand(editor) {
85
85
  let bin;
86
86
  let rest;
@@ -106,7 +106,7 @@ function parseEditorCommand(editor) {
106
106
  return { bin, args: rest ? rest.split(/\s+/) : [] };
107
107
  }
108
108
 
109
- // packages/@cjser/inquirer__external-editor.tmp-26-1780252414390/dist/index.js
109
+ // packages/@cjser/inquirer__external-editor.tmp-25-1788288342955/dist/index.js
110
110
  function edit(text = "", fileOptions) {
111
111
  return new ExternalEditor(text, fileOptions).run();
112
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cjser/inquirer__external-editor",
3
- "version": "3.0.3-cjser.2",
3
+ "version": "3.0.4-cjser.2",
4
4
  "description": "Edit a string with the users preferred text editor using $VISUAL or $ENVIRONMENT",
5
5
  "keywords": [
6
6
  "answer",
@@ -78,8 +78,9 @@
78
78
  "iconv-lite": "^0.7.2"
79
79
  },
80
80
  "devDependencies": {
81
+ "@repo/tsconfig": "0.0.0",
81
82
  "@types/chardet": "^1.0.0",
82
- "@types/node": "^25.5.2",
83
+ "@types/node": "^26.1.1",
83
84
  "typescript": "^6.0.2"
84
85
  },
85
86
  "peerDependencies": {
@@ -95,13 +96,13 @@
95
96
  },
96
97
  "main": "./dist-cjser/index.cjs",
97
98
  "types": "./dist/index.d.ts",
98
- "gitHead": "bfd8710229e3d3c9784bef3bbfbd84c7bd09bb9e",
99
+ "gitHead": "999706755afbdcae271f62decbd9bcd05560905b",
99
100
  "cjser": {
100
- "sourceVersion": "3.0.3",
101
+ "sourceVersion": "3.0.4",
101
102
  "cjserVersion": 2,
102
103
  "original": {
103
104
  "name": "@inquirer/external-editor",
104
- "version": "3.0.3",
105
+ "version": "3.0.4",
105
106
  "main": "./dist/index.js",
106
107
  "exports": {
107
108
  ".": {
@@ -1,10 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export declare class CreateFileError extends Error {
8
- originalError: Error;
9
- constructor(originalError: Error);
10
- }
@@ -1,13 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export class CreateFileError extends Error {
8
- originalError;
9
- constructor(originalError) {
10
- super(`Failed to create temporary file. ${originalError.message}`);
11
- this.originalError = originalError;
12
- }
13
- }
@@ -1,10 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export declare class LaunchEditorError extends Error {
8
- originalError: Error;
9
- constructor(originalError: Error);
10
- }
@@ -1,13 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export class LaunchEditorError extends Error {
8
- originalError;
9
- constructor(originalError) {
10
- super(`Failed to launch editor. ${originalError.message}`);
11
- this.originalError = originalError;
12
- }
13
- }
@@ -1,10 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export declare class ReadFileError extends Error {
8
- originalError: Error;
9
- constructor(originalError: Error);
10
- }
@@ -1,13 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export class ReadFileError extends Error {
8
- originalError;
9
- constructor(originalError) {
10
- super(`Failed to read temporary file. ${originalError.message}`);
11
- this.originalError = originalError;
12
- }
13
- }
@@ -1,10 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export declare class RemoveFileError extends Error {
8
- originalError: Error;
9
- constructor(originalError: Error);
10
- }
@@ -1,13 +0,0 @@
1
- /***
2
- * Node External Editor
3
- *
4
- * Kevin Gravier <kevin@mrkmg.com>
5
- * MIT 2018
6
- */
7
- export class RemoveFileError extends Error {
8
- originalError;
9
- constructor(originalError) {
10
- super(`Failed to remove temporary file. ${originalError.message}`);
11
- this.originalError = originalError;
12
- }
13
- }