Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898 (#15681)

* Merge from vscode a348d103d1256a06a2c9b3f9b406298a9fef6898

* Fixes and cleanup

* Distro

* Fix hygiene yarn

* delete no yarn lock changes file

* Fix hygiene

* Fix layer check

* Fix CI

* Skip lib checks

* Remove tests deleted in vs code

* Fix tests

* Distro

* Fix tests and add removed extension point

* Skip failing notebook tests for now

* Disable broken tests and cleanup build folder

* Update yarn.lock and fix smoke tests

* Bump sqlite

* fix contributed actions and file spacing

* Fix user data path

* Update yarn.locks

Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
Charles Gagnon
2021-06-17 08:17:11 -07:00
committed by GitHub
parent fdcb97c7f7
commit 3cb2f552a6
2582 changed files with 124827 additions and 87099 deletions

View File

@@ -7,7 +7,7 @@ import { IURLService, IURLHandler, IOpenURLOptions } from 'vs/platform/url/commo
import { URI, UriComponents } from 'vs/base/common/uri';
import { first } from 'vs/base/common/async';
import { toDisposable, IDisposable, Disposable } from 'vs/base/common/lifecycle';
import product from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/productService';
export abstract class AbstractURLService extends Disposable implements IURLService {
@@ -30,6 +30,12 @@ export abstract class AbstractURLService extends Disposable implements IURLServi
export class NativeURLService extends AbstractURLService {
constructor(
@IProductService protected readonly productService: IProductService
) {
super();
}
create(options?: Partial<UriComponents>): URI {
let { authority, path, query, fragment } = options ? options : { authority: undefined, path: undefined, query: undefined, fragment: undefined };
@@ -37,6 +43,6 @@ export class NativeURLService extends AbstractURLService {
path = `/${path}`; // URI validation requires a path if there is an authority
}
return URI.from({ scheme: product.urlProtocol, authority, path, query, fragment });
return URI.from({ scheme: this.productService.urlProtocol, authority, path, query, fragment });
}
}

View File

@@ -6,7 +6,7 @@
import { Event } from 'vs/base/common/event';
import { IEnvironmentMainService } from 'vs/platform/environment/electron-main/environmentMainService';
import { IURLService } from 'vs/platform/url/common/url';
import product from 'vs/platform/product/common/product';
import { IProductService } from 'vs/platform/product/common/productService';
import { app, Event as ElectronEvent } from 'electron';
import { URI } from 'vs/base/common/uri';
import { IDisposable, DisposableStore, Disposable } from 'vs/base/common/lifecycle';
@@ -43,7 +43,8 @@ export class ElectronURLListener {
initialUrisToHandle: { uri: URI, url: string }[],
private readonly urlService: IURLService,
windowsMainService: IWindowsMainService,
environmentService: IEnvironmentMainService
environmentMainService: IEnvironmentMainService,
productService: IProductService
) {
// the initial set of URIs we need to handle once the window is ready
@@ -51,9 +52,9 @@ export class ElectronURLListener {
// Windows: install as protocol handler
if (isWindows) {
const windowsParameters = environmentService.isBuilt ? [] : [`"${environmentService.appRoot}"`];
const windowsParameters = environmentMainService.isBuilt ? [] : [`"${environmentMainService.appRoot}"`];
windowsParameters.push('--open-url', '--');
app.setAsDefaultProtocolClient(product.urlProtocol, process.execPath, windowsParameters);
app.setAsDefaultProtocolClient(productService.urlProtocol, process.execPath, windowsParameters);
}
// macOS: listen to `open-url` events from here on to handle
@@ -82,7 +83,7 @@ export class ElectronURLListener {
if (isWindowReady) {
this.flush();
} else {
Event.once(windowsMainService.onWindowReady)(this.flush, this, this.disposables);
Event.once(windowsMainService.onDidSignalReadyWindow)(this.flush, this, this.disposables);
}
}