Skip to content

Commit

Permalink
breaking: Replace launchEditor implementation (#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntie authored Jan 29, 2025
1 parent 9113869 commit c8b527a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 353 deletions.
6 changes: 3 additions & 3 deletions packages/cli-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"access": "public"
},
"dependencies": {
"@vscode/sudo-prompt": "^9.0.0",
"appdirsjs": "^1.2.4",
"chalk": "^4.1.2",
"execa": "^5.0.0",
"find-up": "^5.0.0",
"launch-editor": "^2.9.1",
"mime": "^2.4.1",
"open": "^6.2.0",
"ora": "^5.4.1",
"prompts": "^2.4.2",
"semver": "^7.5.2",
"shell-quote": "^1.7.3",
"@vscode/sudo-prompt": "^9.0.0"
"semver": "^7.5.2"
},
"devDependencies": {
"@react-native-community/cli-types": "16.0.2",
Expand Down
20 changes: 20 additions & 0 deletions packages/cli-tools/src/launch-editor.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
declare module 'launch-editor' {
/**
* Launch an editor to open a file at a specific line and column.
*
* @param file File path with optional line and column numbers (e.g.
* "/path/to/file.js:10:2").
* @param specifiedEditor Optional editor command or path to use. Will be
* parsed using `shell-quote`.
* @param onErrorCallback Optional callback for handling errors.
*/
function launchEditor(
file: string,
specifiedEditor?:
| string
| ((fileName: string, errorMessage: string | null) => void),
onErrorCallback?: (fileName: string, errorMessage: string | null) => void,
): void;

export = launchEditor;
}
Loading

0 comments on commit c8b527a

Please sign in to comment.