Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build updates #1143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39,661 changes: 10,072 additions & 29,589 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"react-dom": "^17.0.2",
"react-icons": "^4.8.0",
"react-intl": "^5.20.10",
"vscode-jsonrpc": "^6.0.0",
"vscode-jsonrpc": "^8.0.0",
"vscode-languageserver-protocol": "^3.16.0",
"web-vitals": "^1.1.1",
"xterm": "4.14.1",
Expand Down
4 changes: 2 additions & 2 deletions src/common/VisualViewportCSSVariables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const VisualViewPortCSSVariables = () => {
return;
}
const resizeHandler = () => {
const { width, height } = window.visualViewport;
const { width, height } = window.visualViewport ?? {};
let style = document.getElementById(styleId);
if (!style) {
style = document.head.appendChild(document.createElement("style"));
Expand All @@ -39,7 +39,7 @@ const VisualViewPortCSSVariables = () => {
window.visualViewport.addEventListener("resize", resizeHandler);
resizeHandler();
return () => {
window.visualViewport.removeEventListener("resize", resizeHandler);
window.visualViewport?.removeEventListener("resize", resizeHandler);
const style = document.getElementById(styleId);
if (style) {
style.remove();
Expand Down
2 changes: 1 addition & 1 deletion src/common/use-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type storageType = "local" | "session";
/**
* Local and session storage-backed state (via JSON serialization).
*/
export function useStorage<T>(
export function useStorage<T extends object>(
storageType: storageType,
key: string,
defaultValue: T,
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/common/DocumentationContent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("DocumentationContent", () => {
];
const rendered = render(<DocumentationContent content={content} />);
expect(rendered.container.innerHTML).toMatchInlineSnapshot(
`"<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>"`
`"<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>"`
);
});

Expand Down
2 changes: 1 addition & 1 deletion src/editor/codemirror/dnd-decorations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe("dndDecorations", () => {

// ...and later dispatches timeout effect
// (we've reduced the delay to 0 but it's still async)
const mockDispatch = view.dispatch as jest.MockedFunction<
const mockDispatch = view.dispatch as unknown as jest.MockedFunction<
(t: Transaction) => void
>;
expect(mockDispatch.mock.calls.length).toEqual(0);
Expand Down
1 change: 1 addition & 0 deletions src/simulator/DataLoggingModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { DataLog } from "../device/simulator";
import { useLogging } from "../logging/logging-hooks";
import { useDataLog } from "./data-logging-hooks";
import { useAutoScrollToBottom } from "./scroll-hooks";
import { saveAs } from "file-saver";

export interface DataLoggingModuleProps {
icon: ReactNode;
Expand Down