mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Converting some require imports to import from imports
This ensures we pick up the correct typings for these imports
This commit is contained in:
+3
-3
@@ -3,9 +3,9 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import fs = require('fs');
|
||||
import path = require('path');
|
||||
import vm = require('vm');
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as vm from 'vm';
|
||||
|
||||
interface IPosition {
|
||||
line: number;
|
||||
|
||||
+3
-3
@@ -13,8 +13,8 @@ var xml2js = require("xml2js");
|
||||
var glob = require("glob");
|
||||
var https = require("https");
|
||||
var gulp = require("gulp");
|
||||
var util = require('gulp-util');
|
||||
var iconv = require('iconv-lite');
|
||||
var util = require("gulp-util");
|
||||
var iconv = require("iconv-lite");
|
||||
var NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
||||
function log(message) {
|
||||
var rest = [];
|
||||
@@ -1192,7 +1192,7 @@ function createIslFile(originalFilePath, messages, language, innoSetup) {
|
||||
var filePath = basename + "." + language.id + ".isl";
|
||||
return new File({
|
||||
path: filePath,
|
||||
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8'), innoSetup.codePage)
|
||||
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage)
|
||||
});
|
||||
}
|
||||
function encodeEntities(value) {
|
||||
|
||||
+4
-4
@@ -7,15 +7,15 @@ import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
import { through, readable, ThroughStream } from 'event-stream';
|
||||
import File = require('vinyl');
|
||||
import * as File from 'vinyl';
|
||||
import * as Is from 'is';
|
||||
import * as xml2js from 'xml2js';
|
||||
import * as glob from 'glob';
|
||||
import * as https from 'https';
|
||||
import * as gulp from 'gulp';
|
||||
|
||||
var util = require('gulp-util');
|
||||
var iconv = require('iconv-lite');
|
||||
import * as util from 'gulp-util';
|
||||
import * as iconv from 'iconv-lite';
|
||||
|
||||
const NUMBER_OF_CONCURRENT_DOWNLOADS = 4;
|
||||
|
||||
@@ -1331,7 +1331,7 @@ function createIslFile(originalFilePath: string, messages: Map<string>, language
|
||||
|
||||
return new File({
|
||||
path: filePath,
|
||||
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8'), innoSetup.codePage)
|
||||
contents: iconv.encode(Buffer.from(content.join('\r\n'), 'utf8').toString(), innoSetup.codePage)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -6,10 +6,10 @@
|
||||
import * as ts from 'typescript';
|
||||
import * as lazy from 'lazy.js';
|
||||
import { duplex, through } from 'event-stream';
|
||||
import File = require('vinyl');
|
||||
import * as File from 'vinyl';
|
||||
import * as sm from 'source-map';
|
||||
import assign = require('object-assign');
|
||||
import path = require('path');
|
||||
import * as path from 'path';
|
||||
|
||||
declare class FileSourceMap extends File {
|
||||
public sourceMap: sm.RawSourceMap;
|
||||
|
||||
+1
-1
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var fs = require("fs");
|
||||
var ts = require("typescript");
|
||||
var path = require("path");
|
||||
var util = require("gulp-util");
|
||||
var tsfmt = require('../../tsfmt.json');
|
||||
var util = require('gulp-util');
|
||||
function log(message) {
|
||||
var rest = [];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
|
||||
+5
-4
@@ -3,12 +3,13 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import fs = require('fs');
|
||||
import ts = require('typescript');
|
||||
import path = require('path');
|
||||
import * as fs from 'fs';
|
||||
import * as ts from 'typescript';
|
||||
import * as path from 'path';
|
||||
import * as util from 'gulp-util';
|
||||
|
||||
const tsfmt = require('../../tsfmt.json');
|
||||
|
||||
var util = require('gulp-util');
|
||||
function log(message: any, ...rest: any[]): void {
|
||||
util.log(util.colors.cyan('[monaco.d.ts]'), message, ...rest);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const cp = require('child_process');
|
||||
import * as cp from 'child_process';
|
||||
|
||||
function yarnInstall(package: string): void {
|
||||
cp.execSync(`yarn add --no-lockfile ${package}`);
|
||||
function yarnInstall(packageName: string): void {
|
||||
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
||||
}
|
||||
|
||||
const product = require('../../../product.json');
|
||||
|
||||
Reference in New Issue
Block a user