@wordpress/patterns
is missing a dependency on @babel/runtime
#54115
Labels
[Status] In Progress
Tracking issues with work in progress
The package
@wordpress/patterns
attempts to use@babel/runtime
frombuild/store/index.js
and a few other files, but does not declare a dependency or peer dependency on that package.This happens to work with
npm
's hoisting due to other dependencies pulling that package in, but will fail with yarn's p'n'p or pnpm with hoisting disabled.Reproduction
With yarn:
echo '{}' > package.json
yarn set version stable
yarn add @wordpress/patterns react@^18 react-dom@^18 jsdom global-jsdom
yarn add yjs
(to work around a bug in y-webrtc)yarn node -e 'require( "global-jsdom/register" ); const x = require( "@wordpress/patterns" ); console.log( typeof x );'
With pnpm:
echo 'hoist-pattern=[]' > .npmrc
pnpm add @wordpress/patterns global-jsdom
(note pnpm 8 defaults to installing peer deps)pnpm add yjs
(to work around a bug in y-webrtc)node -e 'require( "global-jsdom/register" ); const x = require( "@wordpress/patterns" ); console.log( typeof x );'
Expected behavior
Output along the lines of
Actual behavior
With yarn:
With pnpm:
The text was updated successfully, but these errors were encountered: