{"id":20325435,"url":"https://github.com/getyourguide/vue-class-migrator","last_synced_at":"2025-04-05T11:08:38.616Z","repository":{"id":187489850,"uuid":"596519855","full_name":"getyourguide/vue-class-migrator","owner":"getyourguide","description":"Vue 3 Migration helper for applications using Vue 2.7","archived":false,"fork":false,"pushed_at":"2024-10-24T07:11:47.000Z","size":481,"stargazers_count":61,"open_issues_count":13,"forks_count":20,"subscribers_count":39,"default_branch":"main","last_synced_at":"2024-10-24T23:53:14.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getyourguide.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-02T11:14:32.000Z","updated_at":"2024-10-24T07:11:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd89acf3-6a69-492a-bd31-d2b7f214e8c5","html_url":"https://github.com/getyourguide/vue-class-migrator","commit_stats":null,"previous_names":["getyourguide/vue-class-migrator"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fvue-class-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fvue-class-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fvue-class-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fvue-class-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getyourguide","download_url":"https://codeload.github.com/getyourguide/vue-class-migrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T19:39:49.198Z","updated_at":"2025-04-05T11:08:38.601Z","avatar_url":"https://github.com/getyourguide.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![CI](https://github.com/getyourguide/vue-class-migrator/workflows/CI/badge.svg)\n\n![npm](https://img.shields.io/npm/v/vue-class-migrator)\n![npm](https://img.shields.io/npm/dm/vue-class-migrator)\n\n\n## Vue Class Migrator CLI\n\nVue Class Migrator is a utility designed to facilitate the migration of Vue and TypeScript files using the `@component` decorator from `vue-class-components` to the `defineComponent` format. Under the hood, it employs `ts-morph` for parsing and generating files.\n\n### Installation\n\nYou can install vue-class-migrator globally using npm:\n\n```sh\nnpm install -g vue-class-migrator\n```\n\n### How to use the tool\n\nAccepted options\n- -d: Specifies the directory you want to migrate.\n- --sfc: (Optional flag, default: false) Removes original TS and style files, generating a final Vue Single File Component (SFC).\n\n```\nnpm run migrate -- -d \u003cyour_path\u003e\n```\n\n### Considerations\n\nThe tool also migrates decorators from vuex-class and vue-property-decorator.\n\nIf the tool encounters unsupported code in your class, it will produce errors. Monitor the output and verify the generated file. In such cases, you can contribute to the migrator to add support or correct the file manually.\n\n\n## Migration workflow recommendation\n\nInitially, avoid using --sfc directly. \n\nFirst, run the tool without it and compare the changes in the TS files using version control. If satisfied, discard the changes and rerun with --sfc.\n\n\n## Compatibility note\n\nIn addition to migrating the class to the defineComponent format, vue-class-migrator also migrates the following libraries out of the box.\n\n### vuex-class\n\n|Decorator|Support|\n|---|---|\n|@State|❌ Not yet|\n|@Getter|✅|\n|@namespace.Getter|❌ Not yet|\n|@Action|✅|\n|@Mutation|✅|\n\n\n### vue-property-decorator\n\n|Decorator|Support|\n|---|---|\n|@Prop|✅|\n|@PropSync|✅|\n|@Model|✅|\n|@ModelSync|✅|\n|@Watch|✅|\n|@Provide|❌ Not yet|\n|@Inject|❌ Not yet|\n|@ProvideReactive|❌ Not yet|\n|@InjectReactive|❌ Not yet|\n|@Emit|❌ Not yet|\n|@Ref|✅|\n|@VModel|❌ Not yet|\n|@Component|✅|\n|@Mixins|✅|\n\n## Security\n\nFor security matters please contact [security@getyourguide.com](mailto:security@getyourguide.com).\n\n## Legal\n\nCopyright 2023 GetYourGuide GmbH.\n\nvue-class-migrator is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full text.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetyourguide%2Fvue-class-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetyourguide%2Fvue-class-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetyourguide%2Fvue-class-migrator/lists"}