-
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
chore(gatsby): Convert jobs-manager to typescript #22189
Conversation
9b4bfd3
to
1d9d07e
Compare
1d9d07e
to
aebcb60
Compare
aebcb60
to
811fd6f
Compare
I completely forgot to push my changes. I have reverted the changes to the tests, since I cannot figure out how to handle module isolation in typescript. |
(I've converted this PR into a Draft PR) |
This is not a draft, the PR is finished in my opinion, just waiting for a final review. I should've removed that label 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey the PR looks good to me. One change I'd like to request is to move the types to the top directly after the imports. Other comments are minor or can be ignored for this PR. Thank you!
811fd6f
to
66bf919
Compare
Gatsby Cloud Build Report🚩 Your build failed. See the build logs here Errors Error in "/usr/src/app/www/examples/gatsbygram/node_modules/gatsby-plugin-page-creator/gatsby-node.js": Cannot find module 'gatsby-cli/lib/reporter' Require stack: - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby-plugin-page-creator/is-valid-collection-path-implementation.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby-plugin-page-creator/create-pages-from-collection-builder.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby-plugin-page-creator/create-page-wrapper.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby-plugin-page-creator/gatsby-node.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bootstrap/load-plugins/load.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bootstrap/load-plugins/index.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/services/initialize.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/services/index.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bootstrap/index.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/commands/build.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/node_modules/gatsby-cli/lib/create-cli.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/node_modules/gatsby-cli/lib/index.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/dist/bin/gatsby.js - /usr/src/app/www/examples/gatsbygram/node_modules/gatsby/cli.js |
Ah looks like |
Looks like my editor removed all trailing |
Okay there are some pre-commit tasks which keep formatting the file and removing trailing |
I'm actually about to go on vacation so if we can't resolve that before then, somebody else will take over. But I think this is about ready to merge. |
This seems like an actual problem:
Looks like you can repro this locally by running |
@martijnjanssen friendly ping :) |
I've went ahead and fixed the two remaining typing problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, let's merge it!
Thank you so much for contributing to our TypeScript refactor! We have more work to do and we would love to have you stay involved in our transition. Please submit more PRs! 💜
* chore(gatsby) convert jobs-manager to typescript * chore(gatsby) revert jobs-manager tests to js * chore(gatsby) fix formatting for jobs-manager * chore(gatsby) move imports for jobs-manager after imports * Chore(gatsby) check contentDigest of job when checking internalJob * Chore(gatsby) declare WorkerError before usage * chore: format * Fix types Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com> Co-authored-by: Peter van der Zee <github-public@qfox.nl>
Description
This converts the
gatsby/util/jobs-manager
and the corresponding tests to typescript, one more step towards a fully typed core codebase! I do think that I have gotten the lion's share of the types correct and don't think I have forgotten anything, but if I did, please say so 🙏Related Issues
Related to #21995