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

CTF-next: rewrite to TypeScript #37123

Conversation

axe312ger
Copy link
Collaborator

@axe312ger axe312ger commented Nov 29, 2022

Refactors the plugin code base to TS.

Will eventually increase reliability and developer experience.

Also, as we have a detailed, big, code review upcoming with the next version. Doing this now allows us to review the TS port at the same time.

This turns #30855 into TypeScript

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 29, 2022
@LekoArts LekoArts added topic: source-contentful Related to Gatsby's integration with Contentful topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 23, 2023
@axe312ger axe312ger requested a review from LekoArts March 8, 2023 10:37
@axe312ger axe312ger marked this pull request as ready for review March 8, 2023 10:37
"build": "babel src --out-dir . --ignore **/__tests__ --ignore **/__fixtures__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__ --ignore **/__fixtures__"
"build": "babel src --out-dir dist/ --ignore \"**/__tests__\" --ignore \"**/__mocks__\" --extensions \".ts,.js\"",
Copy link

Choose a reason for hiding this comment

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

I might be missing something, but what's the reason for building the plugin? Is it needed for Gatsby projects that aren't compiling TypeScript yet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, it is because plugins need to be provided in JS.

@@ -1,8 +1,8 @@
{
"name": "gatsby-source-contentful",
"description": "Gatsby source plugin for building websites using the Contentful CMS as a data source",
"version": "8.8.0-next.0",
Copy link

Choose a reason for hiding this comment

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

Is the change from 8 to 0 intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, the projects repository automation will take care of versioning :)

Comment on lines 261 to 262
// _context: any,
// _info: GraphQLResolveInfo,
Copy link

Choose a reason for hiding this comment

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

Comments can be removed, right?

@axe312ger axe312ger merged commit 8ca82f7 into feat/contentful-schema-generation Mar 17, 2023
@axe312ger axe312ger deleted the feat/contentful-schema-generation-typescript branch March 17, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-contentful Related to Gatsby's integration with Contentful topic: TypeScript Issues and PRs related to TS in general, public typings or gatsby-plugin-typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants