mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Adopt latest monaco-json
This commit is contained in:
parent
8eaefdcbad
commit
fb0c77cf75
5 changed files with 18 additions and 33 deletions
11
gulpfile.js
11
gulpfile.js
|
|
@ -228,6 +228,11 @@ function addPluginContribs(type) {
|
||||||
'define("vs/basic-languages/_.contribution",["require","exports","vs/editor/editor.api"],',
|
'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);
|
extraContent.push(contribContents);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -291,7 +296,7 @@ function ESM_pluginStream(plugin, destinationPath) {
|
||||||
|
|
||||||
const info = ts.preProcessFile(contents);
|
const info = ts.preProcessFile(contents);
|
||||||
for (let i = info.importedFiles.length - 1; i >= 0; i--) {
|
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 pos = info.importedFiles[i].pos;
|
||||||
const end = info.importedFiles[i].end;
|
const end = info.importedFiles[i].end;
|
||||||
|
|
||||||
|
|
@ -302,6 +307,10 @@ function ESM_pluginStream(plugin, destinationPath) {
|
||||||
process.exit(0);
|
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 myFileDestPath = path.join(DESTINATION, plugin.modulePrefix, data.relative);
|
||||||
const importFilePath = path.join(DESTINATION, importText.substr('monaco-editor-core/esm/'.length));
|
const importFilePath = path.join(DESTINATION, importText.substr('monaco-editor-core/esm/'.length));
|
||||||
let relativePath = path.relative(path.dirname(myFileDestPath), importFilePath).replace(/\\/g, '/');
|
let relativePath = path.relative(path.dirname(myFileDestPath), importFilePath).replace(/\\/g, '/');
|
||||||
|
|
|
||||||
16
monaco.d.ts
vendored
16
monaco.d.ts
vendored
|
|
@ -6710,69 +6710,57 @@ declare namespace monaco.languages.json {
|
||||||
*/
|
*/
|
||||||
readonly enableSchemaRequest?: boolean;
|
readonly enableSchemaRequest?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentFormattingEdits?: boolean;
|
readonly documentFormattingEdits?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentRangeFormattingEdits?: boolean;
|
readonly documentRangeFormattingEdits?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in completionItemProvider is enabled.
|
* Defines whether the built-in completionItemProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly completionItems?: boolean;
|
readonly completionItems?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in hoverProvider is enabled.
|
* Defines whether the built-in hoverProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly hovers?: boolean;
|
readonly hovers?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentSymbols?: boolean;
|
readonly documentSymbols?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in tokens provider is enabled.
|
* Defines whether the built-in tokens provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly tokens?: boolean;
|
readonly tokens?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in color provider is enabled.
|
* Defines whether the built-in color provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly colors?: boolean;
|
readonly colors?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in foldingRange provider is enabled.
|
* Defines whether the built-in foldingRange provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly foldingRanges?: boolean;
|
readonly foldingRanges?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in diagnostic provider is enabled.
|
* Defines whether the built-in diagnostic provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly diagnostics?: boolean;
|
readonly diagnostics?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in selection range provider is enabled.
|
* Defines whether the built-in selection range provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly selectionRanges?: boolean;
|
readonly selectionRanges?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LanguageServiceDefaults {
|
export interface LanguageServiceDefaults {
|
||||||
|
readonly languageId: string;
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||||
readonly modeConfiguration: ModeConfiguration;
|
readonly modeConfiguration: ModeConfiguration;
|
||||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||||
}
|
}
|
||||||
|
export const jsonDefaults: LanguageServiceDefaults;
|
||||||
export var jsonDefaults: LanguageServiceDefaults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
6
package-lock.json
generated
6
package-lock.json
generated
|
|
@ -4019,9 +4019,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-json": {
|
"monaco-json": {
|
||||||
"version": "2.9.0",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-2.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.0.1.tgz",
|
||||||
"integrity": "sha512-cpFu3qn3lyEk4B5KjD2kfzEf75QZPrOgoTs2VOyydeXdQ+9IjsnR617lYbLldOI6PGkfZMMp771TBkAvWntiMg==",
|
"integrity": "sha512-vus+jwDci/X/9VEgDoTmSx0yTRRFQX5rf4gIGqILLLJZS++Dt6VRz3jHtvo0+Pk7uanRouDI6Nanf7w3ABUDLg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"monaco-languages": {
|
"monaco-languages": {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
"monaco-css": "2.7.0",
|
"monaco-css": "2.7.0",
|
||||||
"monaco-editor-core": "0.20.0",
|
"monaco-editor-core": "0.20.0",
|
||||||
"monaco-html": "2.7.0",
|
"monaco-html": "2.7.0",
|
||||||
"monaco-json": "2.9.0",
|
"monaco-json": "3.0.1",
|
||||||
"monaco-languages": "1.10.0",
|
"monaco-languages": "1.10.0",
|
||||||
"monaco-typescript": "3.7.0",
|
"monaco-typescript": "3.7.0",
|
||||||
"playwright": "1.2.0-next.1596653191842",
|
"playwright": "1.2.0-next.1596653191842",
|
||||||
|
|
|
||||||
|
|
@ -6710,69 +6710,57 @@ declare namespace monaco.languages.json {
|
||||||
*/
|
*/
|
||||||
readonly enableSchemaRequest?: boolean;
|
readonly enableSchemaRequest?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModeConfiguration {
|
export interface ModeConfiguration {
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentFormattingEdits?: boolean;
|
readonly documentFormattingEdits?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentRangeFormattingEdits?: boolean;
|
readonly documentRangeFormattingEdits?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in completionItemProvider is enabled.
|
* Defines whether the built-in completionItemProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly completionItems?: boolean;
|
readonly completionItems?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in hoverProvider is enabled.
|
* Defines whether the built-in hoverProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly hovers?: boolean;
|
readonly hovers?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly documentSymbols?: boolean;
|
readonly documentSymbols?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in tokens provider is enabled.
|
* Defines whether the built-in tokens provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly tokens?: boolean;
|
readonly tokens?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in color provider is enabled.
|
* Defines whether the built-in color provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly colors?: boolean;
|
readonly colors?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in foldingRange provider is enabled.
|
* Defines whether the built-in foldingRange provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly foldingRanges?: boolean;
|
readonly foldingRanges?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in diagnostic provider is enabled.
|
* Defines whether the built-in diagnostic provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly diagnostics?: boolean;
|
readonly diagnostics?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines whether the built-in selection range provider is enabled.
|
* Defines whether the built-in selection range provider is enabled.
|
||||||
*/
|
*/
|
||||||
readonly selectionRanges?: boolean;
|
readonly selectionRanges?: boolean;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LanguageServiceDefaults {
|
export interface LanguageServiceDefaults {
|
||||||
|
readonly languageId: string;
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||||
readonly modeConfiguration: ModeConfiguration;
|
readonly modeConfiguration: ModeConfiguration;
|
||||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||||
}
|
}
|
||||||
|
export const jsonDefaults: LanguageServiceDefaults;
|
||||||
export var jsonDefaults: LanguageServiceDefaults;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue