mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 21:39:43 +00:00
update to languagedetection 1.0.18
This commit is contained in:
parent
14bc1c1560
commit
765fc625c7
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@microsoft/applicationinsights-web": "^2.6.4",
|
||||
"@vscode/vscode-languagedetection": "1.0.15",
|
||||
"@vscode/vscode-languagedetection": "1.0.18",
|
||||
"applicationinsights": "1.0.8",
|
||||
"chokidar": "3.5.1",
|
||||
"graceful-fs": "4.2.6",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@microsoft/applicationinsights-web": "^2.6.4",
|
||||
"@vscode/vscode-languagedetection": "1.0.15",
|
||||
"@vscode/vscode-languagedetection": "1.0.18",
|
||||
"applicationinsights": "1.0.8",
|
||||
"chokidar": "3.5.1",
|
||||
"cookie": "^0.4.0",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@microsoft/applicationinsights-web": "^2.6.4",
|
||||
"@vscode/vscode-languagedetection": "1.0.15",
|
||||
"@vscode/vscode-languagedetection": "1.0.18",
|
||||
"iconv-lite-umd": "0.6.8",
|
||||
"jschardet": "3.0.0",
|
||||
"tas-client-umd": "0.1.4",
|
||||
|
|
|
@ -83,10 +83,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.4.tgz#40e1c0ad20743fcee1604a7df2c57faf0aa1af87"
|
||||
integrity sha512-Ot53G927ykMF8cQ3/zq4foZtdk+Tt1YpX7aUTHxBU7UHNdkEiBvBfZSq+rnlUmKCJ19VatwPG4mNzvcGpBj4og==
|
||||
|
||||
"@vscode/vscode-languagedetection@1.0.15":
|
||||
version "1.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.15.tgz#8ca6ce5f033b92ac8f75b276a06dd262d7c6e50d"
|
||||
integrity sha512-ur1eZdkSLUm2dJp3XRfPN85kzknl2cHRMnJof7ESQdBGWnDMVv3VtBDTZaBEyxOvOKsevG4t5490OiyQe3Q7NQ==
|
||||
"@vscode/vscode-languagedetection@1.0.18":
|
||||
version "1.0.18"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.18.tgz#05d78cbd4b6ba5a0da4f76c88fdc98f67e99786a"
|
||||
integrity sha512-z98y3RZtuJQbWdqRJNxV6MNv8nJb4WMxjhvxltzfPZhrH+vHcNRiS8GvX1DoJTEV7DN4GrodjHpTh07YGLthDQ==
|
||||
|
||||
iconv-lite-umd@0.6.8:
|
||||
version "0.6.8"
|
||||
|
|
|
@ -88,10 +88,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
|
||||
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
|
||||
|
||||
"@vscode/vscode-languagedetection@1.0.15":
|
||||
version "1.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.15.tgz#8ca6ce5f033b92ac8f75b276a06dd262d7c6e50d"
|
||||
integrity sha512-ur1eZdkSLUm2dJp3XRfPN85kzknl2cHRMnJof7ESQdBGWnDMVv3VtBDTZaBEyxOvOKsevG4t5490OiyQe3Q7NQ==
|
||||
"@vscode/vscode-languagedetection@1.0.18":
|
||||
version "1.0.18"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.18.tgz#05d78cbd4b6ba5a0da4f76c88fdc98f67e99786a"
|
||||
integrity sha512-z98y3RZtuJQbWdqRJNxV6MNv8nJb4WMxjhvxltzfPZhrH+vHcNRiS8GvX1DoJTEV7DN4GrodjHpTh07YGLthDQ==
|
||||
|
||||
agent-base@4:
|
||||
version "4.2.0"
|
||||
|
|
|
@ -4,11 +4,8 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import type { ModelOperations, ModelResult } from '@vscode/vscode-languagedetection';
|
||||
// import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { StopWatch } from 'vs/base/common/stopwatch';
|
||||
// import { URI } from 'vs/base/common/uri';
|
||||
import { IRequestHandler } from 'vs/base/common/worker/simpleWorker';
|
||||
// import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
|
||||
import { EditorSimpleWorker } from 'vs/editor/common/services/editorSimpleWorker';
|
||||
import { EditorWorkerHost } from 'vs/editor/common/services/editorWorkerServiceImpl';
|
||||
|
||||
|
@ -60,9 +57,9 @@ export class LanguageDetectionSimpleWorker extends EditorSimpleWorker {
|
|||
|
||||
const uri: string = await this._host.fhr('getIndexJsUri', []);
|
||||
// const uri = await this.host.getIndexJsUri();
|
||||
const { ModelOperations } = await import(uri);
|
||||
this._modelOperations = new ModelOperations(
|
||||
async () => {
|
||||
const { ModelOperations } = await import(uri) as typeof import('@vscode/vscode-languagedetection');
|
||||
this._modelOperations = new ModelOperations({
|
||||
modelJsonLoaderFunc: async () => {
|
||||
const response = await fetch(await this._host.fhr('getModelJsonUri', []));
|
||||
try {
|
||||
const modelJSON = await response.json();
|
||||
|
@ -72,12 +69,12 @@ export class LanguageDetectionSimpleWorker extends EditorSimpleWorker {
|
|||
throw new Error(message);
|
||||
}
|
||||
},
|
||||
async () => {
|
||||
weightsLoaderFunc: async () => {
|
||||
const response = await fetch(await this._host.fhr('getWeightsUri', []));
|
||||
const buffer = await response.arrayBuffer();
|
||||
return buffer;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
return this._modelOperations!;
|
||||
}
|
||||
|
|
|
@ -846,10 +846,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
|
||||
integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==
|
||||
|
||||
"@vscode/vscode-languagedetection@1.0.15":
|
||||
version "1.0.15"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.15.tgz#8ca6ce5f033b92ac8f75b276a06dd262d7c6e50d"
|
||||
integrity sha512-ur1eZdkSLUm2dJp3XRfPN85kzknl2cHRMnJof7ESQdBGWnDMVv3VtBDTZaBEyxOvOKsevG4t5490OiyQe3Q7NQ==
|
||||
"@vscode/vscode-languagedetection@1.0.18":
|
||||
version "1.0.18"
|
||||
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.18.tgz#05d78cbd4b6ba5a0da4f76c88fdc98f67e99786a"
|
||||
integrity sha512-z98y3RZtuJQbWdqRJNxV6MNv8nJb4WMxjhvxltzfPZhrH+vHcNRiS8GvX1DoJTEV7DN4GrodjHpTh07YGLthDQ==
|
||||
|
||||
"@webassemblyjs/ast@1.11.0":
|
||||
version "1.11.0"
|
||||
|
|
Loading…
Reference in a new issue