Skip to content

Commit 6aeb6be

Browse files
Bump monaco-editor from 0.55.1 to 0.57.0 in the monaco-editor group across 1 directory (#1270)
2 parents 081d7f9 + 0bd3400 commit 6aeb6be

12 files changed

Lines changed: 90 additions & 22 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"@types/node": "20.10.0",
9696
"react-use": "patch:react-use@17.4.0#./patches/react-use.patch",
9797
"react-dnd": "patch:react-dnd@npm:16.0.1#./patches/react-dnd.patch",
98+
"react-monaco-editor": "patch:react-monaco-editor@npm:0.59.0#./patches/react-monaco-editor.patch",
9899
"@types/react": "18.3.12",
99100
"esbuild": "0.28.1",
100101
"dompurify": "3.4.11",

‎packages/suite-base/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
"moment": "2.31.0",
147147
"moment-duration-format": "2.3.2",
148148
"moment-timezone": "0.6.3",
149-
"monaco-editor": "0.55.1",
149+
"monaco-editor": "0.57.0",
150150
"monaco-editor-webpack-plugin": "7.1.1",
151151
"nanoid": "5.1.16",
152152
"natsort": "2.0.3",

‎packages/suite-base/src/panels/UserScriptEditor/Editor.test.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// SPDX-License-Identifier: MPL-2.0
55

66
import { act, render, waitFor } from "@testing-library/react";
7-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
7+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
88

99
import { DEFAULT_STUDIO_SCRIPT_PREFIX } from "@lichtblick/suite-base/util/constants";
1010
import { BasicBuilder } from "@lichtblick/test-builders";
@@ -51,7 +51,7 @@ type MockModel = {
5151
updateOptions: jest.Mock<void, [Record<string, unknown>]>;
5252
getFullModelRange: jest.Mock<Record<string, never>, []>;
5353
};
54-
jest.mock("monaco-editor/esm/vs/editor/editor.api", () => {
54+
jest.mock("monaco-editor/editor/editor.api.js", () => {
5555
const models = new Map<string, MockModel>();
5656

5757
const createModel = (
@@ -105,11 +105,11 @@ jest.mock("monaco-editor/esm/vs/editor/editor.api", () => {
105105
};
106106
});
107107

108-
jest.mock("monaco-editor/esm/vs/editor/browser/services/codeEditorService", () => ({
108+
jest.mock("monaco-editor/editor/browser/services/codeEditorService", () => ({
109109
ICodeEditorService: Symbol("ICodeEditorService"),
110110
}));
111111

112-
jest.mock("monaco-editor/esm/vs/editor/standalone/browser/standaloneServices", () => ({
112+
jest.mock("monaco-editor/editor/standalone/browser/standaloneServices", () => ({
113113
StandaloneServices: {
114114
get: jest.fn(() => ({
115115
registerCodeEditorOpenHandler: jest.fn((handler) => {
@@ -152,7 +152,7 @@ jest.mock("react-monaco-editor", () => {
152152
editorDidMount?: (editor: unknown, monaco: unknown) => void;
153153
onChange?: (code: string) => void;
154154
}) {
155-
const mockMonacoApi = jest.requireMock("monaco-editor/esm/vs/editor/editor.api");
155+
const mockMonacoApi = jest.requireMock("monaco-editor/editor/editor.api.js");
156156
mockOnChange = props.onChange;
157157
mockEditor = createMockEditor();
158158
props.editorWillMount?.(mockMonacoApi);

‎packages/suite-base/src/panels/UserScriptEditor/Editor.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import { useTheme } from "@mui/material";
1818
import { typescript } from "monaco-editor";
1919
// @ts-expect-error ICodeEditorService does not have type information in the monaco-editor package
20-
import { ICodeEditorService } from "monaco-editor/esm/vs/editor/browser/services/codeEditorService";
21-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
20+
import { ICodeEditorService } from "monaco-editor/editor/browser/services/codeEditorService";
21+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
2222
// @ts-expect-error StandaloneService does not have type information in the monaco-editor package
23-
import { StandaloneServices } from "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices";
23+
import { StandaloneServices } from "monaco-editor/editor/standalone/browser/standaloneServices";
2424
import * as path from "path";
2525
import React, { Suspense, ReactElement, useCallback, useEffect, useRef } from "react";
2626
import MonacoEditor, { EditorDidMount, EditorWillMount } from "react-monaco-editor";

‎packages/suite-base/src/panels/UserScriptEditor/Sidebar/index.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { fireEvent, render, screen } from "@testing-library/react";
77
import "@testing-library/jest-dom";
8-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
8+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
99

1010
import LayoutBuilder from "@lichtblick/suite-base/testing/builders/LayoutBuilder";
1111
import ThemeProvider from "@lichtblick/suite-base/theme/ThemeProvider";
@@ -15,7 +15,7 @@ import { Sidebar } from "./index";
1515

1616
const GOTO_UTILS_PATH = "/utils/pointClouds.ts";
1717

18-
jest.mock("monaco-editor/esm/vs/editor/editor.api.js", () => ({
18+
jest.mock("monaco-editor/editor/editor.api.js", () => ({
1919
Uri: { parse: jest.fn((value: string) => ({ path: value })) },
2020
editor: { getModel: jest.fn() },
2121
}));

‎packages/suite-base/src/panels/UserScriptEditor/Sidebar/index.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
Toolbox24Regular,
1212
} from "@fluentui/react-icons";
1313
import { Divider, Paper, Tab, Tabs, tabClasses, tabsClasses } from "@mui/material";
14-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
14+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
1515
import { SyntheticEvent, useCallback, useMemo, useState } from "react";
1616
import tc from "tinycolor2";
1717
import { makeStyles } from "tss-react/mui";

‎packages/suite-base/src/panels/UserScriptEditor/script.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// found at http://www.apache.org/licenses/LICENSE-2.0
1515
// You may not use this file except in compliance with the License.
1616

17-
import { IRange } from "monaco-editor/esm/vs/editor/editor.api.js";
17+
import { IRange } from "monaco-editor/editor/editor.api.js";
1818

1919
export type Script = {
2020
filePath: string;

‎packages/suite-base/src/panels/UserScriptEditor/theme/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// License, v2.0. If a copy of the MPL was not distributed with this
66
// file, You can obtain one at http://mozilla.org/MPL/2.0/
77

8-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
8+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
99

1010
import vsStudioDarkTheme from "./vs-studio-dark";
1111
import vsStudioLightTheme from "./vs-studio-light";

‎packages/suite-base/src/panels/UserScriptEditor/theme/vs-studio-dark.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/* eslint-disable filenames/match-exported */
99

10-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
10+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
1111

1212
const theme: monacoApi.editor.IStandaloneThemeData = {
1313
base: "vs-dark",

‎packages/suite-base/src/panels/UserScriptEditor/theme/vs-studio-light.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/* eslint-disable filenames/match-exported */
99

10-
import * as monacoApi from "monaco-editor/esm/vs/editor/editor.api.js";
10+
import * as monacoApi from "monaco-editor/editor/editor.api.js";
1111

1212
const theme: monacoApi.editor.IStandaloneThemeData = {
1313
base: "vs",

0 commit comments

Comments
 (0)