Skip to content

Commit 9bff83a

Browse files
committed
Update dependencies
1 parent cf46dde commit 9bff83a

18 files changed

+1468
-2861
lines changed

package-lock.json

+1,391-2,721
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+28-42
Original file line numberDiff line numberDiff line change
@@ -63,80 +63,66 @@
6363
},
6464
"dependencies": {
6565
"async-file": "2.0.2",
66-
"fs-extra": "7.0.1",
67-
"http-proxy-agent": "2.1.0",
68-
"https-proxy-agent": "^3.0.1",
66+
"fs-extra": "9.1.0",
67+
"http-proxy-agent": "4.0.1",
68+
"https-proxy-agent": "5.0.0",
6969
"jsonc-parser": "3.0.0",
7070
"microsoft.aspnetcore.razor.vscode": "https://download.visualstudio.microsoft.com/download/pr/92748a92-32fe-4cf9-b6c2-e3d0edacf90d/d2dce097206432dfa3e47d9b09e58c93/microsoft.aspnetcore.razor.vscode-6.0.0-alpha.1.21201.19.tgz",
71-
"mkdirp": "^1.0.3",
72-
"node-filter-async": "1.1.1",
7371
"node-machine-id": "1.1.12",
74-
"remove-bom-buffer": "3.0.0",
75-
"request-light": "0.2.4",
76-
"rxjs": "6.4.0",
72+
"request-light": "0.4.0",
73+
"rxjs": "6.6.7",
7774
"semver": "5.6.0",
7875
"stream": "0.0.2",
79-
"strip-bom": "3.0.0",
76+
"strip-bom": "5.0.0",
77+
"strip-bom-buf": "2.0.0",
8078
"tmp": "0.0.33",
8179
"vscode-debugprotocol": "1.33.0",
8280
"vscode-extension-telemetry": "0.1.6",
8381
"vscode-languageserver-protocol": "3.16.0",
8482
"yauzl": "2.10.0"
8583
},
8684
"devDependencies": {
87-
"@types/archiver": "2.1.2",
88-
"@types/chai": "4.1.7",
89-
"@types/chai-arrays": "1.0.2",
90-
"@types/chai-as-promised": "7.1.0",
91-
"@types/chai-string": "1.4.1",
85+
"@types/archiver": "5.1.0",
86+
"@types/chai": "4.2.16",
87+
"@types/chai-arrays": "2.0.0",
88+
"@types/chai-as-promised": "7.1.3",
89+
"@types/chai-string": "1.4.2",
9290
"@types/del": "3.0.1",
9391
"@types/fs-extra": "5.0.4",
9492
"@types/gulp": "4.0.5",
95-
"@types/gulp-mocha": "0.0.32",
96-
"@types/minimist": "1.2.0",
97-
"@types/mkdirp": "0.5.2",
93+
"@types/minimist": "1.2.1",
9894
"@types/mocha": "5.2.5",
9995
"@types/node": "10.12.24",
10096
"@types/semver": "5.5.0",
10197
"@types/tmp": "0.0.33",
10298
"@types/unzipper": "^0.9.1",
10399
"@types/yauzl": "2.9.1",
104-
"archiver": "3.0.0",
105-
"async-child-process": "1.1.1",
106-
"async-shelljs": "0.1.2",
107-
"chai": "4.2.0",
108-
"chai-arrays": "2.0.0",
100+
"archiver": "5.3.0",
101+
"chai": "4.3.4",
102+
"chai-arrays": "2.2.0",
109103
"chai-as-promised": "7.1.1",
110104
"chai-fs": "2.0.0",
111105
"chai-string": "1.5.0",
112-
"copyfiles": "^2.3.0",
113-
"cross-env": "5.2.0",
114106
"del": "3.0.0",
115-
"find-versions": "3.0.0",
116-
"get-port": "4.1.0",
117-
"glob-promise": "3.4.0",
118-
"gulp": "4.0.0",
119-
"gulp-mocha": "6.0.0",
120-
"gulp-tslint": "8.1.3",
121-
"ltcdr": "2.2.1",
122-
"mocha": "^8.1.1",
123-
"mocha-typescript": "1.1.17",
124-
"mock-fs": "4.8.0",
107+
"find-versions": "4.0.0",
108+
"get-port": "5.1.1",
109+
"glob-promise": "4.1.0",
110+
"gulp": "4.0.2",
111+
"gulp-tslint": "8.1.4",
112+
"mocha": "8.3.2",
113+
"mock-fs": "4.13.0",
125114
"mock-http-server": "1.4.2",
126-
"natives": "1.1.6",
127115
"npm-run-all": "4.1.5",
128-
"plist": "3.0.1",
129-
"source-map-support": "0.5.10",
130-
"ts-loader": "5.3.3",
131-
"ts-node": "8.0.2",
116+
"ts-loader": "9.0.0",
117+
"ts-node": "9.1.1",
132118
"tslint": "5.12.1",
133119
"tslint-microsoft-contrib": "6.0.0",
134120
"tslint-no-unused-expression-chai": "0.1.4",
135-
"typescript": "^3.8.3",
136-
"unzipper": "0.9.10",
121+
"typescript": "4.2.4",
122+
"unzipper": "0.10.11",
137123
"vsce": "1.57.0",
138124
"vscode": "1.1.37",
139-
"webpack": "5.30.0",
125+
"webpack": "5.34.0",
140126
"webpack-cli": "4.6.0"
141127
},
142128
"runtimeDependencies": [

src/common.ts

+15
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ export function sum<T>(arr: T[], selector: (item: T) => number): number {
3131
return arr.reduce((prev, curr) => prev + selector(curr), 0);
3232
}
3333

34+
export async function mapAsync<T1, T2>(
35+
array: T1[],
36+
selector: (value: T1, index: number, array: T1[]) => Promise<T2>,
37+
): Promise<T2[]> {
38+
return Promise.all(array.map(selector));
39+
}
40+
41+
export async function filterAsync<T>(
42+
array: T[],
43+
predicate: (value: T, index: number, array: T[]) => Promise<boolean>,
44+
): Promise<T[]> {
45+
const filterMap = await mapAsync(array, predicate);
46+
return array.filter((_, index) => filterMap[index]);
47+
}
48+
3449
/** Retrieve the length of an array. Returns 0 if the array is `undefined`. */
3550
export function safeLength<T>(arr: T[] | undefined) {
3651
return arr ? arr.length : 0;

src/packageManager/PackageFilterer.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import * as util from '../common';
88
import { PackageError } from "./PackageError";
99
import { AbsolutePathPackage } from "./AbsolutePathPackage";
1010

11-
const { filterAsync } = require('node-filter-async');
12-
1311
export async function getNotInstalledPackagesForPlatform(packages: AbsolutePathPackage[], platformInfo: PlatformInformation): Promise<AbsolutePathPackage[]> {
1412
let platformPackages = filterPlatformPackages(packages, platformInfo);
1513
return filterAlreadyInstalledPackages(platformPackages);
@@ -35,7 +33,7 @@ export function filterPlatformPackages(packages: AbsolutePathPackage[], platform
3533
}
3634

3735
async function filterAlreadyInstalledPackages(packages: AbsolutePathPackage[]): Promise<AbsolutePathPackage[]> {
38-
return filterAsync(packages, async (pkg: AbsolutePathPackage) => {
36+
return util.filterAsync(packages, async (pkg: AbsolutePathPackage) => {
3937
//If the install.Lock file is present for this package then do not install it again
4038
let testPath = util.getInstallFilePath(pkg.installPath, util.InstallFileType.Lock);
4139
if (!testPath) {

src/packageManager/proxy.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
import { Url, parse as parseUrl } from 'url';
77
import { isBoolean } from '../common';
8-
const HttpProxyAgent = require('http-proxy-agent');
9-
const HttpsProxyAgent = require('https-proxy-agent');
8+
import HttpProxyAgent = require('http-proxy-agent');
9+
import HttpsProxyAgent = require('https-proxy-agent');
10+
import { Agent } from 'http';
1011

1112
function getSystemProxyURL(requestURL: Url): string {
1213
if (requestURL.protocol === 'http:') {
@@ -18,7 +19,7 @@ function getSystemProxyURL(requestURL: Url): string {
1819
return null;
1920
}
2021

21-
export function getProxyAgent(requestURL: Url, proxy: string, strictSSL: boolean): any {
22+
export function getProxyAgent(requestURL: Url, proxy: string, strictSSL: boolean): Agent {
2223
const proxyURL = proxy || getSystemProxyURL(requestURL);
2324

2425
if (!proxyURL) {
@@ -38,5 +39,5 @@ export function getProxyAgent(requestURL: Url, proxy: string, strictSSL: boolean
3839
rejectUnauthorized: isBoolean(strictSSL) ? strictSSL : true
3940
};
4041

41-
return requestURL.protocol === 'http:' ? new HttpProxyAgent(opts) : new HttpsProxyAgent(opts);
42+
return requestURL.protocol === 'http:' ? HttpProxyAgent(opts) : HttpsProxyAgent(opts);
4243
}

src/tools/UpdatePackageDependencies.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as Event from "../omnisharp/loggingEvents";
1212
import NetworkSettings, { NetworkSettingsProvider } from '../NetworkSettings';
1313
import { getBufferIntegrityHash } from '../packageManager/isValidDownload';
1414
import { EventType } from '../omnisharp/EventType';
15-
const findVersions = require('find-versions');
15+
import findVersions = require('find-versions');
1616

1717
interface PackageJSONFile {
1818
runtimeDependencies: Package[];

src/utils/removeBOM.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
const removeBomBuffer = require("remove-bom-buffer");
7-
const removeBomString = require("strip-bom");
6+
import removeBomBuffer = require("strip-bom-buf");
7+
import removeBomString from "strip-bom";
88

99
export function removeBOMFromBuffer(buffer: Buffer): Buffer {
1010
return <Buffer>removeBomBuffer(buffer);

tasks/projectPaths.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const onlineVscodeignorePath = path.join(rootPath, 'release.vscodeignore'
1414

1515
export const nodeModulesPath = path.join(rootPath, 'node_modules');
1616
export const vscePath = path.join(nodeModulesPath, 'vsce', 'out', 'vsce');
17+
export const mochaPath = path.join(nodeModulesPath, 'mocha', 'bin', 'mocha');
1718
export const vscodeTestHostPath = path.join(nodeModulesPath, 'vscode', 'bin', 'test');
1819

1920
export const packageJsonPath = path.join(rootPath, "package.json");

tasks/spawnNode.ts

+7-12
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,29 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
8-
import { SpawnOptions, spawn } from "child_process";
6+
import { spawnSync, SpawnSyncOptions } from "child_process";
97
import { nodePath, rootPath } from "./projectPaths";
10-
const { join } = require("async-child-process");
118

12-
export default async function spawnNode(args?: string[], options?: SpawnOptions): Promise<{ code: string; signal: string; }> {
9+
export default async function spawnNode(args?: string[], options?: SpawnSyncOptions) {
1310
if (!options) {
1411
options = {
1512
env: {}
1613
};
1714
}
1815

19-
let optionsWithFullEnvironment = {
16+
const optionsWithFullEnvironment: SpawnSyncOptions = {
2017
cwd: rootPath,
2118
...options,
2219
env: {
2320
...process.env,
2421
...options.env
25-
}
22+
},
23+
stdio: "inherit"
2624
};
2725

2826
console.log(`starting ${nodePath} ${args.join(' ')}`);
2927

30-
let spawned = spawn(nodePath, args, optionsWithFullEnvironment);
31-
32-
spawned.stderr.pipe(process.stdout);
33-
spawned.stdout.pipe(process.stdout);
28+
const buffer = spawnSync(nodePath, args, optionsWithFullEnvironment);
3429

35-
return join(spawned);
30+
return { code: buffer.status, signal: buffer.signal };
3631
}

tasks/testTasks.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
7-
86
import * as gulp from 'gulp';
9-
import * as mocha from 'gulp-mocha';
107
import * as path from 'path';
11-
import { codeExtensionPath, rootPath, testAssetsRootPath, testRootPath, vscodeTestHostPath } from './projectPaths';
8+
import { codeExtensionPath, mochaPath, rootPath, testAssetsRootPath, testRootPath, vscodeTestHostPath } from './projectPaths';
129
import spawnNode from './spawnNode';
1310

1411
gulp.task("test:feature", async () => {
@@ -24,8 +21,13 @@ gulp.task("test:feature", async () => {
2421
});
2522

2623
gulp.task("test:unit", async () => {
27-
return gulp.src('test/unitTests/**/*.test.ts', { read: false })
28-
.pipe(mocha({ ui: 'tdd', useColors: true }));
24+
return spawnNode([
25+
mochaPath,
26+
'--ui',
27+
'tdd',
28+
'-c',
29+
'test/unitTests/**/*.test.ts'
30+
]);
2931
});
3032

3133
gulp.task("test:integration:singleCsproj", async () => {

test/integrationTests/launchConfiguration.integration.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ suite(`Tasks generation: ${testAssetWorkspace.description}`, function () {
4747
let result = await vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], ".NET Core Launch (console)");
4848
expect(result, "Debugger could not be started.");
4949

50-
let debugSessionTerminated = new Promise(resolve => {
50+
let debugSessionTerminated = new Promise<void>(resolve => {
5151
const onTerminateSubscription = vscode.debug.onDidTerminateDebugSession((e) => {
5252
onTerminateSubscription.dispose();
5353
resolve();

test/integrationTests/testAssets/spawnGit.ts

+5-11
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,24 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
'use strict';
6+
import { SpawnSyncOptions, spawnSync } from "child_process";
77

8-
import { SpawnOptions, spawn } from "child_process";
9-
import { join, Result } from "async-child-process";
10-
11-
export default async function spawnGit(args?: string[], options?: SpawnOptions): Promise<Result> {
8+
export default async function spawnGit(args?: string[], options?: SpawnSyncOptions) {
129
if (!options) {
1310
options = {
1411
env: {}
1512
};
1613
}
1714

18-
let optionsWithFullEnvironment = {
15+
let optionsWithFullEnvironment: SpawnSyncOptions = {
1916
...options,
2017
env: {
2118
...process.env,
2219
...options.env
2320
}
2421
};
2522

26-
let spawned = spawn('git', args, optionsWithFullEnvironment);
27-
28-
//spawned.stdout.on('data', (data) => console.log(data.toString()));
29-
//spawned.stderr.on('data', (data) => console.log(data.toString()));
23+
const buffer = spawnSync('git', args, optionsWithFullEnvironment);
3024

31-
return join(spawned);
25+
return { code: buffer.status, signal: buffer.signal };
3226
}

test/unitTests/OptionObserver/OptionChangeObserver.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ suite("OmniSharpConfigChangeObserver", () => {
108108
};
109109

110110
doClickOk = () => {
111-
resolve(...items);
111+
resolve(items[0]);
112112
};
113113
});
114114
};

test/unitTests/common.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ suite("Common", () => {
1717
let array: number[] = [];
1818
let items = [1, 2, 3, 4, 5];
1919

20-
let promise = buildPromiseChain(items, async n => new Promise((resolve, reject) => {
20+
let promise = buildPromiseChain(items, async n => new Promise<void>((resolve, reject) => {
2121
array.push(n);
2222
resolve();
2323
}));

test/unitTests/logging/InformationMessageObserver.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ suite("InformationMessageObserver", () => {
9292
};
9393

9494
doClickOk = () => {
95-
resolve(...items);
95+
resolve(items[0]);
9696
};
9797
});
9898
};

typings/async-child-process.d.ts

-11
This file was deleted.

typings/http-proxy-agent/http-proxy-agent.d.ts

-20
This file was deleted.

0 commit comments

Comments
 (0)