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

Try: Upgrade @wordpress packages to pre-React 18 #73155

Closed
wants to merge 31 commits into from

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Feb 9, 2023

This PR aims to upgrade the @wordpress packages to versions before upgrading to React 18.

Still in progress and very far from ready.

DO NOT MERGE.

@tyxla tyxla added [Status] In Progress DO NOT MERGE dependencies Pull requests that update a dependency file labels Feb 9, 2023
@tyxla tyxla self-assigned this Feb 9, 2023
@github-actions
Copy link

github-actions bot commented Feb 9, 2023

@matticbot
Copy link
Contributor

This PR modifies the release build for editing-toolkit

To test your changes on WordPress.com, run install-plugin.sh editing-toolkit try/upgrade-wordpress-packages-pre-react18 on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-mMA-p2

@matticbot
Copy link
Contributor

This PR modifies the release build for wpcom-block-editor

To test your changes on WordPress.com, run install-plugin.sh wpcom-block-editor try/upgrade-wordpress-packages-pre-react18 on your sandbox.

To deploy your changes after merging, see the documentation: PCYsg-l4k-p2

@tyxla tyxla force-pushed the try/upgrade-wordpress-packages-pre-react18 branch from 452ee8b to ed1aaa4 Compare February 9, 2023 14:13
@noahtallen
Copy link
Contributor

noahtallen commented Feb 9, 2023

Ah, I remember starting to look at some of these. I think the big change is that @wordpress/data now bundles its own types. As a result, we can remove @types/wordpress__data, but this also means we have to rework how we define types for some of our data stores.

Essentially, the issue Cannot redeclare block-scoped variable 'select'. happens because we use declare module '@wordpress/data' to provide our own types for data stores currently (along with registerStore). But registerStore has been deprecated now in favor of register, which I think allows types to work successfully without declaring the module ourselves.

Once I tried switching from registerStore to register, I recall an issue with the persistence plugin, which was never updated to handle the newer API

At that point, I had some other priorities so I didn't get a chance to follow-up.

@tyxla
Copy link
Member Author

tyxla commented Feb 9, 2023

Yup 👍 What you said, essentially. I'm happy to give it a try and see where it goes. Will ping you when I get it closer 😉

@tyxla tyxla force-pushed the try/upgrade-wordpress-packages-pre-react18 branch 3 times, most recently from e0f34a5 to 2eaf5f9 Compare February 14, 2023 10:25
@tyxla tyxla force-pushed the try/upgrade-wordpress-packages-pre-react18 branch from dac32d0 to e528dc6 Compare February 23, 2023 09:56
@tyxla
Copy link
Member Author

tyxla commented Feb 23, 2023

This got way messier than I was hoping it to be. I'm going to close it and retry another time. Maybe we should do it in smaller chunks of versions and not with such a huge leap forward.

@tyxla tyxla closed this Feb 23, 2023
@tyxla tyxla deleted the try/upgrade-wordpress-packages-pre-react18 branch February 23, 2023 13:53
@arthur791004
Copy link
Contributor

Okay! I'll continue on #73078 to see how it works 🙂

@tyxla
Copy link
Member Author

tyxla commented Feb 24, 2023

Thanks, @arthur791004. I've also left some thoughts in #73629 (comment) in case that helps your scenario.

@tyxla tyxla restored the try/upgrade-wordpress-packages-pre-react18 branch February 28, 2023 10:47
@tyxla tyxla deleted the try/upgrade-wordpress-packages-pre-react18 branch February 28, 2023 10:50
@tyxla
Copy link
Member Author

tyxla commented Feb 28, 2023

I've started work on a second take in #73890 and will be working on it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file DO NOT MERGE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants