Skip to content

Commit c8b527a

Browse files
authored
breaking: Replace launchEditor implementation (#2587)
1 parent 9113869 commit c8b527a

File tree

4 files changed

+40
-353
lines changed

4 files changed

+40
-353
lines changed

packages/cli-tools/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
"access": "public"
88
},
99
"dependencies": {
10+
"@vscode/sudo-prompt": "^9.0.0",
1011
"appdirsjs": "^1.2.4",
1112
"chalk": "^4.1.2",
1213
"execa": "^5.0.0",
1314
"find-up": "^5.0.0",
15+
"launch-editor": "^2.9.1",
1416
"mime": "^2.4.1",
1517
"open": "^6.2.0",
1618
"ora": "^5.4.1",
1719
"prompts": "^2.4.2",
18-
"semver": "^7.5.2",
19-
"shell-quote": "^1.7.3",
20-
"@vscode/sudo-prompt": "^9.0.0"
20+
"semver": "^7.5.2"
2121
},
2222
"devDependencies": {
2323
"@react-native-community/cli-types": "16.0.2",
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
declare module 'launch-editor' {
2+
/**
3+
* Launch an editor to open a file at a specific line and column.
4+
*
5+
* @param file File path with optional line and column numbers (e.g.
6+
* "/path/to/file.js:10:2").
7+
* @param specifiedEditor Optional editor command or path to use. Will be
8+
* parsed using `shell-quote`.
9+
* @param onErrorCallback Optional callback for handling errors.
10+
*/
11+
function launchEditor(
12+
file: string,
13+
specifiedEditor?:
14+
| string
15+
| ((fileName: string, errorMessage: string | null) => void),
16+
onErrorCallback?: (fileName: string, errorMessage: string | null) => void,
17+
): void;
18+
19+
export = launchEditor;
20+
}

0 commit comments

Comments
 (0)