Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform class references in connect-migrate #1342

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

timostamm
Copy link
Member

@timostamm timostamm commented Nov 26, 2024

This updates the connect-migrate command to replace imports for a message class with a schema import, and update:

  • "new" expressions to a create() call
  • calls to the static methods fromBinary, fromJson, fromJsonString
  • isMessage calls

When the identifier is used elsewhere, add a type import for the message type.
When the message is a well-known type, update to import from @bufbuild/protobuf/wkt.

Before we can merge this, we should:

  • not add type imports in .js files
  • handle import as
  • handle require calls

Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
Signed-off-by: Timo Stamm <ts@timostamm.de>
@timostamm timostamm marked this pull request as ready for review December 2, 2024 15:44
@timostamm timostamm requested a review from smaye81 December 2, 2024 15:44
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.

1 participant