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

Migrate to TypeScript #151

Closed
37 tasks done
kikuomax opened this issue Nov 30, 2023 · 63 comments · Fixed by #410
Closed
37 tasks done

Migrate to TypeScript #151

kikuomax opened this issue Nov 30, 2023 · 63 comments · Fixed by #410
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kikuomax
Copy link
Collaborator

kikuomax commented Nov 30, 2023

@kikuomax kikuomax self-assigned this Nov 30, 2023
@kikuomax kikuomax converted this from a draft issue Nov 30, 2023
@kikuomax kikuomax added the enhancement New feature or request label Nov 30, 2023
@grantmcconnaughey
Copy link

Would this mean that we would need to use Typescript to use Buefy with Vue.js 3?

@kikuomax
Copy link
Collaborator Author

kikuomax commented Dec 1, 2023

Would this mean that we would need to use Typescript to use Buefy with Vue.js 3?

@grantmcconnaughey No, we will continue providing JS bundles but with comprehensive type declarations for TypeScript.

@grantmcconnaughey
Copy link

Awesome, thank you for clarifying!

@wesdevpro
Copy link

@kikuomax I assume the task packages/docs has yet to be populated with sub tasks. Is that correct?

@kikuomax
Copy link
Collaborator Author

kikuomax commented Dec 2, 2023

@kikuomax I assume the task packages/docs has yet to be populated with sub tasks. Is that correct?

@wesdevpro Right. I have added items I can anticipate.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Dec 6, 2023

@wesdevpro Buefy for Vue2 has changes including important bug fixes not merged to Buefy-next yet. I anticipate massive changes will be introduced by rewriting code in TypeScript. So merging the latest changes on Buefy for Vue2 should happen before actually rewriting things in TypeScript.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Jan 9, 2024

I will continue working on this issue after finishing #159.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Feb 9, 2024

I am working on migration in migrate-to-typescript branch. Unfortunately, the process is incremental and will take weeks months. If someone could contribute to migration, it would be greatly appreciated.

Contribution guide

Please:

  • See the progress in the following issues:

  • Claim which component (group) you are going to work on in this thread to avoid overlap

  • Migrate the component to TypeScript

  • Make a PR to migrate-to-typescript branch

  • Include one component group per PR; e.g., components related to Table are grouped in packages/buefy-next/src/components/table

  • Include updates on relevant specs and docs in the PR

  • Focus on TypeScript migration. Do not try to fix bugs (some minor bug fixes may be unavoidable for migration)

  • Stick to Options API. I know Composition API is recommended, but it is too different and will make review impossible.

    Except you substitute a missing <script> section in components under packages/docs, Options API is recommended because of its simplicity.

  • Add the name of the component group you worked on to the TS_COMPONENTS array in packages/buefy-next/rollup.config.mjs.

  • Run type-check both in packages/buefy-next and packages/docs before making a PR:

    cd packages/buefy-next
    npm run type-check
    cd ../docs
    npm run type-check
  • Run vitest before making a PR:

    cd packages/buefy-next
    npx vitest

    The above command runs all the tests in TypeScript, you can also run a specific test. For instance:

    npx vitest src/components/input/Input.spec.ts
  • Run lint both in packages/buefy-next and packages/docs before making a PR:

    cd packages/buefy-next
    npm run lint
    cd ../docs
    npm run lint

    Ignore errors in files you did not touch.

  • Be prepare for massive rebase

    I occasionally rebase migrate-to-typescript branch to reorganize sporadic changes on the same files, because it is difficult to anticipate all the type errors and may have to fix errors tens of commits later. If rebase happens, you have to cherry-pick your commits onto the new migrate-to-typescript.

Please review my commit history in migrate-to-typescript branch for more details about actual changes and how to comment your changes.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Feb 9, 2024

I am currently working on autocomplete.

@kikuomax
Copy link
Collaborator Author

I claim taginput.

@kikuomax
Copy link
Collaborator Author

I claim modal.

@wesdevpro
Copy link

I claim switch.

@kikuomax
Copy link
Collaborator Author

I claim dialog.

@kikuomax kikuomax added the help wanted Extra attention is needed label Feb 27, 2024
@kikuomax
Copy link
Collaborator Author

I claim toast.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Mar 5, 2024

I claim notification.

@kikuomax
Copy link
Collaborator Author

I claim snackbar.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Apr 9, 2024

I will rebase the migrate-to-typescript branch on top of the dev branch after we release 0.1.3.

@kikuomax
Copy link
Collaborator Author

I claim image.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Jun 6, 2024

@wesdevpro I have updated the contribution guide.

@wesdevpro
Copy link

I claim the Upload component

@kikuomax
Copy link
Collaborator Author

I started rebaseing the migrate-to-typescript branch on top of v0.1.4. Please expect massive changes in the commit history.

@kikuomax
Copy link
Collaborator Author

kikuomax commented Aug 4, 2024

I started rebaseing the migrate-to-typescript branch on top of v0.1.4. Please expect massive changes in the commit history.

@wesdevpro I force-pushed the rebased migrate-to-typescript branch. When you make a PR to the migrate-to-typescript branch, please cherry-pick your latest commits onto the new migrate-to-typescript. I tagged the last commit of the migrate-to-typescript before rebaseing as migrate-to-typescript-pre-0.1.4. So you can list the commits to cherry-pick with:

git log migrate-to-typescript-pre-0.1.4..

@kikuomax
Copy link
Collaborator Author

I claim table.

@kikuomax
Copy link
Collaborator Author

I also claim select, because table depends on it.

@kikuomax kikuomax moved this from 🏗 In progress to 👀 In review in Buefy Vue3 Project Board Jan 17, 2025
@kikuomax kikuomax moved this from 👀 In review to Pending Release🔦 in Buefy Vue3 Project Board Jan 17, 2025
@wesdevpro wesdevpro moved this from Pending Release🔦 to ✅ Done in Buefy Vue3 Project Board Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants