-
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): migrate pages reducer to TypeScript #23701
Conversation
3fa83aa
to
8d55794
Compare
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.
Thanks! Just a couple of minor suggestions.
8d55794
to
650ce3a
Compare
@ascorbic Thanks for the review. I amended my commit with your suggestions. 👍 |
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.
Thanks for the changes!
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.
OK, looks like the change to checking just id means it's failing tests. Can you change it and make sure it passes? Thanks.
9ef68fa
to
80a3fea
Compare
It looks like it's more than just one change. Tests are relying on a series of pages created without Because of that, I rolled back to the previous situation (with successful tests) based on checking |
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.
I agree that there are too many places that the tests could break, so the approach you've taken makes sense. I'm ready to approve save one nit.
80a3fea
to
75a380a
Compare
75a380a
to
5d2bb27
Compare
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.
Looks great!
Description
This PR migrates the
gatsby/src/reducers/pages
file to TypeScript.It requires the addition of a new package in the devDependencies of the project,
@types/normalize-path
from theDefinitelyTyped
project.To achieve the migration, I had to update the
IGatsbyPlugin
interface with an optionalid
property, and to fix what appeared to be a typo for thepluginCreator___NODE
property of theCREATE_PAGE
action payload.Related issues
Relates to #21995