Commit deddbd0
committed
Post Revisions: Migrate remaining
Addresses review feedback on #77992 (findings 2, 3, 4, 10).
- `preserve-client-ids.js` and `block-compare/index.js` now import
`diffArrays` / `diffChars` from the top-level `'diff'` package
instead of the deep `'diff/lib/diff/<name>'` paths. v8's
`package.json` `exports` map only wildcards `./lib/*.js` (with
extension); the bare-folder `./lib/` mapping requires a trailing
slash. The deep paths only resolve here because the bundler/Jest
resolver fills in `.js` -- a future tooling change could break
them. v8 also marks the package `sideEffects: false`, so the
historical tree-shaking reason for the deep imports no longer
applies. The "diff doesn't tree-shake correctly" comment in
`block-compare/index.js` is now stale and gets removed.
- Add `### Internal` entries to `packages/editor/CHANGELOG.md` and
`packages/block-editor/CHANGELOG.md` recording the major dependency
bump.diff imports, add CHANGELOG entries1 parent ed40824 commit deddbd0
4 files changed
Lines changed: 10 additions & 4 deletions
File tree
- packages
- block-editor
- src/components/block-compare
- editor
- src/components/post-revisions-preview
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments