Skip to content

Add missing dependency of @wordpress/patterns on @babel/runtime#54118

Merged
gziolo merged 1 commit intoWordPress:trunkfrom
anomiex:fix/missing-deps
Sep 2, 2023
Merged

Add missing dependency of @wordpress/patterns on @babel/runtime#54118
gziolo merged 1 commit intoWordPress:trunkfrom
anomiex:fix/missing-deps

Conversation

@anomiex
Copy link
Copy Markdown
Contributor

@anomiex anomiex commented Sep 1, 2023

What?

Add missing dependency of @wordpress/patterns on @babel/runtime

Why?

Build code transformations can introduce dependencies on packages such as @wordpress/element and @babel/runtime. These need to be declared if the package is to function correctly with yarn's p'n'p or pnpm with hoisting disabled.

How?

Adding the missing dependencies. Normally I'd probably have done the @babel/runtime dep as a peer dep, but I see you use a normal dependency everywhere else so I followed along.

Testing Instructions

  1. Follow the reproduction instructions in the linked bug to set up the test and reproduce the bug.
  2. Do yarn add <package>@file:/path/to/gutenberg/packages/<package> or pnpm add <package>@file:/path/to/gutenberg/packages/<package> to point yarn or pnpm at the locally built version of the package.
  3. Repeat the final instruction in the reproduction to check that the bug is fixed.

Build code transformations can introduce dependencies on packages such
as @wordpress/element and @babel/runtime. These need to be declared if
the package is to function correctly with yarn's p'n'p or pnpm with
hoisting disabled.

- @wordpress/patterns depends on @babel/runtime (fixes WordPress#54115)
@anomiex
Copy link
Copy Markdown
Contributor Author

anomiex commented Sep 1, 2023

Ping @glendaviesnz, @kevin940726, @andrewserong as people responsible for adding this in #53161, and @gziolo since you merged the similar #41486 for me recently.

@gziolo
Copy link
Copy Markdown
Member

gziolo commented Sep 2, 2023

Adding the missing dependencies. Normally I'd probably have done the @babel/runtime dep as a peer dep, but I see you use a normal dependency everywhere else so I followed along

Yes, we should start using peer dependencies more now that the Gutenberg project switched to Node 16 and npm 8. We probably need to stop using legacy peer deps flag first:

legacy-peer-deps = true

@gziolo gziolo added [Type] Code Quality Issues or PRs that relate to code quality [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Sep 2, 2023
@gziolo gziolo merged commit 3b114f7 into WordPress:trunk Sep 2, 2023
@github-actions github-actions bot added this to the Gutenberg 16.7 milestone Sep 2, 2023
jamestitus299 added a commit to jamestitus299/gutenberg that referenced this pull request Sep 4, 2023
@anomiex anomiex deleted the fix/missing-deps branch October 9, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@wordpress/patterns is missing a dependency on @babel/runtime

2 participants