-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(cli/migrate): use
oxc
kit to parse and migrate js/ts files (…
…#10198) * refactor(cli/migrate): use `oxc` kit to parse and migrate js/ts files closes #10192 * fix tests * use majic-string to perserve formatting * more comments * Discard changes to package.json * Update cli-migrate-enhancemnets.md * Update cli-migrate-enhancemnets.md * more context * add missing quotes, rename getcurrent * fix change file --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
- Loading branch information
1 parent
2c076d6
commit c01e87a
Showing
10 changed files
with
692 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"tauri-cli": "patch:enhance" | ||
"@tauri-apps/cli": "patch:enhance" | ||
--- | ||
|
||
Enhance `tauri migrate` to also migrate variables like `appWindow`: | ||
```ts | ||
import { appWindow } from '@tauri-apps/api/window' | ||
``` | ||
will become: | ||
```ts | ||
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow' | ||
const appWindow = getCurrentWebviewWindow() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"tauri-cli": "patch:bug" | ||
"@tauri-apps/cli": "patch:bug" | ||
--- | ||
|
||
Fix `tauri migrate` incorrectly migrating `@tauri-apps/api/tauri` module to just `core` and `@tauri-apps/api/window` to just `webviewWindow`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.