Update @woocommerce/components
This commit is contained in:
22
.pnpmfile.cjs
Normal file
22
.pnpmfile.cjs
Normal file
@@ -0,0 +1,22 @@
|
||||
function readPackage(pkg) {
|
||||
// Resolve @wordpress/* dependencies of @woocommerce packages to those used by MailPoet.
|
||||
// This avoids their duplication and downgrading due to @woocommerce pinning them to wp-6.0.
|
||||
// This should be removed once we adopt similar pinning strategy and use dependency extraction.
|
||||
// See: https://github.com/woocommerce/woocommerce/pull/37034
|
||||
if (pkg.name?.startsWith('@woocommerce/')) {
|
||||
pkg.dependencies = Object.fromEntries(
|
||||
Object.entries(pkg.dependencies).map(([name, version]) =>
|
||||
name.startsWith('@wordpress/') || name.startsWith('@types/wordpress__')
|
||||
? [name, '*']
|
||||
: [name, version],
|
||||
),
|
||||
);
|
||||
}
|
||||
return pkg;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
hooks: {
|
||||
readPackage,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user