From 98afa9ef733c42f12f5c3263fa7d3d41e1c1ca7c Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 11:44:16 -0700 Subject: [PATCH 1/9] Allow user overrides of default viewers. --- .../docmanager-extension/schema/plugin.json | 10 +++ packages/docmanager-extension/src/index.ts | 17 +++++ packages/docregistry/src/registry.ts | 62 ++++++++++++++----- 3 files changed, 75 insertions(+), 14 deletions(-) diff --git a/packages/docmanager-extension/schema/plugin.json b/packages/docmanager-extension/schema/plugin.json index 897f2b26e96c..f5e4a8c4c93f 100644 --- a/packages/docmanager-extension/schema/plugin.json +++ b/packages/docmanager-extension/schema/plugin.json @@ -27,6 +27,16 @@ "title": "Autosave Interval", "description": "Length of save interval in seconds", "default": 120 + }, + "defaultViewers": { + "type": "object", + "title": "Default Viewers", + "default": {}, + "description": "Overrides for the default viewers for file types", + "properties": {}, + "additionalProperties": { + "type": "string" + } } }, "additionalProperties": false, diff --git a/packages/docmanager-extension/src/index.ts b/packages/docmanager-extension/src/index.ts index 0e52205b8457..670fac75d037 100644 --- a/packages/docmanager-extension/src/index.ts +++ b/packages/docmanager-extension/src/index.ts @@ -136,15 +136,32 @@ const docManagerPlugin: JupyterFrontEndPlugin = { // Keep up to date with the settings registry. const onSettingsUpdated = (settings: ISettingRegistry.ISettings) => { + // Handle whether to autosave const autosave = settings.get('autosave').composite as boolean | null; docManager.autosave = autosave === true || autosave === false ? autosave : true; app.commands.notifyCommandChanged(CommandIDs.toggleAutosave); + // Handle autosave interval const autosaveInterval = settings.get('autosaveInterval').composite as | number | null; docManager.autosaveInterval = autosaveInterval || 120; + + // Handle default widget factory overrides. + const factoryOverrides = settings.get('defaultViewers').composite as { + [ft: string]: string; + }; + Object.keys(factoryOverrides).forEach(ft => { + if (!registry.getFileType(ft)) { + console.warn(`File Type ${ft} not found`); + return; + } + if (!registry.getWidgetFactory(factoryOverrides[ft])) { + console.warn(`Document viewer ${factoryOverrides[ft]} not found`); + } + registry.setDefaultWidgetFactory(ft, factoryOverrides[ft]); + }); }; // Fetch the initial state of the settings. diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index cebc01a43648..88d653176e31 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -136,10 +136,10 @@ export class DocumentRegistry implements IDisposable { } // For convenience, store a mapping of file type name -> name for (let ft of factory.fileTypes) { - if (!this._widgetFactoryExtensions[ft]) { - this._widgetFactoryExtensions[ft] = []; + if (!this._widgetFactoriesForFileType[ft]) { + this._widgetFactoriesForFileType[ft] = []; } - this._widgetFactoryExtensions[ft].push(name); + this._widgetFactoriesForFileType[ft].push(name); } this._changed.emit({ type: 'widgetFactory', @@ -161,10 +161,10 @@ export class DocumentRegistry implements IDisposable { delete this._defaultRenderedWidgetFactories[ext]; } } - for (let ext of Object.keys(this._widgetFactoryExtensions)) { - ArrayExt.removeFirstOf(this._widgetFactoryExtensions[ext], name); - if (this._widgetFactoryExtensions[ext].length === 0) { - delete this._widgetFactoryExtensions[ext]; + for (let ext of Object.keys(this._widgetFactoriesForFileType)) { + ArrayExt.removeFirstOf(this._widgetFactoriesForFileType[ext], name); + if (this._widgetFactoriesForFileType[ext].length === 0) { + delete this._widgetFactoriesForFileType[ext]; } } this._changed.emit({ @@ -329,16 +329,16 @@ export class DocumentRegistry implements IDisposable { // Add the file type factories in registration order. fts.forEach(ft => { - if (ft.name in this._widgetFactoryExtensions) { - each(this._widgetFactoryExtensions[ft.name], n => { + if (ft.name in this._widgetFactoriesForFileType) { + each(this._widgetFactoriesForFileType[ft.name], n => { factories.add(n); }); } }); // Add the rest of the global factories, in registration order. - if ('*' in this._widgetFactoryExtensions) { - each(this._widgetFactoryExtensions['*'], n => { + if ('*' in this._widgetFactoriesForFileType) { + each(this._widgetFactoriesForFileType['*'], n => { factories.add(n); }); } @@ -407,6 +407,40 @@ export class DocumentRegistry implements IDisposable { return this.preferredWidgetFactories(path)[0]; } + /** + * Set the default widget factory for a file type. + * + * Normally, a widget factory informs the document registry which file types + * it should be the default for using the `defaultFor` option in the + * IWidgetFactoryOptions. This function can be used to override that after + * the fact. + * + * @param fileType: The name of the file type. + * + * @param factory: The name of the factory. + * + * #### Notes + * If `factory` is undefined, then no factory will be default for the file + * type. + */ + setDefaultWidgetFactory(fileType: string, factory: string | undefined): void { + if (!this.getFileType(fileType)) { + console.warn(`Cannot find file type ${fileType}`); + return; + } + if (!factory) { + if (this._defaultWidgetFactories[fileType]) { + delete this._defaultWidgetFactories[fileType]; + } + return; + } + if (!this.getWidgetFactory(factory)) { + console.warn(`Cannot find widget factory ${factory}`); + return; + } + this._defaultWidgetFactories[fileType] = factory; + } + /** * Create an iterator over the widget factories that have been registered. * @@ -610,9 +644,9 @@ export class DocumentRegistry implements IDisposable { private _defaultRenderedWidgetFactories: { [key: string]: string; } = Object.create(null); - private _widgetFactoryExtensions: { [key: string]: string[] } = Object.create( - null - ); + private _widgetFactoriesForFileType: { + [key: string]: string[]; + } = Object.create(null); private _fileTypes: DocumentRegistry.IFileType[] = []; private _extenders: { [key: string]: DocumentRegistry.WidgetExtension[]; From 1eff821913fea7fed4aef37ad839ff5932a3e6a2 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 13:12:10 -0700 Subject: [PATCH 2/9] Unset any overrides if they are removed. --- packages/docmanager-extension/src/index.ts | 17 ++++++++++++----- packages/docregistry/src/registry.ts | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/packages/docmanager-extension/src/index.ts b/packages/docmanager-extension/src/index.ts index 670fac75d037..be0fc697efd7 100644 --- a/packages/docmanager-extension/src/index.ts +++ b/packages/docmanager-extension/src/index.ts @@ -149,18 +149,25 @@ const docManagerPlugin: JupyterFrontEndPlugin = { docManager.autosaveInterval = autosaveInterval || 120; // Handle default widget factory overrides. - const factoryOverrides = settings.get('defaultViewers').composite as { + const defaultViewers = settings.get('defaultViewers').composite as { [ft: string]: string; }; - Object.keys(factoryOverrides).forEach(ft => { + const overrides: { [ft: string]: string } = {}; + // Filter the defaultViewers and file types for existing ones. + Object.keys(defaultViewers).forEach(ft => { if (!registry.getFileType(ft)) { console.warn(`File Type ${ft} not found`); return; } - if (!registry.getWidgetFactory(factoryOverrides[ft])) { - console.warn(`Document viewer ${factoryOverrides[ft]} not found`); + if (!registry.getWidgetFactory(defaultViewers[ft])) { + console.warn(`Document viewer ${defaultViewers[ft]} not found`); } - registry.setDefaultWidgetFactory(ft, factoryOverrides[ft]); + overrides[ft] = defaultViewers[ft]; + }); + // Set the default factory overrides. If not provided, this has the + // effect of unsetting any previous overrides. + each(registry.fileTypes(), ft => { + registry.setDefaultWidgetFactory(ft.name, overrides[ft.name]); }); }; diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index 88d653176e31..96dbcefd6eed 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -310,6 +310,9 @@ export class DocumentRegistry implements IDisposable { // Start with the file type default factories. fts.forEach(ft => { + if (ft.name in this._defaultWidgetFactoryOverrides) { + factories.add(this._defaultWidgetFactoryOverrides[ft.name]); + } if (ft.name in this._defaultWidgetFactories) { factories.add(this._defaultWidgetFactories[ft.name]); } @@ -408,7 +411,7 @@ export class DocumentRegistry implements IDisposable { } /** - * Set the default widget factory for a file type. + * Set overrides for the default widget factory for a file type. * * Normally, a widget factory informs the document registry which file types * it should be the default for using the `defaultFor` option in the @@ -420,17 +423,18 @@ export class DocumentRegistry implements IDisposable { * @param factory: The name of the factory. * * #### Notes - * If `factory` is undefined, then no factory will be default for the file - * type. + * If `factory` is undefined, then any override will be unset, and the + * default factory will revert to the original value. */ setDefaultWidgetFactory(fileType: string, factory: string | undefined): void { + fileType = fileType.toLowerCase(); if (!this.getFileType(fileType)) { console.warn(`Cannot find file type ${fileType}`); return; } if (!factory) { - if (this._defaultWidgetFactories[fileType]) { - delete this._defaultWidgetFactories[fileType]; + if (this._defaultWidgetFactoryOverrides[fileType]) { + delete this._defaultWidgetFactoryOverrides[fileType]; } return; } @@ -438,7 +442,7 @@ export class DocumentRegistry implements IDisposable { console.warn(`Cannot find widget factory ${factory}`); return; } - this._defaultWidgetFactories[fileType] = factory; + this._defaultWidgetFactoryOverrides[fileType] = factory.toLowerCase(); } /** @@ -638,6 +642,9 @@ export class DocumentRegistry implements IDisposable { [key: string]: DocumentRegistry.WidgetFactory; } = Object.create(null); private _defaultWidgetFactory = ''; + private _defaultWidgetFactoryOverrides: { + [key: string]: string; + } = Object.create(null); private _defaultWidgetFactories: { [key: string]: string } = Object.create( null ); From 905cda87fa02edfe46ed8f9cf7a49c3e75ac8766 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 14:42:07 -0700 Subject: [PATCH 3/9] Tests and error handling. --- packages/docregistry/src/registry.ts | 25 +++++++--- tests/test-docregistry/src/registry.spec.ts | 52 +++++++++++++++++++++ 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index 96dbcefd6eed..ae8536c096aa 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -308,11 +308,15 @@ export class DocumentRegistry implements IDisposable { // Get the ordered matching file types. let fts = this.getFileTypesForPath(PathExt.basename(path)); - // Start with the file type default factories. + // Start with any user overrides for the defaults. fts.forEach(ft => { if (ft.name in this._defaultWidgetFactoryOverrides) { factories.add(this._defaultWidgetFactoryOverrides[ft.name]); } + }); + + // Next add the file type default factories. + fts.forEach(ft => { if (ft.name in this._defaultWidgetFactories) { factories.add(this._defaultWidgetFactories[ft.name]); } @@ -425,12 +429,15 @@ export class DocumentRegistry implements IDisposable { * #### Notes * If `factory` is undefined, then any override will be unset, and the * default factory will revert to the original value. + * + * If `factory` or `fileType` are not known to the docregistry, or + * if `factory` cannot open files of type `fileType`, this will throw + * an error. */ setDefaultWidgetFactory(fileType: string, factory: string | undefined): void { fileType = fileType.toLowerCase(); if (!this.getFileType(fileType)) { - console.warn(`Cannot find file type ${fileType}`); - return; + throw Error(`Cannot find file type ${fileType}`); } if (!factory) { if (this._defaultWidgetFactoryOverrides[fileType]) { @@ -439,10 +446,16 @@ export class DocumentRegistry implements IDisposable { return; } if (!this.getWidgetFactory(factory)) { - console.warn(`Cannot find widget factory ${factory}`); - return; + throw Error(`Cannot find widget factory ${factory}`); + } + factory = factory.toLowerCase(); + if ( + !this._widgetFactoriesForFileType[fileType] || + !this._widgetFactoriesForFileType[fileType].includes(factory) + ) { + throw Error(`Factory ${factory} cannot view file type ${fileType}`); } - this._defaultWidgetFactoryOverrides[fileType] = factory.toLowerCase(); + this._defaultWidgetFactoryOverrides[fileType] = factory; } /** diff --git a/tests/test-docregistry/src/registry.spec.ts b/tests/test-docregistry/src/registry.spec.ts index 2b389ed3f874..0f3b6f567f4e 100644 --- a/tests/test-docregistry/src/registry.spec.ts +++ b/tests/test-docregistry/src/registry.spec.ts @@ -353,6 +353,58 @@ describe('docregistry/registry', () => { }); }); + describe('#setDefaultWidgetFactory()', () => { + it('should override the default widget factory for a file type', () => { + const factory = createFactory(); + registry.addWidgetFactory(factory); + const mdFactory = new WidgetFactory({ + name: 'markdown', + fileTypes: ['markdown', 'foobar'], + defaultFor: [] + }); + registry.addWidgetFactory(mdFactory); + registry.setDefaultWidgetFactory('foobar', 'markdown'); + expect(registry.defaultWidgetFactory('a.foo.bar')).to.equal(mdFactory); + }); + + it('should revert to the default widget factory when unset', () => { + const factory = createFactory(); + registry.addWidgetFactory(factory); + const mdFactory = new WidgetFactory({ + name: 'markdown', + fileTypes: ['markdown', 'foobar'], + defaultFor: [] + }); + registry.addWidgetFactory(mdFactory); + registry.setDefaultWidgetFactory('foobar', 'markdown'); + registry.setDefaultWidgetFactory('foobar', undefined); + expect(registry.defaultWidgetFactory('a.foo.bar')).to.equal(factory); + }); + + it('should throw if the factory or file type do not exist', () => { + const factory = createFactory(); + registry.addWidgetFactory(factory); + expect(() => { + registry.setDefaultWidgetFactory('foobar', 'fake'); + }).to.throw(/Cannot find/); + expect(() => { + registry.setDefaultWidgetFactory('fake', undefined); + }).to.throw(/Cannot find/); + }); + + it('should throw if the factory cannot render a file type', () => { + const mdFactory = new WidgetFactory({ + name: 'markdown', + fileTypes: ['markdown'], + defaultFor: [] + }); + registry.addWidgetFactory(mdFactory); + expect(() => { + registry.setDefaultWidgetFactory('foobar', 'markdown'); + }).to.throw(/cannot view/); + }); + }); + describe('#defaultRenderedWidgetFactory()', () => { it('should get the default rendered widget factory for a given extension', () => { const factory = createFactory(); From b71348968754ebdf6abb15eee78aa0bced1cd593 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 15:12:51 -0700 Subject: [PATCH 4/9] Handle some edge cases a bit better. --- packages/docmanager-extension/src/index.ts | 10 +++++++++- packages/docregistry/src/registry.ts | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/docmanager-extension/src/index.ts b/packages/docmanager-extension/src/index.ts index be0fc697efd7..611071f8cc1e 100644 --- a/packages/docmanager-extension/src/index.ts +++ b/packages/docmanager-extension/src/index.ts @@ -167,7 +167,15 @@ const docManagerPlugin: JupyterFrontEndPlugin = { // Set the default factory overrides. If not provided, this has the // effect of unsetting any previous overrides. each(registry.fileTypes(), ft => { - registry.setDefaultWidgetFactory(ft.name, overrides[ft.name]); + try { + registry.setDefaultWidgetFactory(ft.name, overrides[ft.name]); + } catch { + console.warn( + `Failed to set default viewer ${overrides[ft.name]} for file type ${ + ft.name + }` + ); + } }); }; diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index ae8536c096aa..9cc4400d2729 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -449,9 +449,10 @@ export class DocumentRegistry implements IDisposable { throw Error(`Cannot find widget factory ${factory}`); } factory = factory.toLowerCase(); + const factories = this._widgetFactoriesForFileType[fileType]; if ( - !this._widgetFactoriesForFileType[fileType] || - !this._widgetFactoriesForFileType[fileType].includes(factory) + factory !== this._defaultWidgetFactory && + !(factories && factories.includes(factory)) ) { throw Error(`Factory ${factory} cannot view file type ${fileType}`); } From 9b5a7157912251b23e39c0aefd3ae1e289d9d9e0 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 15:20:49 -0700 Subject: [PATCH 5/9] Check for invalid widget factory name. --- packages/docregistry/src/registry.ts | 6 +++++- tests/test-docregistry/src/registry.spec.ts | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index 9cc4400d2729..86b42f25053c 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -104,15 +104,19 @@ export class DocumentRegistry implements IDisposable { * @returns A disposable which will unregister the factory. * * #### Notes - * If a factory with the given `'displayName'` is already registered, + * If a factory with the given `'name'` is already registered, * a warning will be logged, and this will be a no-op. * If `'*'` is given as a default extension, the factory will be registered * as the global default. * If an extension or global default is already registered, this factory * will override the existing default. + * The factory cannot be named an empty string or the string `'default'`. */ addWidgetFactory(factory: DocumentRegistry.WidgetFactory): IDisposable { let name = factory.name.toLowerCase(); + if (!name || name === 'default') { + throw Error('Invalid factory name'); + } if (this._widgetFactories[name]) { console.warn(`Duplicate registered factory ${name}`); return new DisposableDelegate(Private.noOp); diff --git a/tests/test-docregistry/src/registry.spec.ts b/tests/test-docregistry/src/registry.spec.ts index 0f3b6f567f4e..e50631ea9731 100644 --- a/tests/test-docregistry/src/registry.spec.ts +++ b/tests/test-docregistry/src/registry.spec.ts @@ -138,6 +138,27 @@ describe('docregistry/registry', () => { disposable.dispose(); expect(registry.getWidgetFactory('test')).to.be.undefined; }); + + it('should throw for an invalid factory name', () => { + expect(() => { + registry.addWidgetFactory( + new WidgetFactory({ + name: 'default', + fileTypes: [], + defaultFor: [] + }) + ); + }).to.throw(/Invalid/); + expect(() => { + registry.addWidgetFactory( + new WidgetFactory({ + name: '', + fileTypes: [], + defaultFor: [] + }) + ); + }).to.throw(/Invalid/); + }); }); describe('#addModelFactory()', () => { From a9610a6b3fb77becf7fe567d308e24eb4b912c90 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 15:27:15 -0700 Subject: [PATCH 6/9] Remove override if the factory is disposed. --- packages/docregistry/src/registry.ts | 5 +++++ tests/test-docregistry/src/registry.spec.ts | 16 ++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/docregistry/src/registry.ts b/packages/docregistry/src/registry.ts index 86b42f25053c..bc9861f407ad 100644 --- a/packages/docregistry/src/registry.ts +++ b/packages/docregistry/src/registry.ts @@ -171,6 +171,11 @@ export class DocumentRegistry implements IDisposable { delete this._widgetFactoriesForFileType[ext]; } } + for (let ext of Object.keys(this._defaultWidgetFactoryOverrides)) { + if (this._defaultWidgetFactoryOverrides[ext] === name) { + delete this._defaultWidgetFactoryOverrides[ext]; + } + } this._changed.emit({ type: 'widgetFactory', name, diff --git a/tests/test-docregistry/src/registry.spec.ts b/tests/test-docregistry/src/registry.spec.ts index e50631ea9731..6384c63392c2 100644 --- a/tests/test-docregistry/src/registry.spec.ts +++ b/tests/test-docregistry/src/registry.spec.ts @@ -376,8 +376,6 @@ describe('docregistry/registry', () => { describe('#setDefaultWidgetFactory()', () => { it('should override the default widget factory for a file type', () => { - const factory = createFactory(); - registry.addWidgetFactory(factory); const mdFactory = new WidgetFactory({ name: 'markdown', fileTypes: ['markdown', 'foobar'], @@ -424,6 +422,20 @@ describe('docregistry/registry', () => { registry.setDefaultWidgetFactory('foobar', 'markdown'); }).to.throw(/cannot view/); }); + + it('should revert to the default widget factory if the override is removed', () => { + const factory = createFactory(); + registry.addWidgetFactory(factory); + const mdFactory = new WidgetFactory({ + name: 'markdown', + fileTypes: ['markdown', 'foobar'], + defaultFor: [] + }); + const disposable = registry.addWidgetFactory(mdFactory); + registry.setDefaultWidgetFactory('foobar', 'markdown'); + disposable.dispose(); + expect(registry.defaultWidgetFactory('a.foo.bar')).to.equal(factory); + }); }); describe('#defaultRenderedWidgetFactory()', () => { From a210fa5b303c8998ff83b05887d906e44d361f99 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 16:14:48 -0700 Subject: [PATCH 7/9] Update typedoc to es2017. --- packages/application-extension/tdoptions.json | 9 ++------- packages/application/tdoptions.json | 9 ++------- packages/apputils-extension/tdoptions.json | 9 ++------- packages/apputils/tdoptions.json | 9 ++------- packages/attachments/tdoptions.json | 9 ++------- packages/cells/tdoptions.json | 9 ++------- packages/codeeditor/tdoptions.json | 9 ++------- packages/codemirror-extension/tdoptions.json | 9 ++------- packages/codemirror/tdoptions.json | 9 ++------- packages/completer-extension/tdoptions.json | 9 ++------- packages/completer/tdoptions.json | 9 ++------- packages/console-extension/tdoptions.json | 9 ++------- packages/console/tdoptions.json | 9 ++------- packages/coreutils/tdoptions.json | 9 ++------- packages/csvviewer-extension/tdoptions.json | 9 ++------- packages/csvviewer/tdoptions.json | 9 ++------- packages/docmanager-extension/tdoptions.json | 9 ++------- packages/docmanager/tdoptions.json | 9 ++------- packages/docregistry/tdoptions.json | 9 ++------- packages/extensionmanager-extension/tdoptions.json | 9 ++------- packages/extensionmanager/tdoptions.json | 9 ++------- packages/filebrowser-extension/tdoptions.json | 9 ++------- packages/filebrowser/tdoptions.json | 9 ++------- packages/fileeditor-extension/tdoptions.json | 9 ++------- packages/fileeditor/tdoptions.json | 9 ++------- packages/help-extension/tdoptions.json | 9 ++------- packages/htmlviewer-extension/tdoptions.json | 9 ++------- packages/htmlviewer/tdoptions.json | 9 ++------- packages/imageviewer-extension/tdoptions.json | 9 ++------- packages/imageviewer/tdoptions.json | 9 ++------- packages/inspector-extension/tdoptions.json | 9 ++------- packages/inspector/tdoptions.json | 9 ++------- packages/javascript-extension/tdoptions.json | 9 ++------- packages/json-extension/tdoptions.json | 9 ++------- packages/launcher-extension/tdoptions.json | 9 ++------- packages/launcher/tdoptions.json | 9 ++------- packages/mainmenu-extension/tdoptions.json | 9 ++------- packages/mainmenu/tdoptions.json | 9 ++------- packages/markdownviewer-extension/tdoptions.json | 9 ++------- packages/markdownviewer/tdoptions.json | 9 ++------- packages/mathjax2-extension/tdoptions.json | 9 ++------- packages/mathjax2/tdoptions.json | 9 ++------- packages/notebook-extension/tdoptions.json | 9 ++------- packages/notebook/tdoptions.json | 9 ++------- packages/observables/tdoptions.json | 9 ++------- packages/outputarea/tdoptions.json | 9 ++------- packages/pdf-extension/tdoptions.json | 9 ++------- packages/rendermime-extension/tdoptions.json | 9 ++------- packages/rendermime-interfaces/tdoptions.json | 9 ++------- packages/rendermime/tdoptions.json | 9 ++------- packages/running-extension/tdoptions.json | 9 ++------- packages/running/tdoptions.json | 9 ++------- packages/services/tdoptions.json | 9 ++------- packages/settingeditor-extension/tdoptions.json | 9 ++------- packages/settingeditor/tdoptions.json | 9 ++------- packages/shortcuts-extension/tdoptions.json | 9 ++------- packages/statusbar-extension/tdoptions.json | 9 ++------- packages/statusbar/tdoptions.json | 9 ++------- packages/tabmanager-extension/tdoptions.json | 9 ++------- packages/terminal-extension/tdoptions.json | 9 ++------- packages/terminal/tdoptions.json | 9 ++------- packages/theme-dark-extension/tdoptions.json | 9 ++------- packages/theme-light-extension/tdoptions.json | 9 ++------- packages/tooltip-extension/tdoptions.json | 9 ++------- packages/tooltip/tdoptions.json | 9 ++------- packages/ui-components/tdoptions.json | 7 ++----- packages/vdom-extension/tdoptions.json | 9 ++------- packages/vdom/tdoptions.json | 9 ++------- packages/vega4-extension/tdoptions.json | 9 ++------- packages/vega5-extension/tdoptions.json | 9 ++------- 70 files changed, 140 insertions(+), 488 deletions(-) diff --git a/packages/application-extension/tdoptions.json b/packages/application-extension/tdoptions.json index 80b5c3923666..d790b6f1de2f 100644 --- a/packages/application-extension/tdoptions.json +++ b/packages/application-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/application-extension", "baseUrl": ".", "paths": { diff --git a/packages/application/tdoptions.json b/packages/application/tdoptions.json index 533fc1c55240..4a661ed8d30e 100644 --- a/packages/application/tdoptions.json +++ b/packages/application/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/application", "baseUrl": ".", "paths": { diff --git a/packages/apputils-extension/tdoptions.json b/packages/apputils-extension/tdoptions.json index fa6817086b14..5adf3312266e 100644 --- a/packages/apputils-extension/tdoptions.json +++ b/packages/apputils-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/apputils-extension", "baseUrl": ".", "paths": { diff --git a/packages/apputils/tdoptions.json b/packages/apputils/tdoptions.json index 32824065e6dd..fbfd6c380dc8 100644 --- a/packages/apputils/tdoptions.json +++ b/packages/apputils/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/apputils", "baseUrl": ".", "paths": { diff --git a/packages/attachments/tdoptions.json b/packages/attachments/tdoptions.json index 142304a64643..4ed6a94a238b 100644 --- a/packages/attachments/tdoptions.json +++ b/packages/attachments/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/attachments", "baseUrl": ".", "paths": { diff --git a/packages/cells/tdoptions.json b/packages/cells/tdoptions.json index f1a4c05135a4..785da5a9bad5 100644 --- a/packages/cells/tdoptions.json +++ b/packages/cells/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/cells", "baseUrl": ".", "paths": { diff --git a/packages/codeeditor/tdoptions.json b/packages/codeeditor/tdoptions.json index 9dcb180bd552..873e2bf8c5a8 100644 --- a/packages/codeeditor/tdoptions.json +++ b/packages/codeeditor/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/codeeditor", "baseUrl": ".", "paths": { diff --git a/packages/codemirror-extension/tdoptions.json b/packages/codemirror-extension/tdoptions.json index b69c52109d3e..b676fe064257 100644 --- a/packages/codemirror-extension/tdoptions.json +++ b/packages/codemirror-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/codemirror-extension", "baseUrl": ".", "paths": { diff --git a/packages/codemirror/tdoptions.json b/packages/codemirror/tdoptions.json index a6d04881cba9..99414b3abd06 100644 --- a/packages/codemirror/tdoptions.json +++ b/packages/codemirror/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/codemirror", "baseUrl": ".", "paths": { diff --git a/packages/completer-extension/tdoptions.json b/packages/completer-extension/tdoptions.json index 9360c3fdde5a..5c1a8fad61ab 100644 --- a/packages/completer-extension/tdoptions.json +++ b/packages/completer-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/completer-extension", "baseUrl": ".", "paths": { diff --git a/packages/completer/tdoptions.json b/packages/completer/tdoptions.json index 6543ec9ebcd4..2683946d97c3 100644 --- a/packages/completer/tdoptions.json +++ b/packages/completer/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/completer", "baseUrl": ".", "paths": { diff --git a/packages/console-extension/tdoptions.json b/packages/console-extension/tdoptions.json index 0278f0c5e57c..0894fd1fdb66 100644 --- a/packages/console-extension/tdoptions.json +++ b/packages/console-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/console-extension", "baseUrl": ".", "paths": { diff --git a/packages/console/tdoptions.json b/packages/console/tdoptions.json index 40ae27107de8..e57d6c07ffcd 100644 --- a/packages/console/tdoptions.json +++ b/packages/console/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/console", "baseUrl": ".", "paths": { diff --git a/packages/coreutils/tdoptions.json b/packages/coreutils/tdoptions.json index 60298e20bb37..a2aa971064ff 100644 --- a/packages/coreutils/tdoptions.json +++ b/packages/coreutils/tdoptions.json @@ -1,15 +1,10 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "commonjs", "esModuleInterop": true, - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/coreutils", "baseUrl": ".", "paths": { diff --git a/packages/csvviewer-extension/tdoptions.json b/packages/csvviewer-extension/tdoptions.json index 1a51e1687ef0..c74a3aa2fada 100644 --- a/packages/csvviewer-extension/tdoptions.json +++ b/packages/csvviewer-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/csvviewer-extension", "baseUrl": ".", "paths": { diff --git a/packages/csvviewer/tdoptions.json b/packages/csvviewer/tdoptions.json index 3fb66fae58e7..2053ff516664 100644 --- a/packages/csvviewer/tdoptions.json +++ b/packages/csvviewer/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/csvviewer", "baseUrl": ".", "paths": { diff --git a/packages/docmanager-extension/tdoptions.json b/packages/docmanager-extension/tdoptions.json index 78b5ad3f3548..cdb9af7dd69b 100644 --- a/packages/docmanager-extension/tdoptions.json +++ b/packages/docmanager-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/docmanager-extension", "baseUrl": ".", "paths": { diff --git a/packages/docmanager/tdoptions.json b/packages/docmanager/tdoptions.json index 8513c0aa17ed..e42c07851abc 100644 --- a/packages/docmanager/tdoptions.json +++ b/packages/docmanager/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/docmanager", "baseUrl": ".", "paths": { diff --git a/packages/docregistry/tdoptions.json b/packages/docregistry/tdoptions.json index 85950a15c46e..4cd8e627a76a 100644 --- a/packages/docregistry/tdoptions.json +++ b/packages/docregistry/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/docregistry", "baseUrl": ".", "paths": { diff --git a/packages/extensionmanager-extension/tdoptions.json b/packages/extensionmanager-extension/tdoptions.json index ff2f55f31b29..7d2999c93cc2 100644 --- a/packages/extensionmanager-extension/tdoptions.json +++ b/packages/extensionmanager-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/extensionmanager-extension", "baseUrl": ".", "paths": { diff --git a/packages/extensionmanager/tdoptions.json b/packages/extensionmanager/tdoptions.json index 8dd6a56f6bc5..08eeb10ffc74 100644 --- a/packages/extensionmanager/tdoptions.json +++ b/packages/extensionmanager/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/extensionmanager", "baseUrl": ".", "paths": { diff --git a/packages/filebrowser-extension/tdoptions.json b/packages/filebrowser-extension/tdoptions.json index 8835678e5ecb..1dfffaed6a67 100644 --- a/packages/filebrowser-extension/tdoptions.json +++ b/packages/filebrowser-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/filebrowser-extension", "baseUrl": ".", "paths": { diff --git a/packages/filebrowser/tdoptions.json b/packages/filebrowser/tdoptions.json index f01be3312788..d2be71ee4ec8 100644 --- a/packages/filebrowser/tdoptions.json +++ b/packages/filebrowser/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/filebrowser", "baseUrl": ".", "paths": { diff --git a/packages/fileeditor-extension/tdoptions.json b/packages/fileeditor-extension/tdoptions.json index cb43bcbe307d..1844da01ee73 100644 --- a/packages/fileeditor-extension/tdoptions.json +++ b/packages/fileeditor-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/fileeditor-extension", "baseUrl": ".", "paths": { diff --git a/packages/fileeditor/tdoptions.json b/packages/fileeditor/tdoptions.json index 3cb978463974..bf669d7f94d8 100644 --- a/packages/fileeditor/tdoptions.json +++ b/packages/fileeditor/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/fileeditor", "baseUrl": ".", "paths": { diff --git a/packages/help-extension/tdoptions.json b/packages/help-extension/tdoptions.json index d13681923525..4d7022a838bc 100644 --- a/packages/help-extension/tdoptions.json +++ b/packages/help-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/help-extension", "baseUrl": ".", "paths": { diff --git a/packages/htmlviewer-extension/tdoptions.json b/packages/htmlviewer-extension/tdoptions.json index db96d267d91d..e8d216d0a351 100644 --- a/packages/htmlviewer-extension/tdoptions.json +++ b/packages/htmlviewer-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/htmlviewer-extension", "baseUrl": ".", "paths": { diff --git a/packages/htmlviewer/tdoptions.json b/packages/htmlviewer/tdoptions.json index 4db385fe8406..728e0f7d0fae 100644 --- a/packages/htmlviewer/tdoptions.json +++ b/packages/htmlviewer/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/htmlviewer", "baseUrl": ".", "paths": { diff --git a/packages/imageviewer-extension/tdoptions.json b/packages/imageviewer-extension/tdoptions.json index f3370606a983..c50752660c19 100644 --- a/packages/imageviewer-extension/tdoptions.json +++ b/packages/imageviewer-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/imageviewer-extension", "baseUrl": ".", "paths": { diff --git a/packages/imageviewer/tdoptions.json b/packages/imageviewer/tdoptions.json index 23e3c68bfb9e..97ccd4e678a7 100644 --- a/packages/imageviewer/tdoptions.json +++ b/packages/imageviewer/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/imageviewer", "baseUrl": ".", "paths": { diff --git a/packages/inspector-extension/tdoptions.json b/packages/inspector-extension/tdoptions.json index 27b79fb1a66c..425d8cc4f2e1 100644 --- a/packages/inspector-extension/tdoptions.json +++ b/packages/inspector-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/inspector-extension", "baseUrl": ".", "paths": { diff --git a/packages/inspector/tdoptions.json b/packages/inspector/tdoptions.json index 3c2e6ce51d3f..75ccb698c50b 100644 --- a/packages/inspector/tdoptions.json +++ b/packages/inspector/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/inspector", "baseUrl": ".", "paths": { diff --git a/packages/javascript-extension/tdoptions.json b/packages/javascript-extension/tdoptions.json index 0cae23d58254..d7cd535d4c2f 100644 --- a/packages/javascript-extension/tdoptions.json +++ b/packages/javascript-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/javascript-extension", "baseUrl": ".", "paths": { diff --git a/packages/json-extension/tdoptions.json b/packages/json-extension/tdoptions.json index d8b7c364340d..52ea74dd0f99 100644 --- a/packages/json-extension/tdoptions.json +++ b/packages/json-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/json-extension", "baseUrl": ".", "paths": { diff --git a/packages/launcher-extension/tdoptions.json b/packages/launcher-extension/tdoptions.json index 3491154d011f..1e4dc3abbe67 100644 --- a/packages/launcher-extension/tdoptions.json +++ b/packages/launcher-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/launcher-extension", "baseUrl": ".", "paths": { diff --git a/packages/launcher/tdoptions.json b/packages/launcher/tdoptions.json index 0c14a36df549..cdaa8604ac76 100644 --- a/packages/launcher/tdoptions.json +++ b/packages/launcher/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/launcher", "baseUrl": ".", "paths": { diff --git a/packages/mainmenu-extension/tdoptions.json b/packages/mainmenu-extension/tdoptions.json index a207a72fdb8b..9c5f53962100 100644 --- a/packages/mainmenu-extension/tdoptions.json +++ b/packages/mainmenu-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/mainmenu-extension", "baseUrl": ".", "paths": { diff --git a/packages/mainmenu/tdoptions.json b/packages/mainmenu/tdoptions.json index d0b3329271fc..d51973faf593 100644 --- a/packages/mainmenu/tdoptions.json +++ b/packages/mainmenu/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/mainmenu", "baseUrl": ".", "paths": { diff --git a/packages/markdownviewer-extension/tdoptions.json b/packages/markdownviewer-extension/tdoptions.json index 34826265719f..53bb11d58abc 100644 --- a/packages/markdownviewer-extension/tdoptions.json +++ b/packages/markdownviewer-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/markdownviewer-extension", "baseUrl": ".", "paths": { diff --git a/packages/markdownviewer/tdoptions.json b/packages/markdownviewer/tdoptions.json index b63b9e2d205d..de649aa8f273 100644 --- a/packages/markdownviewer/tdoptions.json +++ b/packages/markdownviewer/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/markdownviewer", "baseUrl": ".", "paths": { diff --git a/packages/mathjax2-extension/tdoptions.json b/packages/mathjax2-extension/tdoptions.json index 3afbd8bf1482..c43fa2a63f5b 100644 --- a/packages/mathjax2-extension/tdoptions.json +++ b/packages/mathjax2-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/mathjax2-extension", "baseUrl": ".", "paths": { diff --git a/packages/mathjax2/tdoptions.json b/packages/mathjax2/tdoptions.json index 06da87dedc17..3c92fc64297c 100644 --- a/packages/mathjax2/tdoptions.json +++ b/packages/mathjax2/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/mathjax2", "baseUrl": ".", "paths": { diff --git a/packages/notebook-extension/tdoptions.json b/packages/notebook-extension/tdoptions.json index 00f651a0bb09..b9989ac02282 100644 --- a/packages/notebook-extension/tdoptions.json +++ b/packages/notebook-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/notebook-extension", "baseUrl": ".", "paths": { diff --git a/packages/notebook/tdoptions.json b/packages/notebook/tdoptions.json index ec6224a39745..be87712863ca 100644 --- a/packages/notebook/tdoptions.json +++ b/packages/notebook/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/notebook", "baseUrl": ".", "paths": { diff --git a/packages/observables/tdoptions.json b/packages/observables/tdoptions.json index 24678364f2df..74f4438989dd 100644 --- a/packages/observables/tdoptions.json +++ b/packages/observables/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/observables", "baseUrl": ".", "paths": { diff --git a/packages/outputarea/tdoptions.json b/packages/outputarea/tdoptions.json index 8af8839cf468..9199e1cf9f15 100644 --- a/packages/outputarea/tdoptions.json +++ b/packages/outputarea/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/outputarea", "baseUrl": ".", "paths": { diff --git a/packages/pdf-extension/tdoptions.json b/packages/pdf-extension/tdoptions.json index 28e5ab9c062e..44a2608c5843 100644 --- a/packages/pdf-extension/tdoptions.json +++ b/packages/pdf-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/pdf-extension", "baseUrl": ".", "paths": { diff --git a/packages/rendermime-extension/tdoptions.json b/packages/rendermime-extension/tdoptions.json index 6cb4928e5637..9db5928fc13b 100644 --- a/packages/rendermime-extension/tdoptions.json +++ b/packages/rendermime-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/rendermime-extension", "baseUrl": ".", "paths": { diff --git a/packages/rendermime-interfaces/tdoptions.json b/packages/rendermime-interfaces/tdoptions.json index e8070fb0ed63..9bf76e9ec118 100644 --- a/packages/rendermime-interfaces/tdoptions.json +++ b/packages/rendermime-interfaces/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/rendermime-interfaces", "baseUrl": ".", "paths": { diff --git a/packages/rendermime/tdoptions.json b/packages/rendermime/tdoptions.json index f436ec7abc6b..1d05b283b687 100644 --- a/packages/rendermime/tdoptions.json +++ b/packages/rendermime/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/rendermime", "baseUrl": ".", "paths": { diff --git a/packages/running-extension/tdoptions.json b/packages/running-extension/tdoptions.json index 8583bc652d59..1d197fcee8f9 100644 --- a/packages/running-extension/tdoptions.json +++ b/packages/running-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/running-extension", "baseUrl": ".", "paths": { diff --git a/packages/running/tdoptions.json b/packages/running/tdoptions.json index ac6b90286eeb..2bbb7143fec4 100644 --- a/packages/running/tdoptions.json +++ b/packages/running/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/running", "baseUrl": ".", "paths": { diff --git a/packages/services/tdoptions.json b/packages/services/tdoptions.json index 0f8fb65ebcc1..962e83858078 100644 --- a/packages/services/tdoptions.json +++ b/packages/services/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/services", "baseUrl": ".", "paths": { diff --git a/packages/settingeditor-extension/tdoptions.json b/packages/settingeditor-extension/tdoptions.json index 40177d0bfb26..013d529fac2d 100644 --- a/packages/settingeditor-extension/tdoptions.json +++ b/packages/settingeditor-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/settingeditor-extension", "baseUrl": ".", "paths": { diff --git a/packages/settingeditor/tdoptions.json b/packages/settingeditor/tdoptions.json index d423a114a716..dddcb3c34f73 100644 --- a/packages/settingeditor/tdoptions.json +++ b/packages/settingeditor/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/settingeditor", "baseUrl": ".", "paths": { diff --git a/packages/shortcuts-extension/tdoptions.json b/packages/shortcuts-extension/tdoptions.json index d6002ade7fcf..040b3794e6eb 100644 --- a/packages/shortcuts-extension/tdoptions.json +++ b/packages/shortcuts-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/shortcuts-extension", "baseUrl": ".", "paths": { diff --git a/packages/statusbar-extension/tdoptions.json b/packages/statusbar-extension/tdoptions.json index dd95ae826fa8..9441d20278af 100644 --- a/packages/statusbar-extension/tdoptions.json +++ b/packages/statusbar-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/statusbar-extension", "baseUrl": ".", "paths": { diff --git a/packages/statusbar/tdoptions.json b/packages/statusbar/tdoptions.json index 8a71095c9a3f..9436dc8e3726 100644 --- a/packages/statusbar/tdoptions.json +++ b/packages/statusbar/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/statusbar", "baseUrl": ".", "paths": { diff --git a/packages/tabmanager-extension/tdoptions.json b/packages/tabmanager-extension/tdoptions.json index 17b8f8156a0f..93fa3068e009 100644 --- a/packages/tabmanager-extension/tdoptions.json +++ b/packages/tabmanager-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/tabmanager-extension", "baseUrl": ".", "paths": { diff --git a/packages/terminal-extension/tdoptions.json b/packages/terminal-extension/tdoptions.json index fe286fedc30c..c5179543644a 100644 --- a/packages/terminal-extension/tdoptions.json +++ b/packages/terminal-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/terminal-extension", "baseUrl": ".", "paths": { diff --git a/packages/terminal/tdoptions.json b/packages/terminal/tdoptions.json index 19f53508227b..5149ba5eb355 100644 --- a/packages/terminal/tdoptions.json +++ b/packages/terminal/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/terminal", "baseUrl": ".", "paths": { diff --git a/packages/theme-dark-extension/tdoptions.json b/packages/theme-dark-extension/tdoptions.json index a08ba09f9ae9..7e5ab49fd69e 100644 --- a/packages/theme-dark-extension/tdoptions.json +++ b/packages/theme-dark-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/theme-dark-extension", "baseUrl": ".", "paths": { diff --git a/packages/theme-light-extension/tdoptions.json b/packages/theme-light-extension/tdoptions.json index 018bfa8fcd40..a337078b0a87 100644 --- a/packages/theme-light-extension/tdoptions.json +++ b/packages/theme-light-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/theme-light-extension", "baseUrl": ".", "paths": { diff --git a/packages/tooltip-extension/tdoptions.json b/packages/tooltip-extension/tdoptions.json index 2fb6e45224d2..cfb2eb977073 100644 --- a/packages/tooltip-extension/tdoptions.json +++ b/packages/tooltip-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/tooltip-extension", "baseUrl": ".", "paths": { diff --git a/packages/tooltip/tdoptions.json b/packages/tooltip/tdoptions.json index da998eeb8f48..2c824a896892 100644 --- a/packages/tooltip/tdoptions.json +++ b/packages/tooltip/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/tooltip", "baseUrl": ".", "paths": { diff --git a/packages/ui-components/tdoptions.json b/packages/ui-components/tdoptions.json index 330558b24eac..a6350b56988b 100644 --- a/packages/ui-components/tdoptions.json +++ b/packages/ui-components/tdoptions.json @@ -1,14 +1,11 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", "lib.dom.d.ts", - "lib.dom.iterable.d.ts" + "lib.es2017.d.ts" ], "out": "../../docs/api/ui-components", "baseUrl": ".", diff --git a/packages/vdom-extension/tdoptions.json b/packages/vdom-extension/tdoptions.json index ee90f505f992..7d96f9f12796 100644 --- a/packages/vdom-extension/tdoptions.json +++ b/packages/vdom-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/vdom-extension", "baseUrl": ".", "paths": { diff --git a/packages/vdom/tdoptions.json b/packages/vdom/tdoptions.json index 64583dc976a7..fb4dc48d4738 100644 --- a/packages/vdom/tdoptions.json +++ b/packages/vdom/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/vdom", "baseUrl": ".", "paths": { diff --git a/packages/vega4-extension/tdoptions.json b/packages/vega4-extension/tdoptions.json index f7e43cbe5ad2..3409f49d6cd0 100644 --- a/packages/vega4-extension/tdoptions.json +++ b/packages/vega4-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/vega4-extension", "baseUrl": ".", "paths": { diff --git a/packages/vega5-extension/tdoptions.json b/packages/vega5-extension/tdoptions.json index f969b1a04f63..3d71c621a5ce 100644 --- a/packages/vega5-extension/tdoptions.json +++ b/packages/vega5-extension/tdoptions.json @@ -1,14 +1,9 @@ { "excludeNotExported": true, "mode": "file", - "target": "es5", + "target": "es2017", "module": "es5", - "lib": [ - "lib.es2015.d.ts", - "lib.es2015.collection.d.ts", - "lib.es2015.promise.d.ts", - "lib.dom.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/vega5-extension", "baseUrl": ".", "paths": { From cf7dc8b7f05a3a28761e07ac8cdd769e4bb00c04 Mon Sep 17 00:00:00 2001 From: Ian Rose Date: Fri, 12 Jul 2019 17:42:16 -0700 Subject: [PATCH 8/9] Auto-generate a help string for the setting with available viewers and file types. --- packages/docmanager-extension/package.json | 1 + .../docmanager-extension/schema/plugin.json | 1 + packages/docmanager-extension/src/index.ts | 49 +++++++++++++++++-- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/packages/docmanager-extension/package.json b/packages/docmanager-extension/package.json index df718748513e..b52087e6cd7f 100644 --- a/packages/docmanager-extension/package.json +++ b/packages/docmanager-extension/package.json @@ -45,6 +45,7 @@ "@jupyterlab/services": "^4.1.0-alpha.2", "@jupyterlab/statusbar": "^1.1.0-alpha.2", "@phosphor/algorithm": "^1.1.3", + "@phosphor/coreutils": "^1.3.1", "@phosphor/disposable": "^1.2.0", "@phosphor/widgets": "^1.8.0" }, diff --git a/packages/docmanager-extension/schema/plugin.json b/packages/docmanager-extension/schema/plugin.json index f5e4a8c4c93f..bae7f81c7a3d 100644 --- a/packages/docmanager-extension/schema/plugin.json +++ b/packages/docmanager-extension/schema/plugin.json @@ -3,6 +3,7 @@ "description": "Document Manager settings.", "jupyter.lab.setting-icon-class": "jp-FileIcon", "jupyter.lab.setting-icon-label": "Document Manager", + "jupyter.lab.transform": true, "jupyter.lab.shortcuts": [ { "command": "docmanager:save", diff --git a/packages/docmanager-extension/src/index.ts b/packages/docmanager-extension/src/index.ts index 611071f8cc1e..6e0e69e9598a 100644 --- a/packages/docmanager-extension/src/index.ts +++ b/packages/docmanager-extension/src/index.ts @@ -1,10 +1,6 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -import { some, map, each } from '@phosphor/algorithm'; - -import { Widget } from '@phosphor/widgets'; - import { ILabShell, ILabStatus, @@ -37,8 +33,14 @@ import { Contents, Kernel } from '@jupyterlab/services'; import { IStatusBar } from '@jupyterlab/statusbar'; +import { each, map, some, toArray } from '@phosphor/algorithm'; + +import { JSONExt } from '@phosphor/coreutils'; + import { IDisposable } from '@phosphor/disposable'; +import { Widget } from '@phosphor/widgets'; + /** * The command IDs used by the document manager plugin. */ @@ -189,6 +191,45 @@ const docManagerPlugin: JupyterFrontEndPlugin = { console.error(reason.message); }); + // Register a fetch transformer for the settings registry, + // allowing us to dynamically populate a help string with the + // available document viewers and file types for the default + // viewer overrides. + settingRegistry.transform(pluginId, { + fetch: plugin => { + // Get the available file types. + const fileTypes = toArray(registry.fileTypes()) + .map(ft => ft.name) + .join(' \n'); + // Get the available widget factories. + const factories = toArray(registry.widgetFactories()) + .map(f => f.name) + .join(' \n'); + // Generate the help string. + const description = `Overrides for the default viewers for file types. +Specify a mapping from file type name to document viewer name, for example: + +defaultViewers: { + markdown: "Markdown Preview" +} + +If you specify non-existent file types or viewers, or if a viewer cannot +open a given file type, the override will not function. + +Available viewers: +${factories} + +Available file types: +${fileTypes}`; + const schema = JSONExt.deepCopy(plugin.schema); + schema.properties.defaultViewers.description = description; + return { ...plugin, schema }; + } + }); + // If the document registry gains or loses a factory or file type, + // regenerate the settings description with the available options. + registry.changed.connect(() => settingRegistry.reload(pluginId)); + return docManager; } }; From 2c158058bad5e77c1f09aac21b94a87f5b300236 Mon Sep 17 00:00:00 2001 From: "Afshin T. Darian" Date: Thu, 22 Aug 2019 16:47:02 +0100 Subject: [PATCH 9/9] Run linter. --- packages/ui-components/tdoptions.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/ui-components/tdoptions.json b/packages/ui-components/tdoptions.json index a6350b56988b..4b79522bb27b 100644 --- a/packages/ui-components/tdoptions.json +++ b/packages/ui-components/tdoptions.json @@ -3,10 +3,7 @@ "mode": "file", "target": "es2017", "module": "es5", - "lib": [ - "lib.dom.d.ts", - "lib.es2017.d.ts" - ], + "lib": ["lib.dom.d.ts", "lib.es2017.d.ts"], "out": "../../docs/api/ui-components", "baseUrl": ".", "paths": {