From 39aa87616ba8d34c8fa79f5486fa073d88e686c3 Mon Sep 17 00:00:00 2001 From: Gerry Campion Date: Thu, 14 Dec 2023 12:10:37 -0500 Subject: [PATCH] Upgraded monaco editors and fixed build --- package-lock.json | 127 ++++++++++++++++++++------ package.json | 6 +- src/components/AppContextProvider.tsx | 5 +- 3 files changed, 104 insertions(+), 34 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5f23ddc..32fa3ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,13 +21,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", @@ -15172,9 +15172,21 @@ } }, "node_modules/monaco-editor": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.40.0.tgz", - "integrity": "sha512-1wymccLEuFSMBvCk/jT1YDW/GuxMLYwnFwF9CDyYCxoTw2Pt379J3FUhwy9c43j51JdcxVPjwk0jm0EVDsBS2g==" + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.44.0.tgz", + "integrity": "sha512-5SmjNStN6bSuSE5WPT2ZV+iYn1/yI9sd4Igtk23ChvqB7kDk9lZbB9F5frsuvpB+2njdIeGGFf2G4gbE6rCC9Q==" + }, + "node_modules/monaco-languageserver-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/monaco-languageserver-types/-/monaco-languageserver-types-0.2.3.tgz", + "integrity": "sha512-QyV5R7s+rJ87bX1sRioMJZULWiTnMp0Vm+RLILgMEL0SqWuBsQBSW0EZunr4xMZhv6Qun3UZNCN4JrCCLURcgQ==", + "dependencies": { + "monaco-types": "^0.1.0", + "vscode-languageserver-protocol": "^3.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/remcohaszing" + } }, "node_modules/monaco-marker-data-provider": { "version": "1.1.1", @@ -15187,6 +15199,14 @@ "monaco-editor": ">=0.30.0" } }, + "node_modules/monaco-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/monaco-types/-/monaco-types-0.1.0.tgz", + "integrity": "sha512-aWK7SN9hAqNYi0WosPoMjenMeXJjwCxDibOqWffyQ/qXdzB/86xshGQobRferfmNz7BSNQ8GB0MD0oby9/5fTQ==", + "funding": { + "url": "https://github.com/sponsors/remcohaszing" + } + }, "node_modules/monaco-worker-manager": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/monaco-worker-manager/-/monaco-worker-manager-2.0.1.tgz", @@ -15196,13 +15216,15 @@ } }, "node_modules/monaco-yaml": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/monaco-yaml/-/monaco-yaml-4.0.4.tgz", - "integrity": "sha512-qbM36fY1twpDUs4lhhxoXDQGUPVyYAFCPJi3E0JKgLioD8wzsD/pawgauFFXSzpMa09z8wbt/DTLXjXEehnVFA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/monaco-yaml/-/monaco-yaml-5.1.0.tgz", + "integrity": "sha512-DU+cgXSJdOFKQ4I4oLg0V+mHKq1dJX+7hbIE4fJsgegUf1zEHW3PNlGj6qabUU2HZIPJ5NmXEf005GU9YDzTYQ==", "dependencies": { "@types/json-schema": "^7.0.0", "jsonc-parser": "^3.0.0", + "monaco-languageserver-types": "^0.2.0", "monaco-marker-data-provider": "^1.0.0", + "monaco-types": "^0.1.0", "monaco-worker-manager": "^2.0.0", "path-browserify": "^1.0.0", "prettier": "^2.0.0", @@ -15215,7 +15237,7 @@ "url": "https://github.com/sponsors/remcohaszing" }, "peerDependencies": { - "monaco-editor": ">=0.30" + "monaco-editor": ">=0.36" } }, "node_modules/monaco-yaml/node_modules/yaml": { @@ -17650,15 +17672,15 @@ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, "node_modules/react-monaco-editor": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.54.0.tgz", - "integrity": "sha512-9JwO69851mfpuhYLHlKbae7omQWJ/2ICE2lbL0VHyNyZR8rCOH7440u+zAtDgiOMpLwmYdY1sEZCdRefywX6GQ==", + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.55.0.tgz", + "integrity": "sha512-GdEP0Q3Rn1dczfKEEyY08Nes5plWwIYU4sWRBQO0+jsQWQsKMHKCC6+hPRwR7G/4aA3V/iU9jSmWPzVJYMVFSQ==", "dependencies": { "prop-types": "^15.8.1" }, "peerDependencies": { "@types/react": ">=16 <= 18", - "monaco-editor": "^0.39.0", + "monaco-editor": "^0.44.0", "react": ">=16 <= 18" } }, @@ -19779,15 +19801,32 @@ "node": ">= 0.8" } }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, "node_modules/vscode-languageserver-textdocument": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz", "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==" }, "node_modules/vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, "node_modules/vscode-uri": { "version": "3.0.7", @@ -31651,9 +31690,18 @@ } }, "monaco-editor": { - "version": "0.40.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.40.0.tgz", - "integrity": "sha512-1wymccLEuFSMBvCk/jT1YDW/GuxMLYwnFwF9CDyYCxoTw2Pt379J3FUhwy9c43j51JdcxVPjwk0jm0EVDsBS2g==" + "version": "0.44.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.44.0.tgz", + "integrity": "sha512-5SmjNStN6bSuSE5WPT2ZV+iYn1/yI9sd4Igtk23ChvqB7kDk9lZbB9F5frsuvpB+2njdIeGGFf2G4gbE6rCC9Q==" + }, + "monaco-languageserver-types": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/monaco-languageserver-types/-/monaco-languageserver-types-0.2.3.tgz", + "integrity": "sha512-QyV5R7s+rJ87bX1sRioMJZULWiTnMp0Vm+RLILgMEL0SqWuBsQBSW0EZunr4xMZhv6Qun3UZNCN4JrCCLURcgQ==", + "requires": { + "monaco-types": "^0.1.0", + "vscode-languageserver-protocol": "^3.0.0" + } }, "monaco-marker-data-provider": { "version": "1.1.1", @@ -31661,6 +31709,11 @@ "integrity": "sha512-PGB7TJSZE5tmHzkxv/OEwK2RGNC2A7dcq4JRJnnj31CUAsfmw0Gl+1QTrH0W0deKhcQmQM0YVPaqgQ+0wCt8Mg==", "requires": {} }, + "monaco-types": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/monaco-types/-/monaco-types-0.1.0.tgz", + "integrity": "sha512-aWK7SN9hAqNYi0WosPoMjenMeXJjwCxDibOqWffyQ/qXdzB/86xshGQobRferfmNz7BSNQ8GB0MD0oby9/5fTQ==" + }, "monaco-worker-manager": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/monaco-worker-manager/-/monaco-worker-manager-2.0.1.tgz", @@ -31668,13 +31721,15 @@ "requires": {} }, "monaco-yaml": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/monaco-yaml/-/monaco-yaml-4.0.4.tgz", - "integrity": "sha512-qbM36fY1twpDUs4lhhxoXDQGUPVyYAFCPJi3E0JKgLioD8wzsD/pawgauFFXSzpMa09z8wbt/DTLXjXEehnVFA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/monaco-yaml/-/monaco-yaml-5.1.0.tgz", + "integrity": "sha512-DU+cgXSJdOFKQ4I4oLg0V+mHKq1dJX+7hbIE4fJsgegUf1zEHW3PNlGj6qabUU2HZIPJ5NmXEf005GU9YDzTYQ==", "requires": { "@types/json-schema": "^7.0.0", "jsonc-parser": "^3.0.0", + "monaco-languageserver-types": "^0.2.0", "monaco-marker-data-provider": "^1.0.0", + "monaco-types": "^0.1.0", "monaco-worker-manager": "^2.0.0", "path-browserify": "^1.0.0", "prettier": "^2.0.0", @@ -33276,9 +33331,9 @@ "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" }, "react-monaco-editor": { - "version": "0.54.0", - "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.54.0.tgz", - "integrity": "sha512-9JwO69851mfpuhYLHlKbae7omQWJ/2ICE2lbL0VHyNyZR8rCOH7440u+zAtDgiOMpLwmYdY1sEZCdRefywX6GQ==", + "version": "0.55.0", + "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.55.0.tgz", + "integrity": "sha512-GdEP0Q3Rn1dczfKEEyY08Nes5plWwIYU4sWRBQO0+jsQWQsKMHKCC6+hPRwR7G/4aA3V/iU9jSmWPzVJYMVFSQ==", "requires": { "prop-types": "^15.8.1" } @@ -34830,15 +34885,29 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" }, + "vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==" + }, + "vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "requires": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, "vscode-languageserver-textdocument": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz", "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==" }, "vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" }, "vscode-uri": { "version": "3.0.7", diff --git a/package.json b/package.json index 8c04a3d..7e5a102 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/AppContextProvider.tsx b/src/components/AppContextProvider.tsx index 9b8ba77..faf758c 100644 --- a/src/components/AppContextProvider.tsx +++ b/src/components/AppContextProvider.tsx @@ -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(() => new DataService()); @@ -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,