Adopt latest monaco-json

This commit is contained in:
Alex Dima 2020-09-07 14:38:06 +02:00
parent 8eaefdcbad
commit fb0c77cf75
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
5 changed files with 18 additions and 33 deletions

View file

@ -228,6 +228,11 @@ function addPluginContribs(type) {
'define("vs/basic-languages/_.contribution",["require","exports","vs/editor/editor.api"],',
);
contribContents = contribContents.replace(
`define('vs/language/json/fillers/monaco-editor-core',[],`,
`define('vs/language/json/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
);
extraContent.push(contribContents);
});
@ -291,7 +296,7 @@ function ESM_pluginStream(plugin, destinationPath) {
const info = ts.preProcessFile(contents);
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
const importText = info.importedFiles[i].fileName;
let importText = info.importedFiles[i].fileName;
const pos = info.importedFiles[i].pos;
const end = info.importedFiles[i].end;
@ -302,6 +307,10 @@ function ESM_pluginStream(plugin, destinationPath) {
process.exit(0);
}
if (importText === 'monaco-editor-core') {
importText = 'monaco-editor-core/esm/vs/editor/editor.api';
}
const myFileDestPath = path.join(DESTINATION, plugin.modulePrefix, data.relative);
const importFilePath = path.join(DESTINATION, importText.substr('monaco-editor-core/esm/'.length));
let relativePath = path.relative(path.dirname(myFileDestPath), importFilePath).replace(/\\/g, '/');

16
monaco.d.ts vendored
View file

@ -6710,69 +6710,57 @@ declare namespace monaco.languages.json {
*/
readonly enableSchemaRequest?: boolean;
}
export interface ModeConfiguration {
/**
* Defines whether the built-in documentFormattingEdit provider is enabled.
*/
readonly documentFormattingEdits?: boolean;
/**
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
*/
readonly documentRangeFormattingEdits?: boolean;
/**
* Defines whether the built-in completionItemProvider is enabled.
*/
readonly completionItems?: boolean;
/**
* Defines whether the built-in hoverProvider is enabled.
*/
readonly hovers?: boolean;
/**
* Defines whether the built-in documentSymbolProvider is enabled.
*/
readonly documentSymbols?: boolean;
/**
* Defines whether the built-in tokens provider is enabled.
*/
readonly tokens?: boolean;
/**
* Defines whether the built-in color provider is enabled.
*/
readonly colors?: boolean;
/**
* Defines whether the built-in foldingRange provider is enabled.
*/
readonly foldingRanges?: boolean;
/**
* Defines whether the built-in diagnostic provider is enabled.
*/
readonly diagnostics?: boolean;
/**
* Defines whether the built-in selection range provider is enabled.
*/
readonly selectionRanges?: boolean;
}
export interface LanguageServiceDefaults {
readonly languageId: string;
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly diagnosticsOptions: DiagnosticsOptions;
readonly modeConfiguration: ModeConfiguration;
setDiagnosticsOptions(options: DiagnosticsOptions): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
}
export var jsonDefaults: LanguageServiceDefaults;
export const jsonDefaults: LanguageServiceDefaults;
}
/*---------------------------------------------------------------------------------------------

6
package-lock.json generated
View file

@ -4019,9 +4019,9 @@
"dev": true
},
"monaco-json": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.9.0.tgz",
"integrity": "sha512-cpFu3qn3lyEk4B5KjD2kfzEf75QZPrOgoTs2VOyydeXdQ+9IjsnR617lYbLldOI6PGkfZMMp771TBkAvWntiMg==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.0.1.tgz",
"integrity": "sha512-vus+jwDci/X/9VEgDoTmSx0yTRRFQX5rf4gIGqILLLJZS++Dt6VRz3jHtvo0+Pk7uanRouDI6Nanf7w3ABUDLg==",
"dev": true
},
"monaco-languages": {

View file

@ -35,7 +35,7 @@
"monaco-css": "2.7.0",
"monaco-editor-core": "0.20.0",
"monaco-html": "2.7.0",
"monaco-json": "2.9.0",
"monaco-json": "3.0.1",
"monaco-languages": "1.10.0",
"monaco-typescript": "3.7.0",
"playwright": "1.2.0-next.1596653191842",

View file

@ -6710,69 +6710,57 @@ declare namespace monaco.languages.json {
*/
readonly enableSchemaRequest?: boolean;
}
export interface ModeConfiguration {
/**
* Defines whether the built-in documentFormattingEdit provider is enabled.
*/
readonly documentFormattingEdits?: boolean;
/**
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
*/
readonly documentRangeFormattingEdits?: boolean;
/**
* Defines whether the built-in completionItemProvider is enabled.
*/
readonly completionItems?: boolean;
/**
* Defines whether the built-in hoverProvider is enabled.
*/
readonly hovers?: boolean;
/**
* Defines whether the built-in documentSymbolProvider is enabled.
*/
readonly documentSymbols?: boolean;
/**
* Defines whether the built-in tokens provider is enabled.
*/
readonly tokens?: boolean;
/**
* Defines whether the built-in color provider is enabled.
*/
readonly colors?: boolean;
/**
* Defines whether the built-in foldingRange provider is enabled.
*/
readonly foldingRanges?: boolean;
/**
* Defines whether the built-in diagnostic provider is enabled.
*/
readonly diagnostics?: boolean;
/**
* Defines whether the built-in selection range provider is enabled.
*/
readonly selectionRanges?: boolean;
}
export interface LanguageServiceDefaults {
readonly languageId: string;
readonly onDidChange: IEvent<LanguageServiceDefaults>;
readonly diagnosticsOptions: DiagnosticsOptions;
readonly modeConfiguration: ModeConfiguration;
setDiagnosticsOptions(options: DiagnosticsOptions): void;
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
}
export var jsonDefaults: LanguageServiceDefaults;
export const jsonDefaults: LanguageServiceDefaults;
}
/*---------------------------------------------------------------------------------------------