Commit 9bf43b4
Update wordpress monorepo (#45915)
* Update wordpress monorepo
* pnpmfile: `@automattic/components` is not compatible with `@wordpress/icons` v11
* Pnpmfile hack for `@wordpress/media-utils` and `@wordpress/admin-ui` missing deps on `react`
* tests: Fix deep mocking
Various packages are now using `exports`, which means we can't have jest
mock some deep entry point anymore. Fortunately all the tests seem ok
with using a Proxy object to mock the whole package.
* pnpm: Hack packages to flag ESM files correctly as ESM
We do this by injecting a stub `package.json` into the directory holding
the ESM `.js` files, because the resolution algorithm looks at the
closest package.json rather than the package-as-a-whole's package.json.
On the down side, we have to make sure to copy the `sideEffects`
property into the stub, because that too looks at the closest one.
Hopefully there aren't more things like that.
In addition to the Gutenberg packages, the `uuid` package also has this
issue showing up now for some reason.
* webpack: Set `resolve.fullySpecified` to false for Gutenberg packages
When the file is correctly flagged as containing ESM, Webpack by default
requires the full file import rather than a directory or extensionless
import. We can change that behavior by setting `resolve.fullySpecified`.
Gutenberg itself doesn't run into this because they're relying on
webpack/babel to be lenient with files that are flagged as CommonJS but
contain ESM code.
* scan: Revert dataviews test hack from #45551
No longer necessary after the ESM-fixing hack in this PR.
* Gutenberg seems to have stopped publishing the `.native.js` entry
points. Disable linting of our `.native.[jt]s` files until that is
resolved.
* Fix typechecks
We can't deep-import the types directly anymore, so we have to start
with what we can import and use utility functions and accessors to drill
down to the types we need.
* forms: Hack around `@wordpress/interactivity` going ESM-only.
I worked out a hacky way to get the test to pass without being too
invasive.
In the long run it would be better to convert `packages/forms` to run
Jest in ESM mode, i.e.
`NODE_OPTIONS=--experimental-vm-modules jest --config=tests/jest.config.js`.
But making that happen will be a lot more invasive: probably you'll need
to set `"type": "module"` in `package.json` too so all the existing
ESM-containing `.js` files get properly interpreted as ESM, and then
you'll have to fully specify all the imports (i.e. change `import from
'./subdir'` to `import from './subdir/index.js'` and `import from
'./file'` to `import from './file.js'`), and clean up anything else that
breaks too.
On the easier side, you could just rename some of the config files, like
`babel.config.js` → `babel.config.cjs` and `tools/webpack.config.*.js` →
`tools/webpack.config.*.cjs`, if converting them is too annoying.
---------
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>1 parent e6e29dc commit 9bf43b4
File tree
180 files changed
+3629
-3279
lines changed- .pnpm-patches
- projects
- js-packages
- ai-client
- changelog
- api
- changelog
- base-styles
- changelog
- boost-score-api
- changelog
- charts
- changelog
- components
- changelog
- connection
- changelog
- eslint-config-target-es
- changelog
- i18n-loader-webpack-plugin
- changelog
- idc
- changelog
- licensing
- changelog
- partner-coupon
- changelog
- publicize-components
- changelog
- src
- components
- generated-image-preview/test
- social-image-generator/panel/test
- social-store
- selectors
- scan
- changelog
- storybook
- changelog
- webpack-config
- changelog
- packages
- assets
- changelog
- backup
- changelog
- blaze
- changelog
- classic-theme-helper
- changelog
- connection
- changelog
- explat
- changelog
- external-connections
- changelog
- external-media
- changelog
- forms
- changelog
- src/dashboard/components/layout
- tests
- tools
- jetpack-mu-wpcom
- changelog
- src/features/wpcom-block-editor-nux/src/recommended-tags-modal
- jitm
- changelog
- masterbar
- changelog
- my-jetpack
- _inc
- components/my-jetpack-tab-panel
- context/notices
- changelog
- paypal-payments
- changelog
- post-list
- changelog
- publicize
- changelog
- search
- changelog
- tools
- subscribers-dashboard
- changelog
- videopress
- changelog
- woocommerce-analytics
- changelog
- yoast-promo
- changelog
- plugins
- automattic-for-agencies-client
- changelog
- boost
- changelog
- classic-theme-helper-plugin
- changelog
- crm
- changelog
- inspect
- changelog
- jetpack
- changelog
- extensions
- blocks
- blog-stats/test
- google-calendar/test
- plugins/ai-assistant-plugin/components/breve
- highlight
- utils
- tools
- paypal-payment-buttons
- changelog
- protect
- changelog
- starter-plugin
- changelog
- videopress
- changelog
- tools
- e2e-commons
- js-tools
- eslintrc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
180 files changed
+3629
-3279
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments