Skip to content

Commit

Permalink
Revert "Avoid using import x = require('...')"
Browse files Browse the repository at this point in the history
This reverts commit 7de696a.

Seems to have broken loading vs/nls in at least one case in insiders
  • Loading branch information
mjbvz committed Mar 15, 2018
1 parent a9e52b0 commit 2725683
Show file tree
Hide file tree
Showing 264 changed files with 700 additions and 675 deletions.
8 changes: 4 additions & 4 deletions src/vs/base/browser/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import 'vs/css!./builder';
import { TPromise } from 'vs/base/common/winjs.base';
import * as types from 'vs/base/common/types';
import types = require('vs/base/common/types');
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import * as strings from 'vs/base/common/strings';
import * as assert from 'vs/base/common/assert';
import * as DOM from 'vs/base/browser/dom';
import strings = require('vs/base/common/strings');
import assert = require('vs/base/common/assert');
import DOM = require('vs/base/browser/dom');

/**
* Welcome to the monaco builder. The recommended way to use it is:
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/touch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as arrays from 'vs/base/common/arrays';
import arrays = require('vs/base/common/arrays');
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import * as DomUtils from 'vs/base/browser/dom';
import DomUtils = require('vs/base/browser/dom');
import { memoize } from 'vs/base/common/decorators';

export namespace EventType {
Expand Down
8 changes: 4 additions & 4 deletions src/vs/base/browser/ui/actionbar/actionbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
'use strict';

import 'vs/css!./actionbar';
import * as nls from 'vs/nls';
import * as lifecycle from 'vs/base/common/lifecycle';
import nls = require('vs/nls');
import lifecycle = require('vs/base/common/lifecycle');
import { TPromise } from 'vs/base/common/winjs.base';
import { Builder, $ } from 'vs/base/browser/builder';
import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import { IAction, IActionRunner, Action, IActionChangeEvent, ActionRunner, IRunEvent } from 'vs/base/common/actions';
import * as DOM from 'vs/base/browser/dom';
import * as types from 'vs/base/common/types';
import DOM = require('vs/base/browser/dom');
import types = require('vs/base/common/types');
import { EventType, Gesture } from 'vs/base/browser/touch';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/aria/aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

import 'vs/css!./aria';
import * as nls from 'vs/nls';
import nls = require('vs/nls');
import { isMacintosh } from 'vs/base/common/platform';
import * as dom from 'vs/base/browser/dom';

Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/button/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

import 'vs/css!./button';
import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import { Builder, $ } from 'vs/base/browser/builder';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import 'vs/css!./checkbox';

import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import * as objects from 'vs/base/common/objects';
import { KeyCode } from 'vs/base/common/keyCodes';
import { Widget } from 'vs/base/browser/ui/widget';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/contextview/contextview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import 'vs/css!./contextview';
import { Builder, $ } from 'vs/base/browser/builder';
import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import { IDisposable, dispose } from 'vs/base/common/lifecycle';

export interface IAnchor {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/iconLabel/iconLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
'use strict';

import 'vs/css!./iconlabel';
import * as dom from 'vs/base/browser/dom';
import dom = require('vs/base/browser/dom');
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
import { IMatch } from 'vs/base/common/filters';
import uri from 'vs/base/common/uri';
import * as paths from 'vs/base/common/paths';
import paths = require('vs/base/common/paths');
import { IWorkspaceFolderProvider, getPathLabel, IUserHomeProvider, getBaseLabel } from 'vs/base/common/labels';
import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle';

Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/inputbox/inputBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

import 'vs/css!./inputBox';

import * as nls from 'vs/nls';
import nls = require('vs/nls');
import * as Bal from 'vs/base/browser/browser';
import * as dom from 'vs/base/browser/dom';
import { RenderOptions, renderFormattedText, renderText } from 'vs/base/browser/htmlContentRenderer';
import * as aria from 'vs/base/browser/ui/aria/aria';
import aria = require('vs/base/browser/ui/aria/aria');
import { IAction } from 'vs/base/common/actions';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { IContextViewProvider, AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/octiconLabel/octiconLabel.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as octiconLabel from 'vs/base/browser/ui/octiconLabel/octiconLabel';
import octiconLabel = require('vs/base/browser/ui/octiconLabel/octiconLabel');
import { escape } from 'vs/base/common/strings';

function render(text: string): string {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/progressbar/progressbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import 'vs/css!./progressbar';
import { TPromise, ValueCallback } from 'vs/base/common/winjs.base';
import * as assert from 'vs/base/common/assert';
import assert = require('vs/base/common/assert');
import { Builder, $ } from 'vs/base/browser/builder';
import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { Color } from 'vs/base/common/color';
import { mixin } from 'vs/base/common/objects';
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/sash/sash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle';
import { Builder, $, Dimension } from 'vs/base/browser/builder';
import { isIPad } from 'vs/base/browser/browser';
import { isMacintosh } from 'vs/base/common/platform';
import * as types from 'vs/base/common/types';
import * as DOM from 'vs/base/browser/dom';
import types = require('vs/base/common/types');
import DOM = require('vs/base/browser/dom');
import { EventType, GestureEvent, Gesture } from 'vs/base/browser/touch';
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
import { Event, Emitter } from 'vs/base/common/event';
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/splitview/splitview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import 'vs/css!./splitview';
import { IDisposable, combinedDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { Event, mapEvent, Emitter } from 'vs/base/common/event';
import * as types from 'vs/base/common/types';
import * as dom from 'vs/base/browser/dom';
import types = require('vs/base/common/types');
import dom = require('vs/base/browser/dom');
import { clamp } from 'vs/base/common/numbers';
import { range, firstIndex } from 'vs/base/common/arrays';
import { Sash, Orientation, ISashEvent as IBaseSashEvent } from 'vs/base/browser/ui/sash/sash';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/toolbar/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

import 'vs/css!./toolbar';
import * as nls from 'vs/nls';
import nls = require('vs/nls');
import { TPromise } from 'vs/base/common/winjs.base';
import { Builder, $ } from 'vs/base/browser/builder';
import { Action, IActionRunner, IAction } from 'vs/base/common/actions';
Expand Down
6 changes: 3 additions & 3 deletions src/vs/base/common/errorMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as nls from 'vs/nls';
import * as types from 'vs/base/common/types';
import * as arrays from 'vs/base/common/arrays';
import nls = require('vs/nls');
import types = require('vs/base/common/types');
import arrays = require('vs/base/common/arrays');

function exceptionToErrorMessage(exception: any, verbose: boolean): string {
if (exception.message) {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/common/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as strings from 'vs/base/common/strings';
import strings = require('vs/base/common/strings');
import { LRUCache } from 'vs/base/common/map';
import { CharCode } from 'vs/base/common/charCode';

Expand Down
6 changes: 3 additions & 3 deletions src/vs/base/common/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as arrays from 'vs/base/common/arrays';
import * as strings from 'vs/base/common/strings';
import * as paths from 'vs/base/common/paths';
import arrays = require('vs/base/common/arrays');
import strings = require('vs/base/common/strings');
import paths = require('vs/base/common/paths');
import { LRUCache } from 'vs/base/common/map';
import { CharCode } from 'vs/base/common/charCode';
import { TPromise } from 'vs/base/common/winjs.base';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/common/jsonFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as Json from './json';
import Json = require('./json');

export interface FormattingOptions {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/common/labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

import URI from 'vs/base/common/uri';
import * as platform from 'vs/base/common/platform';
import platform = require('vs/base/common/platform');
import { nativeSep, normalize, isEqualOrParent, isEqual, basename as pathsBasename, join } from 'vs/base/common/paths';
import { endsWith, ltrim } from 'vs/base/common/strings';
import { Schemas } from 'vs/base/common/network';
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/common/mime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as paths from 'vs/base/common/paths';
import * as strings from 'vs/base/common/strings';
import paths = require('vs/base/common/paths');
import strings = require('vs/base/common/strings');
import { match } from 'vs/base/common/glob';

export const MIME_TEXT = 'text/plain';
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/common/severity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as nls from 'vs/nls';
import * as strings from 'vs/base/common/strings';
import nls = require('vs/nls');
import strings = require('vs/base/common/strings');

enum Severity {
Ignore = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'use strict';

import * as sd from 'string_decoder';
import sd = require('string_decoder');
import { CharCode } from 'vs/base/common/charCode';

/**
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/node/encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

'use strict';

import * as stream from 'vs/base/node/stream';
import * as iconv from 'iconv-lite';
import stream = require('vs/base/node/stream');
import iconv = require('iconv-lite');
import { TPromise } from 'vs/base/common/winjs.base';
import { isLinux, isMacintosh } from 'vs/base/common/platform';
import { exec } from 'child_process';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'use strict';

import * as assert from 'assert';
import assert = require('assert');

/**
* Executes the given function (fn) over the given array of items (list) in parallel and returns the resulting errors and results as
Expand Down
6 changes: 3 additions & 3 deletions src/vs/base/node/mime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

'use strict';

import * as mime from 'vs/base/common/mime';
import mime = require('vs/base/common/mime');
import { TPromise } from 'vs/base/common/winjs.base';

import * as stream from 'vs/base/node/stream';
import * as encoding from 'vs/base/node/encoding';
import stream = require('vs/base/node/stream');
import encoding = require('vs/base/node/encoding');

/**
* Lots of binary file types exists where the type can be determined by matching the first few bytes against some "magic patterns".
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/ports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'use strict';

import * as net from 'net';
import net = require('net');

/**
* @returns Returns a random port between 1025 and 65535.
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/node/processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
*--------------------------------------------------------------------------------------------*/
'use strict';

