-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[Umbrella] TypeScript Migration (Help wanted!) #21995
Comments
I'll happily pick up gatsby-link. Been meaning to learn some more around there! |
@herecydev That sounds great! I'll put your name down! That one is relatively small and isolated, so feel free to do that whole package in one PR if you want. |
@blainekasten just a few preliminary comments. There are quite a few globals/window variables: |
@herecydev those variables are def meant to be like "private" "secret" variables.. So I don't think we'll expose any types from gatsby package as they are only meant to be used in a few places. I think the best course of action would just be to define types for them in the |
I'm excited to contribute, which package do you suggest for starting? |
@aminkhp awesome!! I would love it if we could just start chunking off individual files in PRs. Want to tackle |
I'd be happy to contribute some types. I'd be able to tackle I took a peek at |
@robertrbairdii Great! If you could chunk up the work and submit 1 PR for each line I had, that would be fantastic. Good point re the gatsby-core-utils. cc @aminkhp |
I'd like to try ADDITION: I'd also like to tackle |
I spent some time in |
@blainekasten I was looking at the The babel config at the root of the repo has an override for it https://github.com/gatsbyjs/gatsby/blob/master/.babelrc.js#L12 And that config seems to be imported by other packages such as https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/babel.config.js As far as I know, you can only pass the extensions as an argument through the CLI, so we would have to add the I think this will block getting some of the TS conversions merged in and published. |
@robertrbairdii I came to the same findings on my PR: #22027 It wasn't obvious at first, but lucky there is some prior art in the |
I would love to help out and I don't have any preferences. Can you recommend me some parts to migrate? |
@danielkov Seeing by @blainekasten's comment (#21995 (comment)), I think you could start in |
@MichaelDeBoey I also have my eyes on gatsby-cli/src/structured-errors if nobody else is on it and then move onto |
@danielkov That one's already taken by @LekoArts in #20597 |
I see #22031 is addressing one of the files of |
@danielkov You can just start working on it. |
I will work on packages/babel-preset-gatsby/index.js + test |
Any reason why |
Hi guys, it's been a while since I've been around here. |
I would like to work on |
Are these still ongoing? I'd be happy to pick some up. |
Non-linear logic from dead body Space Aliens Ghostbusters Borg Super Artificial Intelligence NFT Crypto Time Machines Reruns Universes Reruns have been Repoed with the Harry Potter's Jumanji Educational Systems Reruns Universes Reruns and Upgradable; "But I"m usually dead 30+ years ago; but not always? |
hi |
@LekoArts can I work on |
I was considering updating CreateResolverArgs from index.d.ts whilst we wait for the js allocations to be completed ? To type this correctly it is necessary to ask a question, one that is important for those performing schema migration. For createResolvers the field configs provided are passed to type composer methods extendField ( or addFields but the intent is the former ). As such should the typing be the same as graph-ql compose with a change to the GatsbyResolver ( or a new WrappingGatsbyResolver with info typed for the originalResolver) ? Or is gatsby not exposing the thunks from graphql-compose given that there is no mention in the docs ?
|
I'd be happy to take packages/gatsby/src/bootstrap/load-themes/index.js if this still needs doing! |
Hello! I'd like to help out. What would be a good starting point? |
Hey! I'd like to work on this. Could you assign a file to me? |
We've migrated most of the files that are important to us to TypeScript. Thanks for all the help! Since the start of this initiative we also wrote all new code in TypeScript. Some files that are still JS in our core codebase are a bit harder to migrate and we'll do it ourselves when we have the time and it's worth it. Again, thanks all for your help :) |
Hello Community!
Gatsby is rewriting our core codebase in TypeScript! Checkout the RFC: #21798
We would love love love your help! This work is incredibly important in Gatsby being a stable product and you could be a part of it! We are looking for community members who would be willing to jump into the codebase in transition files from .js to .ts and add the proper typings. We have a few guidelines we are wanting to stick to when doing this:
Gatsby TS Guidelines
Array<type>
rather thantype[]
syntax, as it's clearer and matches built-in types such asMap
.Record
, rather than defining your own.any
type can be used for stubbing module types that would be out of scope to migrate. But it should not be used for any functional input/outputs. The end goal of this migration is to have ZEROany
types in the codebase. See ifunknown
makes more sense in that context. Don't use@ts-ignore
comments.If you're interested in getting involved, check out the list below. If you're interested in doing something, please respond as a comment, i'll put your name by a file so others know it's "claimed", when the PR is merged i'll check the box.
Tips to get involved: first read the contribution docs, and see how to set up your local environment. After you've claimed the file to work on, convert it locally and ensure there are no typing or lint errors displayed in your IDE. Run
yarn typecheck
andyarn lint:code
in the root before opening the PR, which will show any errors. Once you're ready, open the PR and one of us will review it. Thanks, and good luck!File list
loki/*
DON'T DOchore(gatsby): Migrate utils/page-data to TypeScript #23436chore(gatsby): Migrate utils/page-data to TypeScript #23991)The text was updated successfully, but these errors were encountered: