extensionsProfileScannerService.ts ×6

Frontier kind: Code frontier

unlabeled · c_f20a32d06223

27 tests · 17044 LOC · 73 files · introduces 0 tests · 19 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges19 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2561 ranges17044 lines · 73 files · Browse complete extent
All tests (intent)
27 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 19 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/extensionManagement/common/extensionsProfileScannerService.ts 16 introduced LOC · 6 ranges

Open complete file

248 let migrate = false;
249 for (const e of storedProfileExtensions) {
250 > if (!isStoredProfileExtension(e)) { extensionsProfileScannerService.ts
251 this.throwInvalidConentError(file);
252 }
253 let location: URI;
254 > if (isString(e.relativeLocation) && e.relativeLocation) { extensionsProfileScannerService.ts
255 // Extension in new format. No migration needed.
256 location = this.resolveExtensionLocation(e.relativeLocation);
267 }
268 }
269 > if (isUndefined(e.metadata?.hasPreReleaseVersion) && e.metadata?.preRelease) { extensionsProfileScannerService.ts
270 migrate = true;
271 e.metadata.hasPreReleaseVersion = true;
272 }
273 > const uuid = e.metadata?.id ?? e.identifier.uuid; extensionsProfileScannerService.ts
274 > extensions.push({
275 > identifier: uuid ? { id: e.identifier.id, uuid } : { id: e.identifier.id },
276 > location,
277 > version: e.version,
278 > metadata: e.metadata,
279 > });
280 > }
281 if (migrate) {
282 await this.fileService.writeFile(file, VSBuffer.fromString(JSON.stringify(storedProfileExtensions)));
391 }
392
393 > function isStoredProfileExtension(obj: unknown): obj is IStoredProfileExtension { extensionsProfileScannerService.ts
394 > const candidate = obj as IStoredProfileExtension | undefined;
395 > return isObject(candidate)
396 > && isIExtensionIdentifier(candidate.identifier)
397 && (isUriComponents(candidate.location) || (isString(candidate.location) && !!candidate.location))
398 && (isUndefined(candidate.relativeLocation) || isString(candidate.relativeLocation))
399 && !!candidate.version
400 && isString(candidate.version);
402
403 function isUriComponents(obj: unknown): obj is UriComponents {
src/vs/platform/extensionManagement/common/extensionManagement.ts 3 introduced LOC · 2 ranges

Open complete file

193
194 export function isIExtensionIdentifier(obj: unknown): obj is IExtensionIdentifier {
195 > const thing = obj as IExtensionIdentifier | undefined; extensionManagement.ts
196 > return !!thing
197 && typeof thing === 'object'
198 && typeof thing.id === 'string'
199 && (!thing.uuid || typeof thing.uuid === 'string');
201
202 export interface IExtensionIdentifier {