import * as path from 'path';
import path = require('path');
import * as cp from 'child_process';
import { fork } from 'vs/base/node/stdFork';
import * as nls from 'vs/nls';
import nls = require('vs/nls');
import { PPromise, TPromise, TValueCallback, TProgressCallback, ErrorCallback } from 'vs/base/common/winjs.base';
import * as Types from 'vs/base/common/types';
import { IStringDictionary } from 'vs/base/common/collections';
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/node/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import { TPromise } from 'vs/base/common/winjs.base';
import { isBoolean, isNumber } from 'vs/base/common/types';
import * as https from 'https';
import * as http from 'http';
import https = require('https');
import http = require('http');
import { Stream } from 'stream';
import { parse as parseUrl } from 'url';
import { createWriteStream } from 'fs';
Expand Down
8 changes: 4 additions & 4 deletions src/vs/base/node/stdFork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

'use strict';

import * as path from 'path';
import * as os from 'os';
import * as net from 'net';
import * as cp from 'child_process';
import path = require('path');
import os = require('os');
import net = require('net');
import cp = require('child_process');
import uri from 'vs/base/common/uri';

export interface IForkOpts {
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

'use strict';

import * as fs from 'fs';
import fs = require('fs');

import { TPromise } from 'vs/base/common/winjs.base';

Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/node/zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as nls from 'vs/nls';
import nls = require('vs/nls');
import * as path from 'path';
import { createWriteStream } from 'fs';
import { Readable } from 'stream';
Expand Down
6 changes: 3 additions & 3 deletions src/vs/base/parts/quickopen/browser/quickOpenModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

'use strict';

import * as nls from 'vs/nls';
import nls = require('vs/nls');
import { TPromise } from 'vs/base/common/winjs.base';
import * as types from 'vs/base/common/types';
import types = require('vs/base/common/types');
import URI from 'vs/base/common/uri';
import { ITree, IActionProvider } from 'vs/base/parts/tree/browser/tree';
import { IconLabel, IIconLabelValueOptions } from 'vs/base/browser/ui/iconLabel/iconLabel';
Expand All @@ -16,7 +16,7 @@ import { Action, IAction, IActionRunner } from 'vs/base/common/actions';
import { compareAnything } from 'vs/base/common/comparers';
import { ActionBar, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import { IQuickOpenStyles } from 'vs/base/parts/quickopen/browser/quickOpenWidget';
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
import { OS } from 'vs/base/common/platform';
Expand Down
10 changes: 5 additions & 5 deletions src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
'use strict';

import 'vs/css!./quickopen';
import * as nls from 'vs/nls';
import nls = require('vs/nls');
import { TPromise } from 'vs/base/common/winjs.base';
import * as platform from 'vs/base/common/platform';
import * as types from 'vs/base/common/types';
import * as errors from 'vs/base/common/errors';
import platform = require('vs/base/common/platform');
import types = require('vs/base/common/types');
import errors = require('vs/base/common/errors');
import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode, IKeyMods } from 'vs/base/parts/quickopen/common/quickOpen';
import { Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider } from 'vs/base/parts/quickopen/browser/quickOpenViewer';
import { Dimension, Builder, $ } from 'vs/base/browser/builder';
Expand All @@ -20,7 +20,7 @@ import { Tree } from 'vs/base/parts/tree/browser/treeImpl';
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { DefaultController, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults';
import * as DOM from 'vs/base/browser/dom';
import DOM = require('vs/base/browser/dom');
import { KeyCode } from 'vs/base/common/keyCodes';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
Expand Down
Loading

0 comments on commit 2725683

Please sign in to comment.