Skip to content

Commit

Permalink
chore: upgrade vscode to 1.70.1 (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
conwnet authored Aug 12, 2022
1 parent 4be2e68 commit 57c5972
Show file tree
Hide file tree
Showing 20 changed files with 1,026 additions and 630 deletions.
13 changes: 7 additions & 6 deletions api/vscode-unpkg/index.js → api/vscode-unpkg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* @author netcon
*/

const got = require('got');
const url = require('url');
import got from 'got';
import * as url from 'url';
import type { VercelRequest, VercelResponse } from '@vercel/node';

module.exports = async (req, res) => {
const pathname = new url.parse(req.url || '').pathname || '';
module.exports = async (req: VercelRequest, res: VercelResponse) => {
const pathname = url.parse(req.url || '').pathname || '';
const matches = pathname.match(/^\/api\/vscode-unpkg\/([^/]+)\/(.*)/);

if (!matches) {
Expand All @@ -19,12 +20,12 @@ module.exports = async (req, res) => {
const restPartsPath = matches[2];
const requestUrl = `https://${publisher}.vscode-unpkg.net/${publisher}/${restPartsPath}`;
const response = await got(requestUrl).catch((error) => {
return error.response || { statusCode: 500, headers: {}, body: error.message };
return error.response || { statusCode: 500, headers: {}, rawBody: Buffer.from(error.message) };
});

res.status(response.statusCode);
['cache-control', 'content-type'].forEach((headerKey) => {
response.headers[headerKey] && res.setHeader(headerKey, response.headers[headerKey]);
});
return res.send(response.body);
return res.send(response.rawBody);
};
3 changes: 3 additions & 0 deletions api/vscode-unpkg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"private": true,
"dependencies": {
"got": "^11.8.5"
},
"devDependencies": {
"@vercel/node": "^2.5.7"
}
}
561 changes: 561 additions & 0 deletions api/vscode-unpkg/yarn.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions extensions/github1s/assets/pages/github1s-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const TokenDetailPage = ({ token, onEditClick, ...props }) => {
return postMessage('validate-token', token).then((tokenStatus) => {
setValidating(false);
setTokenStatus(tokenStatus);
return tokenStatus;
});
}, []);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lib": "lib"
},
"devDependencies": {
"@github1s/vscode-web": "0.4.1",
"@github1s/vscode-web": "0.5.0",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"chokidar": "^3.5.3",
Expand Down
13 changes: 12 additions & 1 deletion resources/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
'*.sourcegraph.com',
'*.gitpod.io',
],
extensionEnabledApiProposals: { 'ms-vscode.anycode': ['extensionsAny'] },
};
/*** end config block ***/

Expand Down Expand Up @@ -182,7 +183,7 @@

window.vscodeWeb = {
windowIndicator: { label: repository, command: 'github1s.commands.openRepository' },
additionalBuiltinExtensions: [],
additionalBuiltinExtensions: ['ms-vscode.anycode'],
webviewEndpoint: staticAssetsPrefix + '/vscode/vs/workbench/contrib/webview/browser/pre',
webWorkerExtensionHostIframeSrc:
staticAssetsPrefix + '/vscode/vs/workbench/services/extensions/worker/httpWebWorkerExtensionHostIframe.html',
Expand Down Expand Up @@ -216,6 +217,16 @@
'workbench.colorTheme': 'Default Dark+',
'telemetry.telemetryLevel': 'off',
'workbench.startupEditor': 'readme',
'anycode.language.features': {
completions: false,
definitions: false,
references: false,
highlights: true,
outline: true,
workspaceSymbols: true,
folding: false,
diagnostics: false,
},
},
builtinExtensions: window.github1sExtensions || [],
folderUri: { scheme: scheme, authority: '', path: '/' },
Expand Down
2 changes: 1 addition & 1 deletion vscode-web/.VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.68.1
1.70.1
9 changes: 4 additions & 5 deletions vscode-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@github1s/vscode-web",
"version": "0.4.1",
"version": "0.5.0",
"description": "VS Code web for GitHub1s",
"author": "github1s",
"license": "MIT",
Expand Down Expand Up @@ -28,17 +28,16 @@
"github1s"
],
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/vscode-languagedetection": "1.0.21",
"jschardet": "3.0.0",
"tas-client-umd": "0.1.6",
"vscode-oniguruma": "1.6.1",
"vscode-textmate": "7.0.1",
"xterm": "4.19.0-beta.58",
"xterm-addon-search": "0.9.0-beta.39",
"xterm": "4.20.0-beta.20",
"xterm-addon-search": "0.10.0-beta.3",
"xterm-addon-unicode11": "0.4.0-beta.3",
"xterm-addon-webgl": "0.12.0-beta.37"
"xterm-addon-webgl": "0.13.0-beta.9"
},
"devDependencies": {
"@types/trusted-types": "^2.0.0",
Expand Down
Loading

0 comments on commit 57c5972

Please sign in to comment.