diff --git a/package.json b/package.json index be5cb4d..fff2d2f 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,9 @@ }, "devDependencies": { "@types/node": "^20.3.2", - "@volar/monaco": "1.7.9", - "@volar/typescript": "1.7.9", - "@vue/language-service": "1.8.2", + "@volar/cdn": "~1.9.2", + "@volar/monaco": "~1.9.2", + "@vue/language-service": "1.8.6", "esbuild": "^0.18.10", "monaco-editor-core": "^0.39.0", "monaco-editor-textmate": "^4.0.0", @@ -44,7 +44,6 @@ "prettier": "^2.8.8", "typescript": "^5.1.3", "vite": "^4.3.9", - "volar-service-typescript": "0.0.8", "vue": "^3.3.4" }, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfed01b..7258055 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,15 +13,15 @@ devDependencies: '@types/node': specifier: ^20.3.2 version: 20.3.2 + '@volar/cdn': + specifier: ~1.9.2 + version: 1.9.2 '@volar/monaco': - specifier: 1.7.9 - version: 1.7.9 - '@volar/typescript': - specifier: 1.7.9 - version: 1.7.9 + specifier: ~1.9.2 + version: 1.9.2 '@vue/language-service': - specifier: 1.8.2 - version: 1.8.2(typescript@5.1.3) + specifier: 1.8.6 + version: 1.8.6(typescript@5.1.3) esbuild: specifier: ^0.18.10 version: 0.18.10 @@ -30,7 +30,7 @@ devDependencies: version: 0.39.0 monaco-editor-textmate: specifier: ^4.0.0 - version: 4.0.0(monaco-editor@0.39.0)(monaco-textmate@3.0.1) + version: 4.0.0(monaco-editor@0.40.0)(monaco-textmate@3.0.1) monaco-textmate: specifier: ^3.0.1 version: 3.0.1(onigasm@2.2.5) @@ -46,9 +46,6 @@ devDependencies: vite: specifier: ^4.3.9 version: 4.3.9(@types/node@20.3.2) - volar-service-typescript: - specifier: 0.0.8 - version: 0.0.8(@volar/language-service@1.7.9)(@volar/typescript@1.7.9) vue: specifier: ^3.3.4 version: 3.3.4 @@ -65,8 +62,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/parser@7.22.5: - resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} + /@babel/parser@7.22.7: + resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: @@ -506,45 +503,51 @@ packages: resolution: {integrity: sha512-vOBLVQeCQfIcF/2Y7eKFTqrMnizK5lRNQ7ykML/5RuwVXVWxYkgwS7xbt4B6fKCUPgbSL5FSsjHQpaGQP/dQmw==} dev: true - /@volar/language-core@1.7.9: - resolution: {integrity: sha512-U6GMPDNqfGFqVRv4npUN2hEDW4/6EwL4YHd6qggapcvTzRrYAodTTbOTZs4PDzmw7NSZ2Cdrmd54SjzCCMXbZw==} + /@volar/cdn@1.9.2: + resolution: {integrity: sha512-CTwG52MxaiNYKm8qe22a/9LZj2c0LSKfLHuc4dj+Dm43IDG6HtgVEgWEsJCkl6UJqIMuvQ7oRTpYHpNyozppDA==} dependencies: - '@volar/source-map': 1.7.9 + '@volar/language-service': 1.9.2 dev: true - /@volar/language-service@1.7.9: - resolution: {integrity: sha512-ZybgxvX27PNo22DbMkTpQjP/jxW6dJFXzhmcFPP4PvOBDw6qCnWQcTJ5nKESSN4B5yjayRfi7FnisSPUfAejQw==} + /@volar/language-core@1.9.2: + resolution: {integrity: sha512-9GTes/IUPOl0YoV5RQWhCP5a4EDFFfJZGwZn1xA5ug1FO0G6GOVoJI6tQatujtcQmDOQlOM5/0NewnlumygPkQ==} dependencies: - '@volar/language-core': 1.7.9 - '@volar/source-map': 1.7.9 + '@volar/source-map': 1.9.2 + dev: true + + /@volar/language-service@1.9.2: + resolution: {integrity: sha512-DcM9FfEEkzpMgoQr8jCSdAYFsBOXIjSEFVEtt69sQ8Pz05kOaxehH8KoxvSb2tKl1N9lTeQPiM+0jF5opYvxkg==} + dependencies: + '@volar/language-core': 1.9.2 + '@volar/source-map': 1.9.2 vscode-languageserver-protocol: 3.17.3 vscode-languageserver-textdocument: 1.0.8 vscode-uri: 3.0.7 dev: true - /@volar/monaco@1.7.9: - resolution: {integrity: sha512-oJtbHo/fsyhHBctzoFcBy/2Ur7EzXPGv49UinT/8AlncGCT0YOZiIKbrH/hDDHS2PszfaDoGonCjsLemdTjHmg==} + /@volar/monaco@1.9.2: + resolution: {integrity: sha512-CSiOFHcbmgxrRVbIaOAjPwOdtsCq3D3iu69nyxYZTuiwMjC2BRKchHuVsdQTa1DfNaxmMTBIsGAYRIPc3hPijw==} dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 vscode-uri: 3.0.7 dev: true - /@volar/source-map@1.7.9: - resolution: {integrity: sha512-bLizh8HIAzbq7OdxfyoG18dXJJF9FNXBcaiRj7eqg2Bq+DkgkYHabaY+xobgaXeKFOp93Tg1KfMM7qyR2KXHmQ==} + /@volar/source-map@1.9.2: + resolution: {integrity: sha512-rYTvV/HMf2CSRkd6oiVxcjX4rnSxEsVfJmw1KTmD4VTBXlz1+b16VIysQX4+1p/eZd2TyCeFblyylIxbZ+YOGg==} dependencies: muggle-string: 0.3.1 dev: true - /@volar/typescript@1.7.9: - resolution: {integrity: sha512-cXGg7lgvdjpRjYfz52cXKo6ExBi8k3pWeBe6Gckf4+9zmTfEwEFfKWMj0H/IyUYO+S2rjyE9jytdsu1Imk+Azw==} + /@volar/typescript@1.9.2: + resolution: {integrity: sha512-l4DA+S3ZVOWGACDdRNVSYZ41nuTWOH8OMS/yVeFV2fTmr/IuD37+3wzzGnjIPwCUa0w+fpg8vJPalzYetmlFTQ==} dependencies: - '@volar/language-core': 1.7.9 + '@volar/language-core': 1.9.2 dev: true /@vscode/emmet-helper@2.9.2: resolution: {integrity: sha512-MaGuyW+fa13q3aYsluKqclmh62Hgp0BpKIqS66fCxfOaBcVQ1OnMQxRRgQUYnCkxFISAQlkJ0qWWPyXjro1Qrg==} dependencies: - emmet: 2.4.4 + emmet: 2.4.5 jsonc-parser: 2.3.1 vscode-languageserver-textdocument: 1.0.8 vscode-languageserver-types: 3.17.3 @@ -562,7 +565,7 @@ packages: /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -578,15 +581,15 @@ packages: /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/compiler-core': 3.3.4 '@vue/compiler-dom': 3.3.4 '@vue/compiler-ssr': 3.3.4 '@vue/reactivity-transform': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.0 - postcss: 8.4.24 + magic-string: 0.30.1 + postcss: 8.4.27 source-map-js: 1.0.2 dev: true @@ -597,43 +600,43 @@ packages: '@vue/shared': 3.3.4 dev: true - /@vue/language-core@1.8.2(typescript@5.1.3): - resolution: {integrity: sha512-QJujhmp89TRoWwzjn2sPMezG97+mNyaCTfznGHWNCE3LBsillZCBqAO7M7cxO8ee1V3r+qHjWytkoh3M4YkRJw==} + /@vue/language-core@1.8.6(typescript@5.1.3): + resolution: {integrity: sha512-PyYDMArbR7hnhqw9OEupr0s4ut0/ZfITp7WEjigF58cd2R0lRLNM1HPvzFMuULpy3ImBEOZI11KRIDirqOe+tQ==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@volar/language-core': 1.7.9 - '@volar/source-map': 1.7.9 + '@volar/language-core': 1.9.2 + '@volar/source-map': 1.9.2 '@vue/compiler-dom': 3.3.4 '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 - minimatch: 9.0.2 + minimatch: 9.0.3 muggle-string: 0.3.1 typescript: 5.1.3 vue-template-compiler: 2.7.14 dev: true - /@vue/language-service@1.8.2(typescript@5.1.3): - resolution: {integrity: sha512-j6E5B4qk3prNzVtDRhzMFFT89NHiksBNBInXPVOjr8ILaZWV0mr5+UACJB7zM0+rBB3jzhpkzzJ5OW8utBGI1g==} + /@vue/language-service@1.8.6(typescript@5.1.3): + resolution: {integrity: sha512-02JHqUDkaai32TToqUGmtKJUpGmx0GHu5T6cWXbwwdrPzCWy/Zra6zRaHxoMy5E+1Iz2PXZvEUUliK/sqtwB1g==} dependencies: - '@volar/language-core': 1.7.9 - '@volar/language-service': 1.7.9 - '@volar/typescript': 1.7.9 + '@volar/language-core': 1.9.2 + '@volar/language-service': 1.9.2 + '@volar/typescript': 1.9.2 '@vue/compiler-dom': 3.3.4 - '@vue/language-core': 1.8.2(typescript@5.1.3) + '@vue/language-core': 1.8.6(typescript@5.1.3) '@vue/reactivity': 3.3.4 '@vue/shared': 3.3.4 - volar-service-css: 0.0.8(@volar/language-service@1.7.9) - volar-service-emmet: 0.0.8(@volar/language-service@1.7.9) - volar-service-html: 0.0.8(@volar/language-service@1.7.9) - volar-service-json: 0.0.8(@volar/language-service@1.7.9) - volar-service-pug: 0.0.8 - volar-service-pug-beautify: 0.0.8(@volar/language-service@1.7.9) - volar-service-typescript: 0.0.8(@volar/language-service@1.7.9)(@volar/typescript@1.7.9) - volar-service-typescript-twoslash-queries: 0.0.8(@volar/language-service@1.7.9) + volar-service-css: 0.0.10(@volar/language-service@1.9.2) + volar-service-emmet: 0.0.10(@volar/language-service@1.9.2) + volar-service-html: 0.0.10(@volar/language-service@1.9.2) + volar-service-json: 0.0.10(@volar/language-service@1.9.2) + volar-service-pug: 0.0.10 + volar-service-pug-beautify: 0.0.10(@volar/language-service@1.9.2) + volar-service-typescript: 0.0.10(@volar/language-service@1.9.2)(@volar/typescript@1.9.2) + volar-service-typescript-twoslash-queries: 0.0.10(@volar/language-service@1.9.2) vscode-html-languageservice: 5.0.6 vscode-languageserver-textdocument: 1.0.8 transitivePeerDependencies: @@ -643,11 +646,11 @@ packages: /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.22.5 + '@babel/parser': 7.22.7 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.30.0 + magic-string: 0.30.1 dev: true /@vue/reactivity@3.3.4: @@ -722,8 +725,8 @@ packages: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} dev: true - /emmet@2.4.4: - resolution: {integrity: sha512-v8Mwpjym55CS3EjJgiCLWUB3J2HSR93jhzXW325720u8KvYxdI2voYLstW3pHBxFz54H6jFjayR9G4LfTG0q+g==} + /emmet@2.4.5: + resolution: {integrity: sha512-xOiVNINJFh0dMik+KzXSEYbAnFLTnadEzanxj7+F15uIf6avQwu3uPa1wI/8AFtOWKZ8lHg7TjC83wXcPhgOPw==} dependencies: '@emmetio/abbreviation': 2.3.3 '@emmetio/css-abbreviation': 2.1.8 @@ -882,15 +885,15 @@ packages: yallist: 4.0.0 dev: true - /magic-string@0.30.0: - resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + /magic-string@0.30.1: + resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /minimatch@9.0.2: - resolution: {integrity: sha512-PZOT9g5v2ojiTL7r1xF6plNHLtOeTpSlDI007As2NlA2aYBMfVom17yqa6QzhmDP8QOhn7LjHTg7DFCVSSa6yg==} + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 @@ -900,18 +903,18 @@ packages: resolution: {integrity: sha512-40OuC5krS/kmXMXj0tJgRnxS5ia+3uSdP6jgiNHitns7kQHN/jFkRIW6MCS8JrxlmSNHBLnQjDa+0ZPIRGnLrA==} dev: true - /monaco-editor-textmate@4.0.0(monaco-editor@0.39.0)(monaco-textmate@3.0.1): + /monaco-editor-textmate@4.0.0(monaco-editor@0.40.0)(monaco-textmate@3.0.1): resolution: {integrity: sha512-Clwup5LJzVfwURQrS+odSEC5/hZBEG36pQnvBKt4OtBndF8r2xLeXUZcK/AqEBK2u0Npy7frFp9hG7m66Ol9hA==} peerDependencies: monaco-editor: 0.x.x monaco-textmate: ^3.0.0 dependencies: - monaco-editor: 0.39.0 + monaco-editor: 0.40.0 monaco-textmate: 3.0.1(onigasm@2.2.5) dev: true - /monaco-editor@0.39.0: - resolution: {integrity: sha512-zhbZ2Nx93tLR8aJmL2zI1mhJpsl87HMebNBM6R8z4pLfs8pj604pIVIVwyF1TivcfNtIPpMXL+nb3DsBmE/x6Q==} + /monaco-editor@0.40.0: + resolution: {integrity: sha512-1wymccLEuFSMBvCk/jT1YDW/GuxMLYwnFwF9CDyYCxoTw2Pt379J3FUhwy9c43j51JdcxVPjwk0jm0EVDsBS2g==} dev: true /monaco-textmate@3.0.1(onigasm@2.2.5): @@ -951,8 +954,8 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true - /postcss@8.4.24: - resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} + /postcss@8.4.27: + resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -985,16 +988,16 @@ packages: token-stream: 1.0.0 dev: true - /rollup@3.25.3: - resolution: {integrity: sha512-ZT279hx8gszBj9uy5FfhoG4bZx8c+0A1sbqtr7Q3KNWIizpTdDEPZbV2xcbvHsnFp4MavCQYZyzApJ+virB8Yw==} + /rollup@3.26.3: + resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 dev: true - /semver@7.5.3: - resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -1018,7 +1021,7 @@ packages: /typescript-auto-import-cache@0.3.0: resolution: {integrity: sha512-Rq6/q4O9iyqUdjvOoyas7x/Qf9nWUMeqpP3YeTaLA+uECgfy5wOhfOS+SW/+fZ/uI/ZcKaf+2/ZhFzXh8xfofQ==} dependencies: - semver: 7.5.3 + semver: 7.5.4 dev: true /typescript@5.1.3: @@ -1054,112 +1057,112 @@ packages: dependencies: '@types/node': 20.3.2 esbuild: 0.17.19 - postcss: 8.4.24 - rollup: 3.25.3 + postcss: 8.4.27 + rollup: 3.26.3 optionalDependencies: fsevents: 2.3.2 dev: true - /volar-service-css@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-+zMVS7cgCZpZhW1RG00XL3V2umb/DlMMK7CHiAMvqtLLb4nKTv7XHc36vtGXPQKVUyzyG4ZO/olxM4EItsGGnA==} + /volar-service-css@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-58A6UvgFZAWGFWRY0tKAAiREXcSOyx5ErpeOS3UjuGZFyTi6YUxfm1F0F8BKA1voN24laen1yyuFQD5E4ONNIQ==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 vscode-css-languageservice: 6.2.6 vscode-uri: 3.0.7 dev: true - /volar-service-emmet@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-F3BS6euSSD+q6AyZJmQzFDFtJVmhMTxfEY3VLE0fMsRFcOUmcEEgQfYixEXWEAgK21AUNaq9cCSWTkHjj9ysqw==} + /volar-service-emmet@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-O7JahMMvexee65ifph1rhIH/L97S2rMtKAut+x3/yi4PEMVM0XkuKiXkC2y3ZCO4DzFsMhZWtEVBE0Ym76nj2g==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 '@vscode/emmet-helper': 2.9.2 - volar-service-html: 0.0.8(@volar/language-service@1.7.9) + volar-service-html: 0.0.10(@volar/language-service@1.9.2) dev: true - /volar-service-html@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-pP1bmN9iJjjK8oDZ1F/c75/lwUqcw9BzcUYa6WE0eYTc30X6BPpj/6Rzed6Sw7dBMmAmsodoaHOamgNU/RJY/w==} + /volar-service-html@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-lr6hDCkp+HOqpvMzCtiSg80v82FBaUIn69+dZCMAp9O8qPhEo6WhrRwe9FEzSpg//WFwoWYfyZ1uPaj+RzT6aw==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 vscode-html-languageservice: 5.0.6 vscode-uri: 3.0.7 dev: true - /volar-service-json@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-+v9gw2IylVtw9EpFVN6le7a6FDAzF/en3tgEVu8MIzhJ3Kg5SOOWuN8w0gtKWUIC/jaVw0yMdYimFSnfxZgxtQ==} + /volar-service-json@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-9HQNWTDrCt76j04/+ZCCf6jqhc2wOmDSKLWU7P2wyOS+1jPKLh3F0GYQ1GrzBTkhjwQ266WAn6Z7LApb4BLQyg==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 vscode-json-languageservice: 5.3.5 vscode-uri: 3.0.7 dev: true - /volar-service-pug-beautify@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-2ovrzyCPyQ4d/kigvcWs+yCe7Lm8E7B7K/QzazOd97HgHX0e2k+JeoMOjkWOYu8BKrbxgRKeiREvz0DXLw9yNw==} + /volar-service-pug-beautify@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-E6j2dgN3SdyFuaH01Jx0CsCCOgJvmNAxMZtm4gEUrdLSvbxrZBwNotm0u3r6X3vJSMKkfM/LrKoyNOE83joDfA==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 dev: true - /volar-service-pug@0.0.8: - resolution: {integrity: sha512-rDYhhPFmo726oN8wCZs7+Cm/L3u1h7Nkz68PN1fBIdaBhcKPaPIDtGOW4mEpYw1A1sGm6GrklVkQ03p7clXGkQ==} + /volar-service-pug@0.0.10: + resolution: {integrity: sha512-nBrpD/no4If/uBX8XBRw4o9rowcIj7wkcFkRzXkvJz9NYSScvTjnGgbJCvsWenJgbuLtnfLNGo7dE88sJmOdSg==} dependencies: - '@volar/language-service': 1.7.9 - '@volar/source-map': 1.7.9 + '@volar/language-service': 1.9.2 + '@volar/source-map': 1.9.2 muggle-string: 0.3.1 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: 0.0.8(@volar/language-service@1.7.9) + volar-service-html: 0.0.10(@volar/language-service@1.9.2) vscode-html-languageservice: 5.0.6 vscode-languageserver-textdocument: 1.0.8 dev: true - /volar-service-typescript-twoslash-queries@0.0.8(@volar/language-service@1.7.9): - resolution: {integrity: sha512-2F5h2PAhDB0vnLGn2ldLs0NhIlcvq7Uj1HfSaKmdz2cOa2hGMY1riX6+HJakVqWOfXMcE+HcBPETSGkl5jiD5Q==} + /volar-service-typescript-twoslash-queries@0.0.10(@volar/language-service@1.9.2): + resolution: {integrity: sha512-AMgl/aaCHIOIKswYP6GKx7m3+jVMCwF8Lt2KVaGKUstkT6LCMvqS/tVaRTzd8rAUq4lrFf4bg5uBD8RYtjklhA==} peerDependencies: - '@volar/language-service': '*' + '@volar/language-service': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 + '@volar/language-service': 1.9.2 dev: true - /volar-service-typescript@0.0.8(@volar/language-service@1.7.9)(@volar/typescript@1.7.9): - resolution: {integrity: sha512-R96t7IKAwv7MCRkmQkluIIAj6kawEoRYkc/zfygAGkjC//z8bDS5Fmmw9AEHHEdFPUaAJ7jkTuZ32dLuSuXn/g==} + /volar-service-typescript@0.0.10(@volar/language-service@1.9.2)(@volar/typescript@1.9.2): + resolution: {integrity: sha512-MVo9je5te2pjZIzbR+S5Fr1rZE2b64E+dpNpH5IHO+LtzSeT2Ri+Bzr4cGTbQSPxNx2O89BOxn97Wa5FS7vYyg==} peerDependencies: - '@volar/language-service': '*' - '@volar/typescript': '*' + '@volar/language-service': ~1.9.0 + '@volar/typescript': ~1.9.0 peerDependenciesMeta: '@volar/language-service': optional: true dependencies: - '@volar/language-service': 1.7.9 - '@volar/typescript': 1.7.9 - semver: 7.5.3 + '@volar/language-service': 1.9.2 + '@volar/typescript': 1.9.2 + semver: 7.5.4 typescript-auto-import-cache: 0.3.0 vscode-languageserver-textdocument: 1.0.8 vscode-nls: 5.2.0 diff --git a/src/vue.worker.ts b/src/vue.worker.ts index 343b3d1..cbb28ea 100644 --- a/src/vue.worker.ts +++ b/src/vue.worker.ts @@ -2,10 +2,16 @@ import * as worker from "monaco-editor-core/esm/vs/editor/editor.worker"; import type * as monaco from "monaco-editor-core"; import * as ts from "typescript"; import { resolveConfig } from "@vue/language-service"; -import { createLanguageService } from "@volar/monaco/worker"; -import createTsService, { - createJsDelivrDtsHost, -} from "volar-service-typescript"; +import { + createLanguageHost, + createLanguageService, + createServiceEnvironment, +} from "@volar/monaco/worker"; +import { + createJsDelivrFs, + createJsDelivrUriResolver, + decorateServiceEnvironment, +} from "@volar/cdn"; self.onmessage = () => { worker.initialize((ctx: monaco.worker.IWorkerContext) => { @@ -16,24 +22,19 @@ self.onmessage = () => { module: ts.ModuleKind.ESNext, moduleResolution: ts.ModuleResolutionKind.NodeJs, }; + const env = createServiceEnvironment(); - return createLanguageService({ - workerContext: ctx, - config: resolveConfig( - { - services: { - typescript: createTsService({ dtsHost: createJsDelivrDtsHost() }), - }, - }, - compilerOptions as any, - undefined, - undefined, - ts as any - ), - typescript: { - module: ts as any, - compilerOptions: compilerOptions as any, - }, - }); + decorateServiceEnvironment( + env, + createJsDelivrUriResolver("/node_modules"), + createJsDelivrFs() + ); + + return createLanguageService( + { typescript: ts as any }, + env, + resolveConfig({}, compilerOptions, {}, ts as any), + createLanguageHost(ctx.getMirrorModels, env, "/", compilerOptions) + ); }); }; diff --git a/tests/index.ts b/tests/index.ts index fd13100..9e47924 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -1,6 +1,10 @@ import { setupMonacoEnv, loadOnigasm } from "./env"; import * as monaco from "monaco-editor-core"; -import { loadGrammars, loadTheme, loadLanguageConfigurations } from "../src/index"; +import { + loadGrammars, + loadTheme, + loadLanguageConfigurations, +} from "../src/index"; import { getOrCreateModel } from "../src/utils"; import data from "./Test.vue?raw"; @@ -51,7 +55,7 @@ const afterReady = async (theme: string) => { await loadLanguageConfigurations(monaco.languages); }; -Promise.all([loadTheme(monaco.editor), setupMonacoEnv(), loadOnigasm(),]).then( +Promise.all([loadTheme(monaco.editor), setupMonacoEnv(), loadOnigasm()]).then( ([theme]) => { afterReady(theme.dark); }