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 #86

Merged
merged 24 commits into from
Feb 6, 2021
Merged

Conversation

mpeyper
Copy link
Contributor

@mpeyper mpeyper commented Feb 4, 2021

What:

Migrate to TypeScript.

Why:

@kentcdodds approached the Open Source Raid Guild with a quest to migrate this repo to TypeScript.

How:

Minimal upgrade to introduce type safety and generate type definitions while adhearing to good TypeScript practices. We want to keep functional changes within the plugin as little as possible.

Kent suggested that it would be fine to follow the approaches taken in babel-plugin-codegen when it was migrated when it was migrated.

This PR will be kept in a draft state while the raid is in progress so that the repo maintainers can see the current state of the migration.

The repo has been forked for the raid party to use for our own planning and coordination and planning, but you are welcome to participate in the issues and pull requests that occur there if you wish.

You can also keep track of the raid stats on our (work-in-progress) website.

Finally, you are invited to join us in the ⚔️-OSS-RAID section of the KCD discord server to chat with us about the changes and keep up to date with the work happening within the raid party.

  • Main Quest:
    • Setup project with TypeScript dependencies, config and scripts
    • Migrate src files
    • Migrate __test__ files
    • Add necessary .d.ts files to root
    • Cleanup
  • Side Quests:
    • Refactoring (if applicable)
    • Set up Github Actions (if it benefits the Raid)

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

This looks great! I just have one comment.

src/index.js Show resolved Hide resolved
@mpeyper mpeyper marked this pull request as ready for review February 6, 2021 09:49
@mpeyper
Copy link
Contributor Author

mpeyper commented Feb 6, 2021

@kentcdodds, I've marked this as ready for review as all the files have been migrated, with tests passing and no linting errors.

At this point of the raid, we welcome you to leave any comments or raise any concerns for the raid party to take on.

package.json Show resolved Hide resolved
src/macro.ts Show resolved Hide resolved
src/index.ts Show resolved Hide resolved
fix: move @types/babel__core to prod dependencies
@kentcdodds
Copy link
Owner

Sweet! Thanks everyone 👏👏

@kentcdodds kentcdodds merged commit 3887e25 into kentcdodds:main Feb 6, 2021
@kentcdodds
Copy link
Owner

@all-contributors please add @nobrayner for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @nobrayner! 🎉

@kentcdodds
Copy link
Owner

@all-contributors please add @JacobMGEvans for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @JacobMGEvans! 🎉

@kentcdodds
Copy link
Owner

@all-contributors please add @juhanakristian for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @juhanakristian! 🎉

@kentcdodds
Copy link
Owner

@all-contributors please add @Aprillion for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @Aprillion! 🎉

@kentcdodds
Copy link
Owner

@all-contributors please add @mpeyper for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @mpeyper! 🎉

@NMinhNguyen
Copy link
Contributor

This change hasn't been published to npm, has it? Inspecting https://unpkg.com/browse/babel-plugin-preval@5.0.0/package.json I don't see any references to types

@kentcdodds
Copy link
Owner

Ah yeah, looks like this repo was never updated to use github actions to auto-release stuff. Bummer. I'm afraid I don't have the bandwidth to work on this :(

@NMinhNguyen
Copy link
Contributor

NMinhNguyen commented Feb 1, 2022

Is there anything I can do to help set up publishing? I could presumably copy the action definition from another one of your repos?

@mpeyper
Copy link
Contributor Author

mpeyper commented Feb 1, 2022

Hi @kentcdodds, if you want, I can look at getting a pipeline set up for you. Would still need someone to merge a PR for it (I understand that you may not have the bandwidth for even that right now)

@kentcdodds
Copy link
Owner

I can merge a PR 👍

@mpeyper
Copy link
Contributor Author

mpeyper commented Feb 1, 2022

@NMinhNguyen you offered first, so happy to let you take it. I will review the PR for it if you want. You can likely follow what has been done in babel-plugin-macros as a template.

@NMinhNguyen
Copy link
Contributor

@mpeyper thanks for the pointer! I can have a look a bit later but if you don't see a PR from me in the next 24 hours, feel free to raise one yourself :)

@NMinhNguyen
Copy link
Contributor

Put up a PR: #100

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

🎉 This PR is included in version 5.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants