Skip to content

Fix aliased plugin imports in v1 migration - #15454

Merged
Legend-Master merged 2 commits into
tauri-apps:devfrom
fallintoplace:fix/migrate-plugin-alias-imports
Jun 1, 2026
Merged

Fix aliased plugin imports in v1 migration#15454
Legend-Master merged 2 commits into
tauri-apps:devfrom
fallintoplace:fix/migrate-plugin-alias-imports

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • preserve the local alias when migrating pluginified imports from @tauri-apps/api
  • update the v1 migration fixtures to expect valid namespace imports
  • reparse migrated JS, Svelte, and Vue output in tests so invalid syntax is caught

Root cause

The migrator generated aliased namespace imports as import * as cli as superCli from "...", which is not valid ESM and breaks migrated code for inputs like import { cli as superCli } from "@tauri-apps/api".

Testing

  • cargo test -p tauri-cli 'migrate::migrations::v1::frontend::tests::migrates'

@fallintoplace
fallintoplace marked this pull request as ready for review May 30, 2026 23:00
@fallintoplace
fallintoplace requested a review from a team as a code owner May 30, 2026 23:00
@github-actions

github-actions Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 51f23f9

There are 5 changes which include tauri-utils with patch, tauri-bundler with patch, tauri with patch, tauri-cli with patch, @tauri-apps/cli with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.9.2 2.9.3
tauri-bundler 2.9.2 2.9.3
tauri-runtime 2.11.2 2.11.3
tauri-runtime-wry 2.11.2 2.11.3
tauri-codegen 2.6.2 2.6.3
tauri-macros 2.6.2 2.6.3
tauri-plugin 2.6.2 2.6.3
tauri-build 2.6.2 2.6.3
tauri 2.11.2 2.11.3
@tauri-apps/cli 2.11.2 2.11.3
tauri-cli 2.11.2 2.11.3

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Legend-Master
Legend-Master previously approved these changes May 31, 2026

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .changes/v1-migrate-aliased-plugin-imports.md

@Legend-Master Legend-Master left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Legend-Master
Legend-Master merged commit fca4a31 into tauri-apps:dev Jun 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants