Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vscode): update to version 1.57.0 #3544

Merged
merged 51 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
bb14cfe
Squashed 'lib/vscode/' changes from cfa2e218100..2064d4c301c
Jun 4, 2021
92e6bb1
chore(vscode): update to 1.57.0
Jun 4, 2021
d7cc072
chore(deps): fixup lockfiles
Jun 8, 2021
8c72047
chore: restore .gitignore
Jun 8, 2021
ea4705b
fix(vscode): redo extra extension paths
Jun 8, 2021
943504b
fix(vscode): add setSocket to PersistentProtocol
Jun 8, 2021
8c05721
fix(vscode): restore server files
Jun 8, 2021
ddf2616
fix(vscode): restore typings
Jun 10, 2021
a02b0ad
fix(vscode): restore proxy_agent.ts symlink
Jun 10, 2021
9f524bd
fix(vscode): use ptyHost.getEnv
Jun 10, 2021
b88ce55
fix(vscode): uriTransformer refactoring
Jun 10, 2021
c9a28aa
fix(vscode): add new terminal listener
Jun 10, 2021
f993944
fix(vscode): fix + enable layering lint
Jun 10, 2021
8c3c30a
chore: format file
Jun 10, 2021
41a72f1
Squashed 'lib/vscode/' changes from 2064d4c301c..b4c1bd0a9b0
Jun 10, 2021
0c818a6
Merge commit '41a72f14e8a1f0f7a9d9c7fbf4c24d89f087c733' into vscode-1.57
Jun 10, 2021
a4f9ff0
fix(lib/vscode): restore product.json
Jun 10, 2021
a07260f
fix(vscode): backport resources hotfix
Jun 10, 2021
e41351e
Merge branch 'main' into vscode-1.57
Jun 10, 2021
1aaea7e
refactor(lib/vscode): reorganize code to fit vs rules
Jun 14, 2021
42794e3
fix(ci): remove stray symlinks
Jun 14, 2021
280d609
cleanup(lib/vscode): format .gitignore
Jun 14, 2021
b5af44e
chore(vscode): fix formatting
Jun 14, 2021
5429bc1
refactor(vscode): remove parsePathArg in envService
Jun 14, 2021
62801c8
fix(vscode): add missing terminal commands
Jun 14, 2021
180fbfc
fix(vscode): update .eslintignore paths
Jun 14, 2021
ef29d56
chore: document uriTransformer hacks
Jun 14, 2021
863cf60
fix(lib/vscode): restore patches
Jun 15, 2021
3558f5d
fix(lib/vscode): restore more patches
Jun 21, 2021
5fd98a5
Squashed 'lib/vscode/' changes from b4c1bd0a9b0..507ce72a446
Jun 21, 2021
6a62fe8
Merge commit '5fd98a52efbbbd7ca28922fdc9c7282d9bf1ec3d' into vscode-1.57
Jun 21, 2021
60673bd
fmt(docs): remove trailing whitespace
Jun 21, 2021
4271b60
fix(test): fix e2e tests
Jun 22, 2021
49e9fdd
chore(deps): update vulnerable vscode deps
Jun 22, 2021
55dc16b
fix(test): clean up terminal test
Jun 22, 2021
b5f408f
Merge branch 'main' into vscode-1.57
Jun 29, 2021
4b418f5
Retry menu navigation in e2e tests
code-asher Jun 29, 2021
7c9b1f0
Update VS Code loader with trusted types policy
code-asher Jul 1, 2021
6987dd3
Update build resources with renamed file
code-asher Jul 1, 2021
47d8866
Restore proposed API patch
code-asher Jun 22, 2021
9e46573
Restore async storage write patch
code-asher Jun 22, 2021
d8a1f7d
Remove duplicate telemetry service registration
code-asher Jun 22, 2021
a445588
Use service in terminal channel instead of interface
code-asher Jun 22, 2021
23594b2
Rename uri transformer using camel case
code-asher Jun 22, 2021
3c95888
Update yarn.lock
code-asher Jun 21, 2021
b0e9eff
Restore .yarnrc patch
code-asher Jun 21, 2021
7e3bb46
Remove gulp-tar dependency
code-asher Jul 1, 2021
5e8fe4e
Cancel current menu navigation on retry
code-asher Jul 2, 2021
476fcf3
chore(docs): update docs with patches
Jul 10, 2021
ed9c59d
Merge branch 'main' into vscode-1.57
Jul 13, 2021
df85813
chore(ci): increase timeout to 15 minutes
Jul 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/vscode/src/vs/platform/environment/common/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export interface NativeParsedArgs {
'extensions-dir'?: string;
'extensions-download-dir'?: string;
'builtin-extensions-dir'?: string;
'extra-extensions-dir'?: string[]; // NOTE@coder: added extra extensions dir
'extra-builtin-extensions-dir'?: string[]; // NOTE@coder: added extra builtin extensions dir
extensionDevelopmentPath?: string[]; // undefined or array of 1 or more local paths or URIs
extensionTestsPath?: string; // either a local path or a URI
extensionDevelopmentKind?: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ export interface INativeEnvironmentService extends IEnvironmentService {
extensionsPath: string;
extensionsDownloadPath: string;
builtinExtensionsPath: string;
// NOTE@coder: add extraExtensionPaths/extraBuiltinExtensionPaths
extraExtensionPaths: string[];
extraBuiltinExtensionPaths: string[];

// --- smoke test support
driverHandle?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ import { URI } from 'vs/base/common/uri';
import { ExtensionKind } from 'vs/platform/extensions/common/extensions';
import { env } from 'vs/base/common/process';

// NOTE@coder: add parsePathArg
function parsePathArg(arg: string | undefined, process: NodeJS.Process): string | undefined {
if (!arg) {
return undefined;
}

// Determine if the arg is relative or absolute, if relative use the original CWD
// (VSCODE_CWD), not the potentially overridden one (process.cwd()).
const resolved = resolve(arg);

if (normalize(arg) === resolved) {
return resolved;
}

return resolve(process.env['VSCODE_CWD'] || process.cwd(), arg);
}


oxy marked this conversation as resolved.
Show resolved Hide resolved
export interface INativeEnvironmentPaths {

/**
Expand Down Expand Up @@ -157,6 +175,19 @@ export abstract class AbstractNativeEnvironmentService implements INativeEnviron
return joinPath(this.userHome, this.productService.dataFolderName, 'extensions').fsPath;
}

/**
* NOTE@coder: add extraExtensionPaths and extraBuiltinExtensionPaths
*/
@memoize
get extraExtensionPaths(): string[] {
return (this._args['extra-extensions-dir'] || []).map((p) => <string>parsePathArg(p, process));
}

@memoize
get extraBuiltinExtensionPaths(): string[] {
return (this._args['extra-builtin-extensions-dir'] || []).map((p) => <string>parsePathArg(p, process));
}

@memoize
get extensionDevelopmentLocationURI(): URI[] | undefined {
const extensionDevelopmentPaths = this.args.extensionDevelopmentPath;
Expand Down
3 changes: 3 additions & 0 deletions lib/vscode/src/vs/platform/environment/node/argv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'extensions-dir': { type: 'string', deprecates: 'extensionHomePath', cat: 'e', args: 'dir', description: localize('extensionHomePath', "Set the root path for extensions.") },
'extensions-download-dir': { type: 'string' },
'builtin-extensions-dir': { type: 'string' },
// NOTE@coder: add extra-extensions-dir and extra-builtin-extensions-dir
'extra-extensions-dir': { type: 'string[]', cat: 'o', description: 'Path to an extra user extension directory.' },
'extra-builtin-extensions-dir': { type: 'string[]', cat: 'o', description: 'Path to an extra builtin extension directory.' },
'list-extensions': { type: 'boolean', cat: 'e', description: localize('listExtensions', "List the installed extensions.") },
'show-versions': { type: 'boolean', cat: 'e', description: localize('showVersions', "Show versions of installed extensions, when using --list-extensions.") },
'category': { type: 'string', cat: 'e', description: localize('category', "Filters installed extensions by provided category, when using --list-extensions."), args: 'category' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class ExtensionsScanner extends Disposable {
}

async scanAllUserExtensions(): Promise<ILocalExtension[]> {
return this.scanExtensionsInDir(this.extensionsPath, ExtensionType.User);
return this.scanExtensionsInDirs([this.extensionsPath, ...this.environmentService.extraExtensionPaths], ExtensionType.User);
}

async extractUserExtension(identifierWithVersion: ExtensionIdentifierWithVersion, zipPath: string, token: CancellationToken): Promise<ILocalExtension> {
Expand Down Expand Up @@ -314,7 +314,7 @@ export class ExtensionsScanner extends Disposable {
}

private async scanDefaultSystemExtensions(): Promise<ILocalExtension[]> {
const result = await this.scanExtensionsInDir(this.systemExtensionsPath, ExtensionType.System);
const result = await this.scanExtensionsInDirs([this.systemExtensionsPath, ...this.environmentService.extraBuiltinExtensionPaths], ExtensionType.System);
this.logService.trace('Scanned system extensions:', result.length);
return result;
}
Expand Down Expand Up @@ -418,4 +418,9 @@ export class ExtensionsScanner extends Disposable {
}
});
}

private async scanExtensionsInDirs(dirs: string[], type: ExtensionType): Promise<ILocalExtension[]>{
const results = await Promise.all(dirs.map((path) => this.scanExtensionsInDir(path, type)));
return results.reduce((flat, current) => flat.concat(current), []);
}
}