Skip to content

Commit 207f2ce

Browse files
authored
chore: restore branch for recovery release (microsoft#139041)
* Revert "re-enable smoke tests, keep editor fix (microsoft#139012) (microsoft#139019)" This reverts commit c4738fe. * Revert "Add yarn file (microsoft#139035)" This reverts commit b3d3156. * Revert "Bump distro and version for 1.63.1 (microsoft#139034)" This reverts commit bc22b67. * Revert "Pick up TS recovery (microsoft#138795)" This reverts commit 223411f. * Revert "Merge pull request microsoft#139017 from microsoft/sandy081/fix139013" This reverts commit e7a2ed3, reversing changes made to 7db1a2b.
1 parent c4738fe commit 207f2ce

File tree

10 files changed

+46
-88
lines changed

10 files changed

+46
-88
lines changed

extensions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"description": "Dependencies shared by all extensions",
66
"dependencies": {
7-
"typescript": "4.5.4"
7+
"typescript": "4.5"
88
},
99
"scripts": {
1010
"postinstall": "node ./postinstall"

extensions/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ [email protected]:
2424
resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8"
2525
integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg=
2626

27-
28-
version "4.5.4"
29-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8"
30-
integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==
27+
28+
version "4.5.2"
29+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998"
30+
integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==
3131

3232
vscode-grammar-updater@^1.0.3:
3333
version "1.0.3"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-oss-dev",
3-
"version": "1.63.1",
4-
"distro": "4ca403765dff3e67e788ce19c43428878f156242",
3+
"version": "1.63.0",
4+
"distro": "28dea56425abcfafd4de9d5073e6fadfbf3518f5",
55
"author": {
66
"name": "Microsoft Corporation"
77
},

src/vs/platform/extensionManagement/common/extensionGalleryService.ts

Lines changed: 14 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { URI } from 'vs/base/common/uri';
1616
import { IHeaders, IRequestContext, IRequestOptions } from 'vs/base/parts/request/common/request';
1717
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1818
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
19-
import { DefaultIconPath, getFallbackTargetPlarforms, getTargetPlatform, IExtensionGalleryService, IExtensionIdentifier, IExtensionIdentifierWithVersion, IGalleryExtension, IGalleryExtensionAsset, IGalleryExtensionAssets, IGalleryExtensionVersion, InstallOperation, IQueryOptions, IExtensionsControlManifest, isIExtensionIdentifier, isNotWebExtensionInWebTargetPlatform, isTargetPlatformCompatible, ITranslation, SortBy, SortOrder, StatisticType, TargetPlatform, toTargetPlatform, WEB_EXTENSION_TAG, IExtensionIdentifierWithPreRelease } from 'vs/platform/extensionManagement/common/extensionManagement';
19+
import { DefaultIconPath, getFallbackTargetPlarforms, getTargetPlatform, IExtensionGalleryService, IExtensionIdentifier, IExtensionIdentifierWithVersion, IGalleryExtension, IGalleryExtensionAsset, IGalleryExtensionAssets, IGalleryExtensionVersion, InstallOperation, IQueryOptions, IExtensionsControlManifest, isIExtensionIdentifier, isNotWebExtensionInWebTargetPlatform, isTargetPlatformCompatible, ITranslation, SortBy, SortOrder, StatisticType, TargetPlatform, toTargetPlatform, WEB_EXTENSION_TAG } from 'vs/platform/extensionManagement/common/extensionManagement';
2020
import { adoptToGalleryExtensionId, areSameExtensions, getGalleryExtensionId, getGalleryExtensionTelemetryData } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
2121
import { IExtensionManifest } from 'vs/platform/extensions/common/extensions';
2222
import { isEngineValid } from 'vs/platform/extensions/common/extensionValidator';
@@ -506,39 +506,9 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi
506506
const { galleryExtensions } = await this.queryGallery(query, CURRENT_TARGET_PLATFORM, CancellationToken.None);
507507
const galleryExtensionsByVersion = galleryExtensions.map(rawGalleryExtension => {
508508
const id = getGalleryExtensionId(rawGalleryExtension.publisher.publisherName, rawGalleryExtension.extensionName);
509-
return { rawGalleryExtension, version: (<IExtensionIdentifierWithVersion | undefined>identifiers.find(identifier => areSameExtensions(identifier, { id })))?.version, preRelease: includePreRelease };
509+
return { rawGalleryExtension, version: (<IExtensionIdentifierWithVersion | undefined>identifiers.find(identifier => areSameExtensions(identifier, { id })))?.version };
510510
});
511-
return this.converToGalleryExtensions(galleryExtensionsByVersion, CURRENT_TARGET_PLATFORM, () => undefined, token);
512-
}
513-
514-
async getExtensions2(identifiers: ReadonlyArray<IExtensionIdentifierWithPreRelease>): Promise<IGalleryExtension[]> {
515-
const names: string[] = []; const ids: string[] = [];
516-
for (const identifier of identifiers) {
517-
if (identifier.uuid) {
518-
ids.push(identifier.uuid);
519-
} else {
520-
names.push(identifier.id.toLowerCase());
521-
}
522-
}
523-
let query = new Query()
524-
.withFlags(Flags.IncludeAssetUri, Flags.IncludeStatistics, Flags.IncludeCategoryAndTags, Flags.IncludeFiles, Flags.IncludeVersionProperties, Flags.IncludeLatestVersionOnly)
525-
.withPage(1, identifiers.length)
526-
.withFilter(FilterType.Target, 'Microsoft.VisualStudio.Code');
527-
if (ids.length) {
528-
query = query.withFilter(FilterType.ExtensionId, ...ids);
529-
}
530-
if (names.length) {
531-
query = query.withFilter(FilterType.ExtensionId, ...names);
532-
}
533-
534-
const { galleryExtensions: rawGalleryExtensions } = await this.queryGallery(query, CURRENT_TARGET_PLATFORM, CancellationToken.None);
535-
const rawGalleryExtensionsInput = rawGalleryExtensions.map(rawGalleryExtension => {
536-
const id = getGalleryExtensionId(rawGalleryExtension.publisher.publisherName, rawGalleryExtension.extensionName);
537-
const identifier = identifiers.find(identifier => areSameExtensions(identifier, { id, uuid: rawGalleryExtension.extensionId }));
538-
return { rawGalleryExtension, preRelease: !!identifier?.preRelease };
539-
});
540-
541-
return this.converToGalleryExtensions(rawGalleryExtensionsInput, CURRENT_TARGET_PLATFORM, () => undefined, CancellationToken.None);
511+
return this.converToGalleryExtensions(galleryExtensionsByVersion, includePreRelease, CURRENT_TARGET_PLATFORM, () => undefined, token);
542512
}
543513

544514
async getCompatibleExtension(arg1: IExtensionIdentifier | IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform): Promise<IGalleryExtension | null> {
@@ -683,43 +653,43 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi
683653

684654
const { galleryExtensions, total } = await this.queryGallery(query, CURRENT_TARGET_PLATFORM, token);
685655
const telemetryData = (index: number) => ({ index: ((query.pageNumber - 1) * query.pageSize) + index, querySource: options.source });
686-
const extensions = await this.converToGalleryExtensions(galleryExtensions.map(rawGalleryExtension => ({ rawGalleryExtension, preRelease: !!options.includePreRelease })), CURRENT_TARGET_PLATFORM, telemetryData, token);
656+
const extensions = await this.converToGalleryExtensions(galleryExtensions.map(rawGalleryExtension => ({ rawGalleryExtension })), !!options.includePreRelease, CURRENT_TARGET_PLATFORM, telemetryData, token);
687657
const getPage = async (pageIndex: number, ct: CancellationToken) => {
688658
if (ct.isCancellationRequested) {
689659
throw canceled();
690660
}
691661
const nextPageQuery = query.withPage(pageIndex + 1);
692662
const { galleryExtensions } = await this.queryGallery(nextPageQuery, CURRENT_TARGET_PLATFORM, ct);
693-
return await this.converToGalleryExtensions(galleryExtensions.map(rawGalleryExtension => ({ rawGalleryExtension, preRelease: !!options.includePreRelease })), CURRENT_TARGET_PLATFORM, telemetryData, token);
663+
return await this.converToGalleryExtensions(galleryExtensions.map(rawGalleryExtension => ({ rawGalleryExtension })), !!options.includePreRelease, CURRENT_TARGET_PLATFORM, telemetryData, token);
694664
};
695665

696666
return { firstPage: extensions, total, pageSize: query.pageSize, getPage } as IPager<IGalleryExtension>;
697667
}
698668

699-
private async converToGalleryExtensions(rawGalleryExtensions: { rawGalleryExtension: IRawGalleryExtension, preRelease: boolean, version?: string }[], targetPlatform: TargetPlatform, telemetryData: (index: number) => IStringDictionary<any> | undefined, token: CancellationToken): Promise<IGalleryExtension[]> {
700-
const toExtensionWithLatestVersion = (galleryExtension: IRawGalleryExtension, index: number, hasReleaseVersion: boolean, preRelease: boolean): IGalleryExtension => {
669+
private async converToGalleryExtensions(rawGalleryExtensions: { rawGalleryExtension: IRawGalleryExtension, version?: string }[], includePreRelease: boolean, targetPlatform: TargetPlatform, telemetryData: (index: number) => IStringDictionary<any> | undefined, token: CancellationToken): Promise<IGalleryExtension[]> {
670+
const toExtensionWithLatestVersion = (galleryExtension: IRawGalleryExtension, index: number, hasReleaseVersion: boolean): IGalleryExtension => {
701671
const allTargetPlatforms = getAllTargetPlatforms(galleryExtension);
702672
let latestVersion = galleryExtension.versions[0];
703673
latestVersion = galleryExtension.versions.find(version => version.version === latestVersion.version && isTargetPlatformCompatible(getTargetPlatformForExtensionVersion(version), allTargetPlatforms, targetPlatform)) || latestVersion;
704-
if (isPreReleaseVersion(latestVersion) && !preRelease) {
674+
if (isPreReleaseVersion(latestVersion) && !includePreRelease) {
705675
latestVersion = galleryExtension.versions.find(version => version.version !== latestVersion.version && !isPreReleaseVersion(version)) || latestVersion;
706676
}
707677
return toExtension(galleryExtension, latestVersion, allTargetPlatforms, hasReleaseVersion, telemetryData(index));
708678
};
709679
const result: [number, IGalleryExtension][] = [];
710-
const preReleaseVersions = new Map<string, { index: number, preRelease: boolean }>();
680+
const preReleaseVersions = new Map<string, number>();
711681
for (let index = 0; index < rawGalleryExtensions.length; index++) {
712-
const { rawGalleryExtension, version, preRelease } = rawGalleryExtensions[index];
682+
const { rawGalleryExtension, version } = rawGalleryExtensions[index];
713683
const hasReleaseVersion = rawGalleryExtension.versions.some(version => !isPreReleaseVersion(version));
714684
if (version) {
715685
const versionAsset = rawGalleryExtension.versions.find(v => v.version === version);
716686
if (versionAsset) {
717687
result.push([index, toExtension(rawGalleryExtension, versionAsset, getAllTargetPlatforms(rawGalleryExtension), hasReleaseVersion)]);
718688
}
719689
} else {
720-
const extension = toExtensionWithLatestVersion(rawGalleryExtension, index, hasReleaseVersion, preRelease);
690+
const extension = toExtensionWithLatestVersion(rawGalleryExtension, index, hasReleaseVersion);
721691
if (extension.properties.isPreReleaseVersion) {
722-
preReleaseVersions.set(extension.identifier.uuid, { index, preRelease });
692+
preReleaseVersions.set(extension.identifier.uuid, index);
723693
} else {
724694
result.push([index, extension]);
725695
}
@@ -743,8 +713,8 @@ abstract class AbstractExtensionGalleryService implements IExtensionGalleryServi
743713
}
744714
for (const rawGalleryExtension of galleryExtensions) {
745715
const hasReleaseVersion = rawGalleryExtension.versions.some(version => !isPreReleaseVersion(version));
746-
const { index, preRelease } = preReleaseVersions.get(rawGalleryExtension.extensionId)!;
747-
const extension = toExtensionWithLatestVersion(rawGalleryExtension, index, hasReleaseVersion, preRelease);
716+
const index = preReleaseVersions.get(rawGalleryExtension.extensionId)!;
717+
const extension = toExtensionWithLatestVersion(rawGalleryExtension, index, hasReleaseVersion);
748718
result.push([index, extension]);
749719
}
750720
}

src/vs/platform/extensionManagement/common/extensionManagement.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ export interface IExtensionIdentifierWithVersion extends IExtensionIdentifier {
228228
version: string;
229229
}
230230

231-
export interface IExtensionIdentifierWithPreRelease extends IExtensionIdentifier {
232-
preRelease: boolean;
233-
}
234-
235231
export interface IGalleryExtensionIdentifier extends IExtensionIdentifier {
236232
uuid: string;
237233
}
@@ -272,7 +268,7 @@ export interface IGalleryMetadata {
272268
id: string;
273269
publisherId: string;
274270
publisherDisplayName: string;
275-
isPreReleaseVersion: boolean,
271+
isPreReleaseVersion: boolean,
276272
}
277273

278274
export type Metadata = Partial<IGalleryMetadata & { isMachineScoped: boolean; isBuiltin: boolean; preRelease: boolean, installedTimestamp: number }>;
@@ -342,7 +338,6 @@ export interface IExtensionGalleryService {
342338
query(options: IQueryOptions, token: CancellationToken): Promise<IPager<IGalleryExtension>>;
343339
getExtensions(identifiers: ReadonlyArray<IExtensionIdentifier | IExtensionIdentifierWithVersion>, token: CancellationToken): Promise<IGalleryExtension[]>;
344340
getExtensions(identifiers: ReadonlyArray<IExtensionIdentifier | IExtensionIdentifierWithVersion>, includePreRelease: boolean, token: CancellationToken): Promise<IGalleryExtension[]>;
345-
getExtensions2(identifiers: ReadonlyArray<IExtensionIdentifierWithPreRelease>): Promise<IGalleryExtension[]>;
346341
download(extension: IGalleryExtension, location: URI, operation: InstallOperation): Promise<void>;
347342
reportStatistic(publisher: string, name: string, version: string, type: StatisticType): Promise<void>;
348343
getReadme(extension: IGalleryExtension, token: CancellationToken): Promise<string>;

src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ class Extensions extends Disposable {
379379
private installed: Extension[] = [];
380380

381381
constructor(
382-
readonly server: IExtensionManagementServer,
382+
private readonly server: IExtensionManagementServer,
383383
private readonly stateProvider: IExtensionStateProvider<ExtensionState>,
384384
@IExtensionGalleryService private readonly galleryService: IExtensionGalleryService,
385385
@IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService,
@@ -1018,22 +1018,21 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
10181018
.then(undefined, err => null);
10191019
}
10201020

1021-
private async syncWithGallery(): Promise<void> {
1022-
const identifiers: (IExtensionIdentifier & { preRelease: boolean })[] = [], names: string[] = [];
1021+
private syncWithGallery(): Promise<void> {
1022+
const ids: string[] = [], names: string[] = [];
10231023
for (const installed of this.local) {
10241024
if (installed.type === ExtensionType.User) {
10251025
if (installed.identifier.uuid) {
1026-
identifiers.push({ ...installed.identifier, preRelease: !!installed.local?.isPreReleaseVersion || !!installed.local?.preRelease });
1026+
ids.push(installed.identifier.uuid);
10271027
} else {
10281028
names.push(installed.identifier.id);
10291029
}
10301030
}
10311031
}
10321032

1033-
const promises: Promise<any>[] = [];
1034-
if (identifiers.length) {
1035-
const extensionsControlManifest = await this.extensionManagementService.getExtensionsControlManifest();
1036-
promises.push(this.galleryService.getExtensions2(identifiers).then(galleryExtensions => galleryExtensions.forEach(gallery => this.fromGallery(gallery, extensionsControlManifest))));
1033+
const promises: Promise<IPager<IExtension>>[] = [];
1034+
if (ids.length) {
1035+
promises.push(this.queryGallery({ ids, pageSize: ids.length }, CancellationToken.None));
10371036
}
10381037
if (names.length) {
10391038
promises.push(this.queryGallery({ names, pageSize: names.length }, CancellationToken.None));

src/vs/workbench/contrib/terminal/browser/terminalInstance.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,12 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
179179
private _labelComputer?: TerminalLabelComputer;
180180
private _userHome?: string;
181181
private _hasScrollBar?: boolean;
182-
private _target?: TerminalLocation | undefined;
183182

184-
get target(): TerminalLocation | undefined { return this._target; }
183+
get target(): TerminalLocation | undefined { return this.xterm?.target; }
185184
set target(value: TerminalLocation | undefined) {
186185
if (this.xterm) {
187186
this.xterm.target = value;
188187
}
189-
this._target = value;
190188
}
191189

192190
get instanceId(): number { return this._instanceId; }
@@ -561,7 +559,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
561559
throw new Error('Terminal disposed of during xterm.js creation');
562560
}
563561

564-
const xterm = this._instantiationService.createInstance(XtermTerminal, Terminal, this._configHelper, this._cols, this._rows, this.target || TerminalLocation.Panel);
562+
const xterm = this._instantiationService.createInstance(XtermTerminal, Terminal, this._configHelper, this._cols, this._rows);
565563
this.xterm = xterm;
566564
const lineDataEventAddon = new LineDataEventAddon();
567565
this.xterm.raw.loadAddon(lineDataEventAddon);
@@ -703,6 +701,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
703701
throw new Error('xterm elements not set after open');
704702
}
705703

704+
706705
this._setAriaLabel(xterm.raw, this._instanceId, this._title);
707706

708707
xterm.raw.attachCustomKeyEventHandler((event: KeyboardEvent): boolean => {

0 commit comments

Comments
 (0)