Browse Source

Update monaco-editor-core and dependencies.

Peng Lyu 6 years ago
parent
commit
fd2ab300e9
5 changed files with 83 additions and 22 deletions
  1. 17 0
      CHANGELOG.md
  2. 10 2
      CONTRIBUTING.md
  3. 48 12
      monaco.d.ts
  4. 6 6
      package-lock.json
  5. 2 2
      package.json

+ 17 - 0
CHANGELOG.md

@@ -1,5 +1,22 @@
 # Monaco Editor Changelog
 # Monaco Editor Changelog
 
 
+## [0.17.0] (05.05.2019)
+
+### New & Noteworthy
+
+* Localization support is brought back for AMD bundle. We lost the localization support when VS Code moved to the localization system but now AMD bundles ships the same localized strings VS Code localization extensions ship. For more details, please read [Monaco#822](https://github.com/Microsoft/monaco-editor/issues/822) and related [VS Code upstream issue](https://github.com/Microsoft/vscode/issues/71065)
+* `LinkProvider.ProvideLinks` should now return `ILinksList` instead of `ILink[]`.
+* `IEditorOptions.iconsInSuggestions` and `EditorContribOptions.iconsInSuggestions` are now replaced by `EditorContribOptions.suggest.showIcons`.
+* We introduced `EditorContribOptions.suggest.maxVisibleSuggestions` to control maximum suggestions to show in suggestions widget.
+* `EditorContribOptions.suggest.filteredTypes` is now introduced to allow suggestions to be filtered by the user. For more details, please read [vscode#45039](https://github.com/Microsoft/vscode/issues/45039).
+
+### Thank You
+
+Contributions to `monaco-editor`:
+
+* [Jonas Fonseca @jonas](https://github.com/jonas): Fix year for releases made in 2019 [PR #1388](https://github.com/Microsoft/monaco-editor/pull/1388)
+
+
 ## [0.16.2] (19.03.2019)
 ## [0.16.2] (19.03.2019)
 * Fixes for HTML and JSON (https://github.com/Microsoft/monaco-editor/issues/1367, https://github.com/Microsoft/monaco-editor/issues/1254)
 * Fixes for HTML and JSON (https://github.com/Microsoft/monaco-editor/issues/1367, https://github.com/Microsoft/monaco-editor/issues/1254)
 
 

+ 10 - 2
CONTRIBUTING.md

@@ -23,7 +23,11 @@ You need to have all the build setup of VS Code to be able to build the Monaco E
 * Install all the [prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites)
 * Install all the [prerequisites](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites)
 
 
 ### OS X and Linux
 ### OS X and Linux
-```
+
+```bash
+# clone vscode-loc repository for localized string resources
+/src> git clone https://github.com/microsoft/vscode-loc
+# clone VS Code repository
 /src> git clone https://github.com/microsoft/vscode
 /src> git clone https://github.com/microsoft/vscode
 /src> cd vscode
 /src> cd vscode
 # install npm deps for vscode
 # install npm deps for vscode
@@ -33,7 +37,11 @@ You need to have all the build setup of VS Code to be able to build the Monaco E
 ```
 ```
 
 
 ### Windows
 ### Windows
-```
+
+```cmd
+# clone vscode-loc repository for localized string resources
+/src> git clone https://github.com/microsoft/vscode-loc
+# clone VS Code repository
 /src> git clone https://github.com/microsoft/vscode
 /src> git clone https://github.com/microsoft/vscode
 /src> cd vscode
 /src> cd vscode
 # install npm deps for vscode
 # install npm deps for vscode

+ 48 - 12
monaco.d.ts

@@ -43,6 +43,7 @@ declare namespace monaco {
     }
     }
 
 
     export class CancellationTokenSource {
     export class CancellationTokenSource {
+        constructor(parent?: CancellationToken);
         readonly token: CancellationToken;
         readonly token: CancellationToken;
         cancel(): void;
         cancel(): void;
         dispose(): void;
         dispose(): void;
@@ -175,8 +176,11 @@ declare namespace monaco {
          * @param skipEncoding Do not encode the result, default is `false`
          * @param skipEncoding Do not encode the result, default is `false`
          */
          */
         toString(skipEncoding?: boolean): string;
         toString(skipEncoding?: boolean): string;
-        toJSON(): object;
-        static revive(data: UriComponents | any): Uri;
+        toJSON(): UriComponents;
+        static revive(data: UriComponents | Uri): Uri;
+        static revive(data: UriComponents | Uri | undefined): Uri | undefined;
+        static revive(data: UriComponents | Uri | null): Uri | null;
+        static revive(data: UriComponents | Uri | undefined | null): Uri | undefined | null;
     }
     }
 
 
     export interface UriComponents {
     export interface UriComponents {
@@ -1392,7 +1396,7 @@ declare namespace monaco.editor {
         /**
         /**
          * The text to replace with. This can be null to emulate a simple delete.
          * The text to replace with. This can be null to emulate a simple delete.
          */
          */
-        text: string;
+        text: string | null;
         /**
         /**
          * This indicates that this operation has "insert" semantics.
          * This indicates that this operation has "insert" semantics.
          * i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
          * i.e. forceMoveMarkers = true => if `range` is collapsed, all markers at the position will be moved.
@@ -2552,6 +2556,25 @@ declare namespace monaco.editor {
          * Enable using global storage for remembering suggestions.
          * Enable using global storage for remembering suggestions.
          */
          */
         shareSuggestSelections?: boolean;
         shareSuggestSelections?: boolean;
+		/**
+		 * Enable or disable icons in suggestions. Defaults to true.
+		 */
+        showIcons?: boolean;
+		/**
+		 * Max suggestions to show in suggestions. Defaults to 12.
+		 */
+        maxVisibleSuggestions?: boolean;
+		/**
+		 * Names of suggestion types to filter.
+		 */
+        filteredTypes?: Record<string, boolean>;
+    }
+
+    export interface IGotoLocationOptions {
+		/**
+		 * Control how goto-command work when having multiple results.
+		 */
+        multiple?: 'peek' | 'gotoAndPeek' | 'goto';
     }
     }
 
 
     /**
     /**
@@ -2594,7 +2617,7 @@ declare namespace monaco.editor {
         lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
         lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string);
         /**
         /**
          * Render last line number when the file ends with a newline.
          * Render last line number when the file ends with a newline.
-         * Defaults to true on Windows/Mac and to false on Linux.
+		 * Defaults to true.
         */
         */
         renderFinalNewline?: boolean;
         renderFinalNewline?: boolean;
         /**
         /**
@@ -2829,6 +2852,10 @@ declare namespace monaco.editor {
          */
          */
         suggest?: ISuggestOptions;
         suggest?: ISuggestOptions;
         /**
         /**
+		 *
+		 */
+        gotoLocation?: IGotoLocationOptions;
+		/**
          * Enable quick suggestions (shadow suggestions)
          * Enable quick suggestions (shadow suggestions)
          * Defaults to true.
          * Defaults to true.
          */
          */
@@ -2846,11 +2873,6 @@ declare namespace monaco.editor {
          * Parameter hint options.
          * Parameter hint options.
          */
          */
         parameterHints?: IEditorParameterHintOptions;
         parameterHints?: IEditorParameterHintOptions;
-        /**
-         * Render icons in suggestions box.
-         * Defaults to true.
-         */
-        iconsInSuggestions?: boolean;
         /**
         /**
          * Options for auto closing brackets.
          * Options for auto closing brackets.
          * Defaults to language defined behavior.
          * Defaults to language defined behavior.
@@ -3194,12 +3216,19 @@ declare namespace monaco.editor {
         readonly sticky: boolean;
         readonly sticky: boolean;
     }
     }
 
 
+    export interface InternalGoToLocationOptions {
+        readonly multiple: 'peek' | 'gotoAndPeek' | 'goto';
+    }
+
     export interface InternalSuggestOptions {
     export interface InternalSuggestOptions {
         readonly filterGraceful: boolean;
         readonly filterGraceful: boolean;
         readonly snippets: 'top' | 'bottom' | 'inline' | 'none';
         readonly snippets: 'top' | 'bottom' | 'inline' | 'none';
         readonly snippetsPreventQuickSuggestions: boolean;
         readonly snippetsPreventQuickSuggestions: boolean;
         readonly localityBonus: boolean;
         readonly localityBonus: boolean;
         readonly shareSuggestSelections: boolean;
         readonly shareSuggestSelections: boolean;
+        readonly showIcons: boolean;
+        readonly maxVisibleSuggestions: number;
+        readonly filteredTypes: Record<string, boolean>;
     }
     }
 
 
     export interface InternalParameterHintOptions {
     export interface InternalParameterHintOptions {
@@ -3274,7 +3303,6 @@ declare namespace monaco.editor {
         };
         };
         readonly quickSuggestionsDelay: number;
         readonly quickSuggestionsDelay: number;
         readonly parameterHints: InternalParameterHintOptions;
         readonly parameterHints: InternalParameterHintOptions;
-        readonly iconsInSuggestions: boolean;
         readonly formatOnType: boolean;
         readonly formatOnType: boolean;
         readonly formatOnPaste: boolean;
         readonly formatOnPaste: boolean;
         readonly suggestOnTriggerCharacters: boolean;
         readonly suggestOnTriggerCharacters: boolean;
@@ -3286,6 +3314,7 @@ declare namespace monaco.editor {
         readonly suggestLineHeight: number;
         readonly suggestLineHeight: number;
         readonly tabCompletion: 'on' | 'off' | 'onlySnippets';
         readonly tabCompletion: 'on' | 'off' | 'onlySnippets';
         readonly suggest: InternalSuggestOptions;
         readonly suggest: InternalSuggestOptions;
+        readonly gotoLocation: InternalGoToLocationOptions;
         readonly selectionHighlight: boolean;
         readonly selectionHighlight: boolean;
         readonly occurrencesHighlight: boolean;
         readonly occurrencesHighlight: boolean;
         readonly codeLens: boolean;
         readonly codeLens: boolean;
@@ -4572,7 +4601,7 @@ declare namespace monaco.languages {
         /**
         /**
          * The string that appears on the last line and closes the doc comment (e.g. ' * /').
          * The string that appears on the last line and closes the doc comment (e.g. ' * /').
          */
          */
-        close: string;
+        close?: string;
     }
     }
 
 
     /**
     /**
@@ -5185,6 +5214,7 @@ declare namespace monaco.languages {
      * the formatting-feature.
      * the formatting-feature.
      */
      */
     export interface DocumentFormattingEditProvider {
     export interface DocumentFormattingEditProvider {
+        readonly displayName?: string;
         /**
         /**
          * Provide formatting edits for a whole document.
          * Provide formatting edits for a whole document.
          */
          */
@@ -5196,6 +5226,7 @@ declare namespace monaco.languages {
      * the formatting-feature.
      * the formatting-feature.
      */
      */
     export interface DocumentRangeFormattingEditProvider {
     export interface DocumentRangeFormattingEditProvider {
+        readonly displayName?: string;
         /**
         /**
          * Provide formatting edits for a range in a document.
          * Provide formatting edits for a range in a document.
          *
          *
@@ -5230,11 +5261,16 @@ declare namespace monaco.languages {
         url?: Uri | string;
         url?: Uri | string;
     }
     }
 
 
+    export interface ILinksList {
+        links: ILink[];
+        dispose?(): void;
+    }
+
     /**
     /**
      * A provider of links.
      * A provider of links.
      */
      */
     export interface LinkProvider {
     export interface LinkProvider {
-        provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILink[]>;
+        provideLinks(model: editor.ITextModel, token: CancellationToken): ProviderResult<ILinksList>;
         resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
         resolveLink?: (link: ILink, token: CancellationToken) => ProviderResult<ILink>;
     }
     }
 
 

+ 6 - 6
package-lock.json

@@ -3096,15 +3096,15 @@
       "dev": true
       "dev": true
     },
     },
     "monaco-editor-core": {
     "monaco-editor-core": {
-      "version": "0.16.1",
-      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.16.1.tgz",
-      "integrity": "sha512-nydAuVbU3B1T/sNz4ZiO+92HUnLyVE4YQWr91R8WDEBItFZuwPs7Z2VaCTgouU6BwNrSnDdK/kAyhKgpih+GHQ==",
+      "version": "0.17.0",
+      "resolved": "https://registry.npmjs.org/monaco-editor-core/-/monaco-editor-core-0.17.0.tgz",
+      "integrity": "sha512-8q7b0itiX4UDv6e2F/EJc53G0iLL7P905IZsemu/bXffS7mIcjKKtX+TlzT13YbkuGFC/86Q32ANXERaJTM+mw==",
       "dev": true
       "dev": true
     },
     },
     "monaco-html": {
     "monaco-html": {
-      "version": "2.5.1",
-      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.5.1.tgz",
-      "integrity": "sha512-cqq5m7yk+BCQJk4nzz3q5OIXrKoiRu5EAPhu17vPXIIklp+VYIMnlTYhBvA/WDzHi4qLJamCAZ3xuRSiCoIj2g==",
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.5.2.tgz",
+      "integrity": "sha512-tugs+jHMtfInq/gMl5wXYoUs649rc5h6a/bbaK2+4MTx//iWUZ9mgTsgmbqqfbujEgHxxJHiGWTDIZjz8Ztx7g==",
       "dev": true
       "dev": true
     },
     },
     "monaco-json": {
     "monaco-json": {

+ 2 - 2
package.json

@@ -24,8 +24,8 @@
     "gulp-typedoc": "^2.2.2",
     "gulp-typedoc": "^2.2.2",
     "http-server": "^0.11.1",
     "http-server": "^0.11.1",
     "monaco-css": "2.5.0",
     "monaco-css": "2.5.0",
-    "monaco-editor-core": "0.16.1",
-    "monaco-html": "2.5.1",
+    "monaco-editor-core": "0.17.0",
+    "monaco-html": "2.5.2",
     "monaco-json": "2.5.1",
     "monaco-json": "2.5.1",
     "monaco-languages": "1.7.0",
     "monaco-languages": "1.7.0",
     "monaco-typescript": "3.4.1",
     "monaco-typescript": "3.4.1",