Skip to content

Commit

Permalink
update dependencies, prepare 0.0.44 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli authored Jun 2, 2023
1 parent 0af5b4e commit e0b883b
Show file tree
Hide file tree
Showing 8 changed files with 599 additions and 554 deletions.
8 changes: 4 additions & 4 deletions fs-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
},
"devDependencies": {
"@types/vscode": "^1.72.0",
"@types/webpack-env": "^1.18.0",
"ts-loader": "^9.4.2",
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1",
"@types/webpack-env": "^1.18.1",
"ts-loader": "^9.4.3",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.1",
"process": "^0.11.10",
"path-browserify": "^1.0.1",
"request-light": "^0.7.0",
Expand Down
430 changes: 226 additions & 204 deletions fs-provider/yarn.lock

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vscode/test-web",
"version": "0.0.43",
"version": "0.0.44",
"scripts": {
"install-extensions": "yarn --cwd=fs-provider && yarn --cwd=sample",
"compile": "tsc -p ./ && yarn compile-fs-provider",
Expand Down Expand Up @@ -30,11 +30,10 @@
"koa-mount": "^4.0.0",
"koa-static": "^5.0.0",
"minimist": "^1.2.8",
"playwright": "^1.33.0",
"playwright": "^1.34.3",
"vscode-uri": "^3.0.7",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"get-stream": "6.0.1",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.0",
"tar-fs": "^2.1.1",
"gunzip-maybe": "^1.4.2"
},
Expand All @@ -48,11 +47,11 @@
"@types/node": "16.x",
"@types/gunzip-maybe": "^1.4.0",
"@types/tar-fs": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"eslint": "^8.39.0",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"eslint": "^8.41.0",
"eslint-plugin-header": "^3.1.1",
"typescript": "^5.0.4"
"typescript": "^5.1.3"
},
"license": "MIT",
"author": "Visual Studio Code Team",
Expand Down
10 changes: 5 additions & 5 deletions sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"@types/vscode": "^1.72.0",
"@types/mocha": "10.0.1",
"mocha": "^10.2.0",
"typescript": "^5.0.2",
"ts-loader": "^9.4.2",
"webpack": "^5.76.3",
"webpack-cli": "^5.0.1",
"@types/webpack-env": "^1.18.0",
"typescript": "^5.1.3",
"ts-loader": "^9.4.3",
"webpack": "^5.85.0",
"webpack-cli": "^5.1.1",
"@types/webpack-env": "^1.18.1",
"assert": "^2.0.0",
"process": "^0.11.10"
}
Expand Down
434 changes: 233 additions & 201 deletions sample/yarn.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import * as morgan from 'koa-morgan';
import * as kstatic from 'koa-static';
import * as kmount from 'koa-mount';
import * as cors from '@koa/cors';
import * as getstream from 'get-stream';
import { basename, join } from 'path';
import { IConfig } from './main';
import workbench from './workbench';
Expand Down Expand Up @@ -70,7 +69,12 @@ export default async function createApp(config: IConfig): Promise<Koa> {
await next();
if (ctx.status === 200 && ctx.path.match(/\/(dev)?extensions\/.*\.js\.map$/) && ctx.body instanceof ReadStream) {
// we know it's a ReadStream as that's what kstatic uses
ctx.response.body = `{"version":3,"file":"${basename(ctx.path)}","sections":[{"offset":{"line":2,"column":0},"map":${await getstream(ctx.body)} }]}`;
const chunks: Buffer[] = [];
for await (const chunk of ctx.body) {
chunks.push(Buffer.from(chunk));
}
const bodyContent = Buffer.concat(chunks).toString("utf-8");
ctx.response.body = `{"version":3,"file":"${basename(ctx.path)}","sections":[{"offset":{"line":2,"column":0},"map":${bodyContent} }]}`;
}
});

Expand Down
16 changes: 8 additions & 8 deletions src/server/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import * as path from 'path';

import * as https from 'https';
import * as http from 'http';
import * as createHttpsProxyAgent from 'https-proxy-agent';
import * as createHttpProxyAgent from 'http-proxy-agent';
import { HttpsProxyAgent } from 'https-proxy-agent';
import { HttpProxyAgent } from 'http-proxy-agent';
import { URL } from 'url';

import { Static } from './main';
Expand All @@ -26,7 +26,7 @@ async function getLatestVersion(quality: 'stable' | 'insider'): Promise<Download

const reset = '\x1b[G\x1b[0K';

async function downloadAndUntar(downloadUrl: string, destination: string, message: string) : Promise<void> {
async function downloadAndUntar(downloadUrl: string, destination: string, message: string): Promise<void> {
process.stdout.write(message);

if (!existsSync(destination)) {
Expand Down Expand Up @@ -135,15 +135,15 @@ export async function fetchJSON<T>(api: string): Promise<T> {
}
}

let PROXY_AGENT: createHttpProxyAgent.HttpProxyAgent | undefined = undefined;
let HTTPS_PROXY_AGENT: createHttpsProxyAgent.HttpsProxyAgent | undefined = undefined;
let PROXY_AGENT: HttpProxyAgent<string> | undefined = undefined;
let HTTPS_PROXY_AGENT: HttpsProxyAgent<string> | undefined = undefined;

if (process.env.npm_config_proxy) {
PROXY_AGENT = createHttpProxyAgent(process.env.npm_config_proxy);
HTTPS_PROXY_AGENT = createHttpsProxyAgent(process.env.npm_config_proxy);
PROXY_AGENT = new HttpProxyAgent(process.env.npm_config_proxy);
HTTPS_PROXY_AGENT = new HttpsProxyAgent(process.env.npm_config_proxy);
}
if (process.env.npm_config_https_proxy) {
HTTPS_PROXY_AGENT = createHttpsProxyAgent(process.env.npm_config_https_proxy);
HTTPS_PROXY_AGENT = new HttpsProxyAgent(process.env.npm_config_https_proxy);
}

function getAgent(url: string): https.RequestOptions {
Expand Down
Loading

0 comments on commit e0b883b

Please sign in to comment.