Skip to content

Commit

Permalink
Upgraded monaco editors and fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrycampion committed Dec 14, 2023
1 parent 4855aef commit 39aa876
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 34 deletions.
127 changes: 98 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"js-yaml": "^4.1.0",
"jszip": "^3.10.1",
"lodash-es": "^4.17.21",
"monaco-editor": "^0.40.0",
"monaco-yaml": "^4.0.4",
"monaco-editor": "^0.44.0",
"monaco-yaml": "^5.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-infinite-scroll-component": "^6.1.0",
"react-json-view": "^1.21.3",
"react-monaco-editor": "^0.54.0",
"react-monaco-editor": "^0.55.0",
"react-multi-split-pane": "^0.3.3",
"react-scripts": "^5.0.1",
"web-vitals": "^1.1.2",
Expand Down
5 changes: 3 additions & 2 deletions src/components/AppContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import AppContext, {
} from "./AppContext";
import { TOrder } from "../types/TOrder";
import { AlertState } from "./GeneralAlert/GeneralAlert";
import { SchemasSettings, setDiagnosticsOptions } from "monaco-yaml";
import { configureMonacoYaml, SchemasSettings } from "monaco-yaml";
import { IUser } from "../types/IUser";
import { IRule } from "../types/IRule";
import * as monaco from "monaco-editor";

const AppContextProvider = ({ children }: { children: React.ReactNode }) => {
const [dataService] = useState<DataService>(() => new DataService());
Expand Down Expand Up @@ -168,7 +169,7 @@ const AppContextProvider = ({ children }: { children: React.ReactNode }) => {
/* Load yaml schema for editor validation */
useEffect(() => {
dataService.get_rules_schema().then(function (schemas: ISchema[]) {
setDiagnosticsOptions({
configureMonacoYaml(monaco, {
validate: true,
enableSchemaRequest: true,
format: true,
Expand Down

0 comments on commit 39aa876

Please sign in to comment.