Skip to content

Commit 752b4ce

Browse files
Build updates (#1143)
Fixes issues encountered building on a new local install with Node 20 Minor non-visual icon difference in the test update.
1 parent b2b1ca2 commit 752b4ce

File tree

7 files changed

+10079
-29595
lines changed

7 files changed

+10079
-29595
lines changed

package-lock.json

+10,072-29,589
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"react-dom": "^17.0.2",
4848
"react-icons": "^4.8.0",
4949
"react-intl": "^5.20.10",
50-
"vscode-jsonrpc": "^6.0.0",
50+
"vscode-jsonrpc": "^8.0.0",
5151
"vscode-languageserver-protocol": "^3.16.0",
5252
"web-vitals": "^1.1.1",
5353
"xterm": "4.14.1",

src/common/VisualViewportCSSVariables.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const VisualViewPortCSSVariables = () => {
2828
return;
2929
}
3030
const resizeHandler = () => {
31-
const { width, height } = window.visualViewport;
31+
const { width, height } = window.visualViewport ?? {};
3232
let style = document.getElementById(styleId);
3333
if (!style) {
3434
style = document.head.appendChild(document.createElement("style"));
@@ -39,7 +39,7 @@ const VisualViewPortCSSVariables = () => {
3939
window.visualViewport.addEventListener("resize", resizeHandler);
4040
resizeHandler();
4141
return () => {
42-
window.visualViewport.removeEventListener("resize", resizeHandler);
42+
window.visualViewport?.removeEventListener("resize", resizeHandler);
4343
const style = document.getElementById(styleId);
4444
if (style) {
4545
style.remove();

src/common/use-storage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type storageType = "local" | "session";
1010
/**
1111
* Local and session storage-backed state (via JSON serialization).
1212
*/
13-
export function useStorage<T>(
13+
export function useStorage<T extends object>(
1414
storageType: storageType,
1515
key: string,
1616
defaultValue: T,

src/documentation/common/DocumentationContent.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe("DocumentationContent", () => {
4848
];
4949
const rendered = render(<DocumentationContent content={content} />);
5050
expect(rendered.container.innerHTML).toMatchInlineSnapshot(
51-
`"<div class=\\"chakra-stack css-bs1yt6\\"><p><a target=\\"_blank\\" rel=\\"nofollow noopener\\" class=\\"chakra-link css-1w3ukj\\" href=\\"https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4\\">Read more about ASCII<svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 24 24\\" focusable=\\"false\\" class=\\"chakra-icon css-q1kx43\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\"><g><path fill=\\"none\\" d=\\"M0 0h24v24H0z\\"></path><path d=\\"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm11-3v8h-2V6.413l-7.793 7.794-1.414-1.414L17.585 5H13V3h8z\\"></path></g></svg></a>.</p></div>"`
51+
`"<div class=\\"chakra-stack css-bs1yt6\\"><p><a target=\\"_blank\\" rel=\\"nofollow noopener\\" class=\\"chakra-link css-1w3ukj\\" href=\\"https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4\\">Read more about ASCII<svg stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" viewBox=\\"0 0 24 24\\" focusable=\\"false\\" class=\\"chakra-icon css-q1kx43\\" height=\\"1em\\" width=\\"1em\\" xmlns=\\"http://www.w3.org/2000/svg\\"><path d=\\"M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z\\"></path></svg></a>.</p></div>"`
5252
);
5353
});
5454

src/editor/codemirror/dnd-decorations.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe("dndDecorations", () => {
7979

8080
// ...and later dispatches timeout effect
8181
// (we've reduced the delay to 0 but it's still async)
82-
const mockDispatch = view.dispatch as jest.MockedFunction<
82+
const mockDispatch = view.dispatch as unknown as jest.MockedFunction<
8383
(t: Transaction) => void
8484
>;
8585
expect(mockDispatch.mock.calls.length).toEqual(0);

src/simulator/DataLoggingModule.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { DataLog } from "../device/simulator";
2525
import { useLogging } from "../logging/logging-hooks";
2626
import { useDataLog } from "./data-logging-hooks";
2727
import { useAutoScrollToBottom } from "./scroll-hooks";
28+
import { saveAs } from "file-saver";
2829

2930
export interface DataLoggingModuleProps {
3031
icon: ReactNode;

0 commit comments

Comments
 (0)