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

Some quick tips on updating the upstream Gutenberg packages? #2

Open
JosephusPaye opened this issue Jun 5, 2023 · 1 comment
Open

Comments

@JosephusPaye
Copy link

JosephusPaye commented Jun 5, 2023

Hi @mauricewijnia,

Thanks a lot for your work on this project! I've recently started integrating the block editor into a project of mine and your work here was a great help.

Could you please share (some quick dot points will do) how you go about updating the Gutenberg packages, and what to look out for when doing this?

More details

The script https://github.com/VanOns/block-editor/blob/main/versions.sh that extracts the version numbers of the packages for a local Gutenberg clone is very useful.

I was able to run that after making a slight change (see below), and installed the versions extracted.

versions.sh change

Changed the \d character class to [0-9] due to https://stackoverflow.com/a/3185498

-        VERSION=$(cat $FILE | egrep -o '"version": (".*")' | egrep -o '\d+\.\d+\.\d+')
+        VERSION=$(cat $FILE | egrep -o '"version": (".*")' | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')

I then built the library and fixed a few issues like replacing ReactDOM.render() with createRoot().

Then I ran into other runtime issues that I'm now working my way through, like the one below that occurs whenever a dropdown menu is opened in the editor: it crashes the editor and shows a blank screen:

View error

image

Thanks!

@LittleGit1
Copy link

This would also be very beneficial to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants