From d46f680c99d23de55f8fe59b716bb984865b0a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Hameau?= Date: Sat, 14 May 2022 00:47:33 +0200 Subject: [PATCH] Update to vscode 1.62.3 --- CHANGELOG.md | 1 + package.json | 6 +- src/commands/openDocumentLink.ts | 131 +------------------ src/features/documentLinkProvider.ts | 12 +- src/features/foldingProvider.ts | 14 +- src/features/preview.ts | 20 +-- src/test/documentLink.test.ts | 10 ++ src/test/engine.test.ts | 2 +- src/textileEngine.ts | 108 +++++++-------- src/util/openDocumentLink.ts | 161 +++++++++++++++++++++++ test-workspace/sub/foo.txt | 5 + tools/prepare_vscode_tree.sh | 2 +- yarn.lock | 188 +++++++++++---------------- 13 files changed, 345 insertions(+), 315 deletions(-) create mode 100644 src/util/openDocumentLink.ts create mode 100644 test-workspace/sub/foo.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 904e74f..3e62d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [CI] Replace Travis by Github action - [DOC] Update badges +- Update to vscode 1.62.3 ### Added - [CI] Run test suite on Windows also diff --git a/package.json b/package.json index edd3783..34a036d 100644 --- a/package.json +++ b/package.json @@ -358,7 +358,7 @@ }, "devDependencies": { "@types/lodash.throttle": "^4.1.3", - "@types/mocha": "^8.2.0", + "@types/mocha": "^9.1.1", "@types/node": "16.x", "@types/vscode": "^1.61.0", "@types/vscode-webview": "^1.57.0", @@ -373,12 +373,12 @@ "gulp-typescript": "^5.0.1", "lodash.throttle": "^4.1.1", "merge-options": "^1.0.1", - "mocha": "^8.2.1", + "mocha": "^9.2.2", "mocha-junit-reporter": "^2.0.0", "mocha-multi-reporters": "^1.5.1", "path-browserify": "^1.0.1", "ts-loader": "^9.2.3", - "typescript": "^4.5.0-dev.20210927", + "typescript": "^4.8.0-dev.20220511", "util": "^0.12.4", "vsce": "^1.100.1", "vscode-nls-dev": "^3.3.2", diff --git a/src/commands/openDocumentLink.ts b/src/commands/openDocumentLink.ts index 5922142..c8f5716 100644 --- a/src/commands/openDocumentLink.ts +++ b/src/commands/openDocumentLink.ts @@ -6,9 +6,7 @@ import * as vscode from 'vscode'; import { Command } from '../commandManager'; import { TextileEngine } from '../textileEngine'; -import { TableOfContentsProvider } from '../tableOfContentsProvider'; -import { isTextileFile } from '../util/file'; -import { extname } from '../util/path'; +import { openDocumentLink } from '../util/openDocumentLink'; type UriComponents = { @@ -25,11 +23,6 @@ export interface OpenDocumentLinkArgs { readonly fromResource: UriComponents; } -enum OpenTextileLinks { - beside = 'beside', - currentGroup = 'currentGroup', -} - export class OpenDocumentLinkCommand implements Command { private static readonly id = '_textile.openDocumentLink'; public readonly id = OpenDocumentLinkCommand.id; @@ -60,95 +53,10 @@ export class OpenDocumentLinkCommand implements Command { ) { } public async execute(args: OpenDocumentLinkArgs) { - return OpenDocumentLinkCommand.execute(this.engine, args); - } - - public static async execute(engine: TextileEngine, args: OpenDocumentLinkArgs): Promise { const fromResource = vscode.Uri.parse('').with(args.fromResource); - const targetResource = reviveUri(args.parts); - - const column = this.getViewColumn(fromResource); - - const didOpen = await this.tryOpen(engine, targetResource, args, column); - if (didOpen) { - return; - } - - if (extname(targetResource.path) === '') { - await this.tryOpen(engine, targetResource.with({ path: targetResource.path + '.textile' }), args, column); - return; - } - } - - private static async tryOpen(engine: TextileEngine, resource: vscode.Uri, args: OpenDocumentLinkArgs, column: vscode.ViewColumn): Promise { - const tryUpdateForActiveFile = async (): Promise => { - if (vscode.window.activeTextEditor && isTextileFile(vscode.window.activeTextEditor.document)) { - if (vscode.window.activeTextEditor.document.uri.fsPath === resource.fsPath) { - await this.tryRevealLine(engine, vscode.window.activeTextEditor, args.fragment); - return true; - } - } - return false; - }; - - if (await tryUpdateForActiveFile()) { - return true; - } - - let stat: vscode.FileStat; - try { - stat = await vscode.workspace.fs.stat(resource); - if (stat.type === vscode.FileType.Directory) { - await vscode.commands.executeCommand('revealInExplorer', resource); - return true; - } - } catch { - // noop - // If resource doesn't exist, execute `vscode.open` either way so an error - // notification is shown to the user with a create file action #113475 - } - - try { - await vscode.commands.executeCommand('vscode.open', resource, column); - } catch { - return false; - } - - return tryUpdateForActiveFile(); - } - - private static getViewColumn(resource: vscode.Uri): vscode.ViewColumn { - const config = vscode.workspace.getConfiguration('textile', resource); - const openLinks = config.get('links.openLocation', OpenTextileLinks.currentGroup); - switch (openLinks) { - case OpenTextileLinks.beside: - return vscode.ViewColumn.Beside; - case OpenTextileLinks.currentGroup: - default: - return vscode.ViewColumn.Active; - } - } - - private static async tryRevealLine(engine: TextileEngine, editor: vscode.TextEditor, fragment?: string) { - if (fragment) { - const toc = new TableOfContentsProvider(engine, editor.document); - const entry = await toc.lookup(fragment); - if (entry) { - const lineStart = new vscode.Range(entry.line, 0, entry.line, 0); - editor.selection = new vscode.Selection(lineStart.start, lineStart.end); - return editor.revealRange(lineStart, vscode.TextEditorRevealType.AtTop); - } - const lineNumberFragment = fragment.match(/^L(\d+)$/i); - if (lineNumberFragment) { - const line = +lineNumberFragment[1] - 1; - if (!isNaN(line)) { - const lineStart = new vscode.Range(line, 0, line, 0); - editor.selection = new vscode.Selection(lineStart.start, lineStart.end); - return editor.revealRange(lineStart, vscode.TextEditorRevealType.AtTop); - } - } - } + const targetResource = reviveUri(args.parts).with({ fragment: args.fragment }); + return openDocumentLink(this.engine, targetResource, fromResource); } } @@ -158,36 +66,3 @@ function reviveUri(parts: any) { } return vscode.Uri.parse('').with(parts); } - -export async function resolveLinkToTextileFile(path: string): Promise { - try { - const standardLink = await tryResolveLinkToTextileFile(path); - if (standardLink) { - return standardLink; - } - } catch { - // Noop - } - - // If no extension, try with `.textile` extension - if (extname(path) === '') { - return tryResolveLinkToTextileFile(path + '.textile'); - } - - return undefined; -} - -async function tryResolveLinkToTextileFile(path: string): Promise { - const resource = vscode.Uri.file(path); - - let document: vscode.TextDocument; - try { - document = await vscode.workspace.openTextDocument(resource); - } catch { - return undefined; - } - if (isTextileFile(document)) { - return document.uri; - } - return undefined; -} diff --git a/src/features/documentLinkProvider.ts b/src/features/documentLinkProvider.ts index 9145270..cd8fa8c 100644 --- a/src/features/documentLinkProvider.ts +++ b/src/features/documentLinkProvider.ts @@ -15,7 +15,8 @@ function parseLink( document: vscode.TextDocument, link: string, ): { uri: vscode.Uri, tooltip?: string } | undefined { - const externalSchemeUri = getUriForLinkWithKnownExternalScheme(link); + const cleanLink = stripAngleBrackets(link); + const externalSchemeUri = getUriForLinkWithKnownExternalScheme(cleanLink); if (externalSchemeUri) { // Normalize VS Code links to target currently running version if (isOfScheme(Schemes.vscode, link) || isOfScheme(Schemes['vscode-insiders'], link)) { @@ -89,6 +90,15 @@ function extractDocumentLink( } } +/* Used to strip brackets from the textile link + will be transformed to + http://example.com +*/ +export function stripAngleBrackets(link: string) { + const bracketMatcher = /^<(.*)>$/; + return link.replace(bracketMatcher, '$1'); +} + // -- Begin: Added for textile function getDocumentLink( document: vscode.TextDocument, diff --git a/src/features/foldingProvider.ts b/src/features/foldingProvider.ts index 52208fe..fb9fd50 100644 --- a/src/features/foldingProvider.ts +++ b/src/features/foldingProvider.ts @@ -10,6 +10,10 @@ import { TableOfContentsProvider } from '../tableOfContentsProvider'; const rangeLimit = 5000; +interface TextileTokenWithMap extends Token { + map: [number, number]; +} + export default class TextileFoldingProvider implements vscode.FoldingRangeProvider { constructor( @@ -139,8 +143,8 @@ export default class TextileFoldingProvider implements vscode.FoldingRangeProvid const isStartRegion = (t: string) => /^\s*#?region\b.*/.test(t); const isEndRegion = (t: string) => /^\s*#?endregion\b.*/.test(t); -const isRegionMarker = (token: Token) => - typeof(token[0]) === 'string' && token[0] === '!' && typeof(token[1]) === 'object' && typeof(token[2]) === 'string' && (isStartRegion(token[2]) || isEndRegion(token[2])); +const isRegionMarker = (token: Token): token is TextileTokenWithMap => + !!token.map && typeof(token[0]) === 'string' && token[0] === '!' && typeof(token[1]) === 'object' && typeof(token[2]) === 'string' && (isStartRegion(token[2]) || isEndRegion(token[2])); const getLineNumber = (token: Token) => typeof(token[0]) === 'string' && typeof(token[1]) === 'object' && typeof(token[1]['data-line']) !== 'undefined' ? +token[1]['data-line'] : undefined; @@ -148,7 +152,11 @@ const getLineNumber = (token: Token) => const getEndLineNumber = (token: Token) => typeof(token[0]) === 'string' && typeof(token[1]) === 'object' && typeof(token[1]['data-line-end']) !== 'undefined' ? +token[1]['data-line-end'] : undefined; -const isFoldableToken = (token: Token): boolean => { +const isFoldableToken = (token: Token): token is TextileTokenWithMap => { + if (!token.map) { + return false; + } + switch (token[0]) { case 'li': case 'pre': diff --git a/src/features/preview.ts b/src/features/preview.ts index c58175e..9d785bb 100644 --- a/src/features/preview.ts +++ b/src/features/preview.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import * as nls from 'vscode-nls'; -import { OpenDocumentLinkCommand, resolveLinkToTextileFile } from '../commands/openDocumentLink'; import { Logger } from '../logger'; import { TextileEngine } from '../textileEngine'; import { TextileContributionProvider } from '../textileExtensions'; import { Disposable } from '../util/dispose'; import { isTextileFile } from '../util/file'; +import { openDocumentLink, resolveDocumentLink, resolveLinkToTextileFile } from '../util/openDocumentLink'; import * as path from '../util/path'; import { WebviewResourceProvider } from '../util/resources'; import { getVisibleLine, LastScrollLocation, TopmostLineMonitor } from '../util/topmostLineMonitor'; @@ -429,29 +429,19 @@ class TextilePreview extends Disposable implements WebviewResourceProvider { private async onDidClickPreviewLink(href: string) { - let [hrefPath, fragment] = href.split('#').map(c => decodeURIComponent(c)); - - if (hrefPath[0] !== '/') { - // We perviously already resolve absolute paths. - // Now make sure we handle relative file paths - const dirnameUri = vscode.Uri.parse(path.dirname(this.resource.path)); - hrefPath = vscode.Uri.joinPath(dirnameUri, hrefPath).path; - } else { - // Handle any normalized file paths - hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).path; - } + const targetResource = resolveDocumentLink(href, this.resource); const config = vscode.workspace.getConfiguration('textile', this.resource); const openLinks = config.get('preview.openTextileLinks', 'inPreview'); if (openLinks === 'inPreview') { - const textileLink = await resolveLinkToTextileFile(hrefPath); + const textileLink = await resolveLinkToTextileFile(targetResource); if (textileLink) { - this.delegate.openPreviewLinkToTextileFile(textileLink, fragment); + this.delegate.openPreviewLinkToTextileFile(textileLink, targetResource.fragment); return; } } - OpenDocumentLinkCommand.execute(this.engine, { parts: { path: hrefPath }, fragment, fromResource: this.resource.toJSON() }); + return openDocumentLink(this.engine, targetResource, this.resource); } //#region WebviewResourceProvider diff --git a/src/test/documentLink.test.ts b/src/test/documentLink.test.ts index 6b5e406..01cb4a7 100644 --- a/src/test/documentLink.test.ts +++ b/src/test/documentLink.test.ts @@ -95,6 +95,16 @@ suite('Textile Document links', () => { assert.strictEqual(vscode.window.activeTextEditor!.selection.start.line, 1); }); + test('Should navigate to line number within non-md file', async () => { + await withFileContents(testFileA, '"b":sub/foo.txt#L3'); + + const [link] = await getLinksForFile(testFileA); + await executeLink(link); + + assertActiveDocumentUri(workspaceFile('sub', 'foo.txt')); + assert.strictEqual(vscode.window.activeTextEditor!.selection.start.line, 2); + }); + test('Should navigate to fragment within current file', async () => { await withFileContents(testFileA, joinLines( '"current":a#header', diff --git a/src/test/engine.test.ts b/src/test/engine.test.ts index 85aac11..9cd7062 100644 --- a/src/test/engine.test.ts +++ b/src/test/engine.test.ts @@ -39,7 +39,7 @@ suite('textile.engine', () => { assert.deepStrictEqual((await engine.render(input)), { html: '

' + ' ' - + 'a ' + + 'a ' + ' ' + ' ' + '' diff --git a/src/textileEngine.ts b/src/textileEngine.ts index 255ca5a..c958cf1 100644 --- a/src/textileEngine.ts +++ b/src/textileEngine.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { TextileJS, Token, Options as TextileJSConfig } from '../libs/textile-js/textile'; +//import Token = require('textile-it/lib/token'); import * as vscode from 'vscode'; import { TextileContributionProvider as TextileContributionProvider } from './textileExtensions'; import { Slugifier } from './slugify'; @@ -15,11 +16,34 @@ import { WebviewResourceProvider } from './util/resources'; const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g; /* Disabled for textile : already defined in textile lib -interface TextileJSConfig { - readonly breaks: boolean; - readonly linkify: boolean; - readonly typographer: boolean; -} +/** + * Adds begin line index to the output via the 'data-line' data attribute. + * / +const pluginSourceMap: TextileJS.PluginSimple = (md): void => { + // Set the attribute on every possible token. + md.core.ruler.push('source_map_data_attribute', (state): void => { + for (const token of state.tokens) { + if (token.map && token.type !== 'inline') { + token.attrSet('data-line', String(token.map[0])); + token.attrJoin('class', 'code-line'); + } + } + }); + + // The 'html_block' renderer doesn't respect `attrs`. We need to insert a marker. + const originalHtmlBlockRenderer = md.renderer.rules['html_block']; + if (originalHtmlBlockRenderer) { + md.renderer.rules['html_block'] = (tokens, idx, options, env, self) => ( + `

\n` + + originalHtmlBlockRenderer(tokens, idx, options, env, self) + ); + } +}; + +/** + * The textile-it options that we expose in the settings. + * / +type TextileJSConfig = Readonly>>; */ class TokenCache { @@ -89,15 +113,16 @@ export class TextileEngine { private async getEngine(config: TextileJSConfig): Promise { if (!this.textile) { - this.textile = import('../libs/textile-js/textile').then(async textile => { + this.textile = (async () => { + const textile = await import('../libs/textile-js/textile'); /* -- Begin : changed for Textile : let md: TextileJS = textileIt(await getTextileOptions(() => md)); for (const plugin of this.contributionProvider.contributions.textileItPlugins.values()) { try { md = (await plugin)(md); - } catch { - // noop + } catch (e) { + console.error('Could not load textile it plugin', e); } } @@ -110,15 +135,12 @@ export class TextileEngine { before: (_id: any, _id2: any, rule: any) => { fontMatterRule = rule; } } } - }, () => { / * noop * / }); + }, () => { /* noop * / }); md.block.ruler.before('fence', 'front_matter', fontMatterRule, { alt: ['paragraph', 'reference', 'blockquote', 'list'] }); - for (const renderName of ['paragraph_open', 'heading_open', 'image', 'code_block', 'fence', 'blockquote_open', 'list_item_open']) { - this.addLineNumberRenderer(md, renderName); - } */ // hooks are set only once : don't add them to config member parameter @@ -131,12 +153,12 @@ export class TextileEngine { // FIXME ? this.addLinkNormalizer(md); // FIXME ? this.addLinkValidator(md); this.addNamedHeaders(textile, localConfig); - // disabled for textile : this.addLinkRenderer(md); + this.addLinkRenderer(textile, localConfig); textile.setOptions( localConfig ); // -- End : changed for textile return textile; - }); + })(); } const textile = await this.textile!; @@ -258,25 +280,6 @@ export class TextileEngine { // -- End : Changed for textile } - /* Disabled for textile : not necessary - private addLineNumberRenderer(md: TextileJS, ruleName: string): void { - const original = md.renderer.rules[ruleName]; - md.renderer.rules[ruleName] = (tokens: Token[], idx: number, options: any, env: any, self: any) => { - const token = tokens[idx]; - if (token.map && token.map.length) { - token.attrSet('data-line', token.map[0] + ''); - token.attrJoin('class', 'code-line'); - } - - if (original) { - return original(tokens, idx, options, env, self); - } else { - return self.renderToken(tokens, idx, options, env, self); - } - }; - } - */ - // -- Begin : Changed for textile private addImageRenderer(textile: TextileJS, config: TextileJSConfig): void { config.hooks!.push( @@ -302,8 +305,8 @@ export class TextileEngine { break; } return tokens; - }] - ); + }] + ); } private async addFencedRenderer(textile: TextileJS, config: TextileJSConfig) { @@ -387,25 +390,26 @@ export class TextileEngine { }] ); } - // -- End : Changed for textile - /* FIXME ? - private addLinkRenderer(md: TextileJS): void { - const old_render = md.renderer.rules.link_open || ((tokens: Token[], idx: number, options: any, _env: any, self: any) => { - return self.renderToken(tokens, idx, options); - }); - - md.renderer.rules.link_open = (tokens: Token[], idx: number, options: any, env: any, self: any) => { - const token = tokens[idx]; - const hrefIndex = token.attrIndex('href'); - if (hrefIndex >= 0) { - const href = token.attrs[hrefIndex][1]; - token.attrPush(['data-href', href]); - } - return old_render(tokens, idx, options, env, self); - }; + private addLinkRenderer(textile: TextileJS, config: TextileJSConfig): void { + config.hooks!.push( + [(tokens: Token[]) => { + switch( tokens[0] ) { + case 'a': + const href = tokens[1]?.href; + // A string, including empty string, may be `href`. + if (typeof href === 'string') { + textile.jsonmlUtils.addAttributes( tokens, {'data-href': href}); + } + break; + default: + break; + } + return tokens; + }] + ); } - */ + // -- End : Changed for textile private toResourceUri(href: string, currentDocument: vscode.Uri | undefined, resourceProvider: WebviewResourceProvider | undefined): string { try { diff --git a/src/util/openDocumentLink.ts b/src/util/openDocumentLink.ts new file mode 100644 index 0000000..6c8dab5 --- /dev/null +++ b/src/util/openDocumentLink.ts @@ -0,0 +1,161 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as path from 'path'; +import * as vscode from 'vscode'; +import { TextileEngine } from '../textileEngine'; +import { TableOfContentsProvider } from '../tableOfContentsProvider'; +import { isTextileFile } from './file'; +import { extname } from './path'; + +export interface OpenDocumentLinkArgs { + readonly parts: vscode.Uri; + readonly fragment: string; + readonly fromResource: vscode.Uri; +} + +enum OpenTextileLinks { + beside = 'beside', + currentGroup = 'currentGroup', +} + +export function resolveDocumentLink(href: string, textileFile: vscode.Uri): vscode.Uri { + let [hrefPath, fragment] = href.split('#').map(c => decodeURIComponent(c)); + + if (hrefPath[0] === '/') { + // Absolute path. Try to resolve relative to the workspace + const workspace = vscode.workspace.getWorkspaceFolder(textileFile); + if (workspace) { + return vscode.Uri.joinPath(workspace.uri, hrefPath.slice(1)).with({ fragment }); + } + } + + // Relative path. Resolve relative to the md file + const dirnameUri = textileFile.with({ path: path.dirname(textileFile.path) }); + return vscode.Uri.joinPath(dirnameUri, hrefPath).with({ fragment }); +} + +export async function openDocumentLink(engine: TextileEngine, targetResource: vscode.Uri, fromResource: vscode.Uri): Promise { + const column = getViewColumn(fromResource); + + if (await tryNavigateToFragmentInActiveEditor(engine, targetResource)) { + return; + } + + let targetResourceStat: vscode.FileStat | undefined; + try { + targetResourceStat = await vscode.workspace.fs.stat(targetResource); + } catch { + // noop + } + + if (typeof targetResourceStat === 'undefined') { + // We don't think the file exists. If it doesn't already have an extension, try tacking on a `.textile` and using that instead + if (extname(targetResource.path) === '') { + const dotMdResource = targetResource.with({ path: targetResource.path + '.textile' }); + try { + const stat = await vscode.workspace.fs.stat(dotMdResource); + if (stat.type === vscode.FileType.File) { + await tryOpenMdFile(engine, dotMdResource, column); + return; + } + } catch { + // noop + } + } + } else if (targetResourceStat.type === vscode.FileType.Directory) { + return vscode.commands.executeCommand('revealInExplorer', targetResource); + } + + await tryOpenMdFile(engine, targetResource, column); +} + +async function tryOpenMdFile(engine: TextileEngine, resource: vscode.Uri, column: vscode.ViewColumn): Promise { + await vscode.commands.executeCommand('vscode.open', resource.with({ fragment: '' }), column); + return tryNavigateToFragmentInActiveEditor(engine, resource); +} + +async function tryNavigateToFragmentInActiveEditor(engine: TextileEngine, resource: vscode.Uri): Promise { + const activeEditor = vscode.window.activeTextEditor; + if (activeEditor?.document.uri.fsPath === resource.fsPath) { + if (isTextileFile(activeEditor.document)) { + if (await tryRevealLineUsingTocFragment(engine, activeEditor, resource.fragment)) { + return true; + } + } + tryRevealLineUsingLineFragment(activeEditor, resource.fragment); + return true; + } + return false; +} + +function getViewColumn(resource: vscode.Uri): vscode.ViewColumn { + const config = vscode.workspace.getConfiguration('textile', resource); + const openLinks = config.get('links.openLocation', OpenTextileLinks.currentGroup); + switch (openLinks) { + case OpenTextileLinks.beside: + return vscode.ViewColumn.Beside; + case OpenTextileLinks.currentGroup: + default: + return vscode.ViewColumn.Active; + } +} + +async function tryRevealLineUsingTocFragment(engine: TextileEngine, editor: vscode.TextEditor, fragment: string): Promise { + const toc = new TableOfContentsProvider(engine, editor.document); + const entry = await toc.lookup(fragment); + if (entry) { + const lineStart = new vscode.Range(entry.line, 0, entry.line, 0); + editor.selection = new vscode.Selection(lineStart.start, lineStart.end); + editor.revealRange(lineStart, vscode.TextEditorRevealType.AtTop); + return true; + } + return false; +} + +function tryRevealLineUsingLineFragment(editor: vscode.TextEditor, fragment: string): boolean { + const lineNumberFragment = fragment.match(/^L(\d+)$/i); + if (lineNumberFragment) { + const line = +lineNumberFragment[1] - 1; + if (!isNaN(line)) { + const lineStart = new vscode.Range(line, 0, line, 0); + editor.selection = new vscode.Selection(lineStart.start, lineStart.end); + editor.revealRange(lineStart, vscode.TextEditorRevealType.AtTop); + return true; + } + } + return false; +} + +export async function resolveLinkToTextileFile(resource: vscode.Uri): Promise { + try { + const standardLink = await tryResolveLinkToTextileFile(resource); + if (standardLink) { + return standardLink; + } + } catch { + // Noop + } + + // If no extension, try with `.textile` extension + if (extname(resource.path) === '') { + return tryResolveLinkToTextileFile(resource.with({ path: resource.path + '.textile' })); + } + + return undefined; +} + +async function tryResolveLinkToTextileFile(resource: vscode.Uri): Promise { + let document: vscode.TextDocument; + try { + document = await vscode.workspace.openTextDocument(resource); + } catch { + return undefined; + } + if (isTextileFile(document)) { + return document.uri; + } + return undefined; +} diff --git a/test-workspace/sub/foo.txt b/test-workspace/sub/foo.txt new file mode 100644 index 0000000..85954ea --- /dev/null +++ b/test-workspace/sub/foo.txt @@ -0,0 +1,5 @@ +1 +2 +3 +4 +5 \ No newline at end of file diff --git a/tools/prepare_vscode_tree.sh b/tools/prepare_vscode_tree.sh index eedd4ae..ba6300c 100755 --- a/tools/prepare_vscode_tree.sh +++ b/tools/prepare_vscode_tree.sh @@ -7,7 +7,7 @@ # After running this tool, you can compare ./ and ./tools/tmp/out/ to gather # new features. -VSCODE_VERSION_GIT_TAG=1.61.2 +VSCODE_VERSION_GIT_TAG=1.62.3 . $(dirname $0)/log.sh diff --git a/yarn.lock b/yarn.lock index e3da983..a516b89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -145,10 +145,10 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== -"@types/mocha@^8.2.0": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323" - integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw== +"@types/mocha@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== "@types/node@*": version "17.0.23" @@ -424,11 +424,6 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= -ansi-regex@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" - integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== - ansi-regex@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" @@ -466,7 +461,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@~3.1.1: +anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -906,7 +901,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -948,20 +943,20 @@ cheerio@^1.0.0-rc.9: parse5-htmlparser2-tree-adapter "^6.0.1" tslib "^2.2.0" -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: - anymatch "~3.1.1" + anymatch "~3.1.2" braces "~3.0.2" - glob-parent "~5.1.0" + glob-parent "~5.1.2" is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.5.0" + readdirp "~3.6.0" optionalDependencies: - fsevents "~2.3.1" + fsevents "~2.3.2" chokidar@^2.0.0: version "2.1.8" @@ -1308,10 +1303,10 @@ debug@4, debug@^4.0.1, debug@^4.1.1: dependencies: ms "2.1.2" -debug@4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== +debug@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -2156,7 +2151,7 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@~2.3.1: +fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -2252,7 +2247,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -2293,19 +2288,7 @@ glob-watcher@^5.0.3: normalize-path "^3.0.0" object.defaults "^1.1.0" -glob@7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@7.2.0, glob@^7.0.3, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -3013,6 +2996,11 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -3076,10 +3064,10 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" - integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" @@ -3273,12 +3261,13 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^4.0.0" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" lru-cache@^6.0.0: version "6.0.0" @@ -3450,10 +3439,10 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== dependencies: brace-expansion "^1.1.7" @@ -3549,33 +3538,32 @@ mocha-multi-reporters@^1.5.1: debug "^4.1.1" lodash "^4.17.15" -mocha@^8.2.1: - version "8.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" - integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== +mocha@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.5.1" - debug "4.3.1" + chokidar "3.5.3" + debug "4.3.3" diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" - glob "7.1.6" + glob "7.2.0" growl "1.10.5" he "1.2.0" - js-yaml "4.0.0" - log-symbols "4.0.0" - minimatch "3.0.4" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" ms "2.1.3" - nanoid "3.1.20" - serialize-javascript "5.0.1" + nanoid "3.3.1" + serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" which "2.0.2" - wide-align "1.1.3" - workerpool "6.1.0" + workerpool "6.2.0" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" @@ -3610,10 +3598,10 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.15.0.tgz#3f34a473ff18e15c1b5626b62903b5ad6e665fee" integrity sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ== -nanoid@3.1.20: - version "3.1.20" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" - integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== nanomatch@^1.2.9: version "1.2.13" @@ -4288,10 +4276,10 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" @@ -4547,20 +4535,20 @@ semver@^7.3.4, semver@^7.3.5: dependencies: lru-cache "^7.4.0" -serialize-javascript@5.0.1, serialize-javascript@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^6.0.0: +serialize-javascript@6.0.0, serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" +serialize-javascript@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -4833,14 +4821,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -4896,13 +4876,6 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -5238,10 +5211,10 @@ typescript@^3.9.5: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@^4.5.0-dev.20210927: - version "4.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c" - integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw== +typescript@^4.8.0-dev.20220511: + version "4.8.0-dev.20220513" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.0-dev.20220513.tgz#18a14e78fa1adeda418d5c43acde590c3544c4c2" + integrity sha512-zNmhxGQm8LQ2N3G8bmRNk7jzpsdQRaQ5/J46Sfe0hIunl0w/Gadq+zSGeB4TZInfKC1CaGsjnIImIo1pNPTIOw== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" @@ -5638,13 +5611,6 @@ which@^1.2.14, which@^1.2.9: dependencies: isexe "^2.0.0" -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - wide-align@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" @@ -5662,10 +5628,10 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workerpool@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" - integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== wrap-ansi@^2.0.0: version "2.1.0"