chore: ensure yaml editor npm updates (#20963)
This commit is contained in:
parent
d171a0432f
commit
f86396a9ce
3 changed files with 8 additions and 4 deletions
|
|
@ -26,6 +26,9 @@
|
|||
<script>
|
||||
import { VueMonacoEditor, loader } from "@guolao/vue-monaco-editor";
|
||||
import { cleanYaml } from "@/utils/cleanYaml.js";
|
||||
// don't bundle monaco-editor but ensure that it get updated regularly
|
||||
import { packages } from "../../../../package-lock.json";
|
||||
const monacoVersion = packages["node_modules/monaco-editor"].version;
|
||||
|
||||
const $html = document.querySelector("html");
|
||||
export default {
|
||||
|
|
@ -77,7 +80,7 @@ export default {
|
|||
},
|
||||
beforeMount() {
|
||||
loader.config({
|
||||
paths: { vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs" },
|
||||
paths: { vs: `https://cdn.jsdelivr.net/npm/monaco-editor@${monacoVersion}/min/vs` },
|
||||
});
|
||||
loader.init();
|
||||
},
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -40,6 +40,7 @@
|
|||
"eslint-plugin-vue": "^9.3.0",
|
||||
"globals": "^16.0.0",
|
||||
"happy-dom": "^17.4.4",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"mqtt": "^5.11.0",
|
||||
"prettier": "^3.0.0",
|
||||
"prettier-plugin-sh": "^0.15.0",
|
||||
|
|
@ -7864,8 +7865,7 @@
|
|||
"version": "0.52.2",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.52.2.tgz",
|
||||
"integrity": "sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/mqtt": {
|
||||
"version": "5.11.0",
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
"eslint-plugin-vue": "^9.3.0",
|
||||
"globals": "^16.0.0",
|
||||
"happy-dom": "^17.4.4",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"mqtt": "^5.11.0",
|
||||
"prettier": "^3.0.0",
|
||||
"prettier-plugin-sh": "^0.15.0",
|
||||
|
|
@ -90,4 +91,4 @@
|
|||
"prettier-plugin-sort-json": "^4.1.1",
|
||||
"storybook": "^8.6.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue