Skip to content

Commit 1bc564e

Browse files
committed
chore: upgrade deps
- update Lexical v0.41.0 - tighten workspace overrides - fix linting after upgraded `eslint-plugin-react-hooks` - fix API extraction
1 parent 4b5802f commit 1bc564e

File tree

25 files changed

+2327
-3251
lines changed

25 files changed

+2327
-3251
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ updates:
88
open-pull-requests-limit: 0
99
exclude-paths:
1010
# Copied in from another repo and only used for testing when running the demo
11+
- "/demos/platform/lib/**"
1112
- "demos/platform/lib/**"

demos/perf-react/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"react-dom": ">=18.3.1"
1212
},
1313
"dependencies": {
14-
"@lexical/headless": "^0.40.0",
15-
"@lexical/html": "^0.40.0",
16-
"@lexical/react": "^0.40.0",
17-
"@lexical/selection": "^0.40.0",
18-
"@lexical/utils": "^0.40.0",
14+
"@lexical/headless": "^0.41.0",
15+
"@lexical/html": "^0.41.0",
16+
"@lexical/react": "^0.41.0",
17+
"@lexical/selection": "^0.41.0",
18+
"@lexical/utils": "^0.41.0",
1919
"base-64": "^1.0.0",
2020
"epitelete-html": "^0.2.21-beta.2",
2121
"json-difference": "^1.16.1",
22-
"lexical": "^0.40.0",
22+
"lexical": "^0.41.0",
2323
"open-patcher": "1.0.0-beta.1",
2424
"proskomma-core": "^0.11.3",
2525
"pure-uuid": "^1.8.1"

demos/perf-vanilla/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"dev": "vite"
88
},
99
"dependencies": {
10-
"@lexical/rich-text": "^0.40.0",
11-
"lexical": "^0.40.0"
10+
"@lexical/rich-text": "^0.41.0",
11+
"lexical": "^0.41.0"
1212
},
1313
"devDependencies": {
1414
"shared": "workspace:~",

demos/platform/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"dependencies": {
1313
"@eten-tech-foundation/platform-editor": "workspace:~",
1414
"@eten-tech-foundation/scripture-utilities": "workspace:~",
15-
"@sillsdev/scripture": "^2.0.3",
16-
"lucide-react": "^0.475.0"
15+
"@sillsdev/scripture": "^2.0.4",
16+
"lucide-react": "^0.577.0"
1717
},
1818
"devDependencies": {
1919
"platform-bible-react": "file:./lib/platform-bible-react",
2020
"platform-bible-utils": "file:./lib/platform-bible-utils",
21-
"tailwindcss": "4.1.18",
21+
"tailwindcss": "4.2.1",
2222
"tailwindcss-animate": "1.0.7",
2323
"test-data": "workspace:~"
2424
},

demos/platform/src/app/DropDown.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,11 @@ function DropDownItems({
105105
}
106106
};
107107

108-
const contextValue = useMemo(
109-
() => ({
110-
registerItem,
111-
}),
112-
[registerItem],
113-
);
108+
const contextValue = useMemo(() => ({ registerItem }), [registerItem]);
114109

115110
useEffect(() => {
116-
if (items && !highlightedItem) {
117-
setHighlightedItem(items[0]);
118-
}
119-
120-
if (highlightedItem && highlightedItem.current) {
121-
highlightedItem.current.focus();
122-
}
111+
const activeItem = highlightedItem ?? items?.[0];
112+
if (activeItem?.current) activeItem.current.focus();
123113
}, [items, highlightedItem]);
124114

125115
return (

demos/platform/src/app/app.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,7 @@ export default function App() {
139139
if (viewMode === UNDEFINED_VIEW_MODE) return undefined;
140140
if (viewMode === CUSTOM_VIEW_MODE) return { markerMode, noteMode, hasSpacing, isFormattedFont };
141141

142-
const _viewOptions = getViewOptions(viewMode);
143-
setMarkerMode(_viewOptions?.markerMode ?? "hidden");
144-
setNoteMode(_viewOptions?.noteMode ?? "collapsed");
145-
setHasSpacing(_viewOptions?.hasSpacing ?? true);
146-
setIsFormattedFont(_viewOptions?.isFormattedFont ?? true);
147-
return _viewOptions;
142+
return getViewOptions(viewMode);
148143
}, [viewMode, markerMode, noteMode, hasSpacing, isFormattedFont]);
149144

150145
const customNodeOptions = useMemo<UsjNodeOptions>(
@@ -205,6 +200,7 @@ export default function App() {
205200

206201
const formattedNodeOptions = useMemo(
207202
() =>
203+
// eslint-disable-next-line react-hooks/refs -- Debug-only serialization must reflect the live nodeOptions object, including callable fields.
208204
JSON.stringify(nodeOptions, (_key, value) =>
209205
typeof value === "function" ? "<Function>" : value,
210206
)

libs/shared-react/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
},
3737
"dependencies": {
3838
"@eten-tech-foundation/scripture-utilities": "workspace:~",
39-
"@floating-ui/dom": "^1.7.5",
40-
"@lexical/react": "^0.40.0",
41-
"@lexical/utils": "^0.40.0",
42-
"fast-equals": "^5.2.2",
43-
"lexical": "^0.40.0",
39+
"@floating-ui/dom": "^1.7.6",
40+
"@lexical/react": "^0.41.0",
41+
"@lexical/utils": "^0.41.0",
42+
"fast-equals": "^5.4.0",
43+
"lexical": "^0.41.0",
4444
"quill-delta": "^5.1.0"
4545
},
4646
"devDependencies": {

libs/shared-react/src/plugins/usj/ContextMenuPlugin.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function ContextMenuItem({
3737
onMouseEnter: () => void;
3838
option: ContextMenuOption;
3939
}) {
40+
/* eslint-disable react-hooks/refs -- Lexical MenuOption API stores interaction fields on option instances consumed during render. */
4041
let className = "item";
4142
if (isSelected) {
4243
className += " selected";
@@ -60,6 +61,7 @@ function ContextMenuItem({
6061
<span className="text">{option.title}</span>
6162
</li>
6263
);
64+
/* eslint-enable react-hooks/refs */
6365
}
6466

6567
function ContextMenu({

libs/shared-react/src/plugins/usj/react-test.utils.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
LexicalNode,
2727
SerializedEditorState,
2828
} from "lexical";
29-
import { ReactNode } from "react";
29+
import { ReactNode, useEffect } from "react";
3030
import { segmentState, SerializedNoteNode, SerializedParaNode, TypedMarkNode } from "shared";
3131

3232
export async function baseTestEnvironment(
@@ -36,7 +36,12 @@ export async function baseTestEnvironment(
3636
let editor: LexicalEditor;
3737

3838
function GrabEditor() {
39-
[editor] = useLexicalComposerContext();
39+
const [composerEditor] = useLexicalComposerContext();
40+
41+
useEffect(() => {
42+
editor = composerEditor;
43+
}, [composerEditor]);
44+
4045
return null;
4146
}
4247

libs/shared/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
},
3838
"dependencies": {
3939
"@eten-tech-foundation/scripture-utilities": "workspace:~",
40-
"@lexical/mark": "^0.40.0",
41-
"@lexical/utils": "^0.40.0",
42-
"@sillsdev/scripture": "^2.0.3",
43-
"lexical": "^0.40.0",
40+
"@lexical/mark": "^0.41.0",
41+
"@lexical/utils": "^0.41.0",
42+
"@sillsdev/scripture": "^2.0.4",
43+
"lexical": "^0.41.0",
4444
"tslib": "^2.8.1"
4545
},
4646
"devDependencies": {

0 commit comments

Comments
 (0)