Repository navigation
Commit 7d37593
Packages: Declare missing peer dependencies and check them in CI (#83765)
* Packages: Forward the React peer dependencies of their dependencies
Declare react-dom (and react where missing) with optional types as peers of every package that depends on a package peering on them, so strict package managers such as Yarn PnP can resolve them.
* Theme: Make the React peer dependencies optional
The design tokens, stylelint, and bundler plugins do not load React, so consumers such as @wordpress/eslint-plugin and @wordpress/stylelint-config need not provide it.
* Build tools: Declare the missing peers of third-party dependencies
Add @babel/core to @wordpress/build for esbuild-plugin-babel, add stylelint-scss to @wordpress/scripts for @wordpress/stylelint-config, and make the types-only @types/node peer of @wordpress/e2e-test-utils-playwright optional.
* Validation: Check that published packages declare the peers of their dependencies
npm hoists and auto-installs peers, so a package that does not forward the peers of its dependencies only fails under strict package managers such as Yarn PnP. The check reads package-lock.json only, so it works with both the hoisted and linked install strategies.
* Changelogs: Link the pull request
Co-authored-by: manzoorwanijk <manzoorwanijk@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>1 parent 7ba4164 commit 7d37593
64 files changed
Lines changed: 712 additions & 43 deletions
File tree
- .github/workflows
- packages
- abilities
- admin-ui
- annotations
- blocks
- compose
- connectors
- core-abilities
- dashboard-init
- data-controls
- data
- e2e-test-utils-playwright
- edit-site-init
- fields
- global-styles-engine
- icons
- keyboard-shortcuts
- lazy-editor
- media-editor
- media-fields
- media-utils
- notices
- primitives
- react-i18n
- rich-text
- router
- route
- scripts
- theme
- viewport
- views
- wp-build
- tools/validation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
0 commit comments