Browse Source

chore: migrate to @electron/lint-roller for Markdown linting (#38282)

chore: migrate to @electron/lint-roller for Markdown linting (#38191)
David Sanders 1 year ago
parent
commit
ff2dfe67c5
6 changed files with 91 additions and 598 deletions
  1. 1 25
      .markdownlint.json
  2. 4 10
      package.json
  3. 0 334
      script/lib/markdown.ts
  4. 0 177
      script/lint-docs-links.ts
  5. 0 21
      script/markdownlint-emd001.js
  6. 86 31
      yarn.lock

+ 1 - 25
.markdownlint.json

@@ -1,27 +1,3 @@
 {
-  "commands-show-output": false,
-  "first-line-h1": false,
-  "header-increment": false,
-  "line-length": {
-    "code_blocks": false,
-    "tables": false,
-    "stern": true,
-    "line_length": -1
-  },
-  "no-bare-urls": false,
-  "no-blanks-blockquote": false,
-  "no-duplicate-header": {
-    "allow_different_nesting": true
-  },
-  "no-emphasis-as-header": false,
-  "no-hard-tabs": {
-    "code_blocks": false
-  },
-  "no-space-in-emphasis": false,
-  "no-trailing-punctuation": false,
-  "no-trailing-spaces": {
-    "br_spaces": 0
-  },
-  "single-h1": false,
-  "no-inline-html": false
+  "extends": "@electron/lint-roller/configs/markdownlint.json"
 }

+ 4 - 10
package.json

@@ -5,11 +5,11 @@
   "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
   "devDependencies": {
     "@azure/storage-blob": "^12.9.0",
-    "@dsanders11/vscode-markdown-languageservice": "^0.3.0-alpha.4",
     "@electron/asar": "^3.2.1",
     "@electron/docs-parser": "^1.0.0",
     "@electron/fiddle-core": "^1.0.4",
     "@electron/github-app-auth": "^1.5.0",
+    "@electron/lint-roller": "^1.1.0",
     "@electron/typescript-definitions": "^8.10.0",
     "@octokit/rest": "^19.0.7",
     "@primer/octicons": "^10.0.0",
@@ -56,8 +56,6 @@
     "klaw": "^3.0.0",
     "lint": "^1.1.2",
     "lint-staged": "^10.2.11",
-    "markdownlint-cli": "^0.33.0",
-    "mdast-util-from-markdown": "^1.2.0",
     "minimist": "^1.2.6",
     "null-loader": "^4.0.0",
     "pre-flight": "^1.1.0",
@@ -74,10 +72,6 @@
     "ts-loader": "^8.0.2",
     "ts-node": "6.2.0",
     "typescript": "^4.5.5",
-    "unist-util-visit": "^4.1.1",
-    "vscode-languageserver": "^8.0.2",
-    "vscode-languageserver-textdocument": "^1.0.7",
-    "vscode-uri": "^3.0.6",
     "webpack": "^5.73.0",
     "webpack-cli": "^4.10.0",
     "wrapper-webpack-plugin": "^2.2.0"
@@ -96,8 +90,8 @@
     "lint:gn": "node ./script/lint.js --gn",
     "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdownlint",
     "lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
-    "lint:docs-relative-links": "ts-node script/lint-docs-links.ts",
-    "lint:markdownlint": "markdownlint -r ./script/markdownlint-emd001.js \"*.md\" \"docs/**/*.md\"",
+    "lint:docs-relative-links": "electron-lint-markdown-links --root docs \"**/*.md\"",
+    "lint:markdownlint": "electron-markdownlint \"*.md\" \"docs/**/*.md\"",
     "lint:js-in-markdown": "standard-markdown docs",
     "create-api-json": "node script/create-api-json.js",
     "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
@@ -142,7 +136,7 @@
     ],
     "docs/api/**/*.md": [
       "ts-node script/gen-filenames.ts",
-      "markdownlint --config .markdownlint.autofix.json --fix",
+      "electron-markdownlint --config .markdownlint.autofix.json --fix",
       "git add filenames.auto.gni"
     ],
     "{*.patch,.patches}": [

+ 0 - 334
script/lib/markdown.ts

@@ -1,334 +0,0 @@
-import * as fs from 'fs';
-import * as path from 'path';
-
-import * as MarkdownIt from 'markdown-it';
-import {
-  githubSlugifier,
-  resolveInternalDocumentLink,
-  ExternalHref,
-  FileStat,
-  HrefKind,
-  InternalHref,
-  IMdLinkComputer,
-  IMdParser,
-  ITextDocument,
-  IWorkspace,
-  MdLink,
-  MdLinkKind
-} from '@dsanders11/vscode-markdown-languageservice';
-import { Emitter, Range } from 'vscode-languageserver';
-import { TextDocument } from 'vscode-languageserver-textdocument';
-import { URI } from 'vscode-uri';
-
-import { findMatchingFiles } from './utils';
-
-import type { Definition, ImageReference, Link, LinkReference } from 'mdast';
-import type { fromMarkdown as FromMarkdownFunction } from 'mdast-util-from-markdown';
-import type { Node, Position } from 'unist';
-import type { visit as VisitFunction } from 'unist-util-visit';
-
-// Helper function to work around import issues with ESM modules and ts-node
-// eslint-disable-next-line no-new-func
-const dynamicImport = new Function('specifier', 'return import(specifier)');
-
-// Helper function from `vscode-markdown-languageservice` codebase
-function tryDecodeUri (str: string): string {
-  try {
-    return decodeURI(str);
-  } catch {
-    return str;
-  }
-}
-
-// Helper function from `vscode-markdown-languageservice` codebase
-function createHref (
-  sourceDocUri: URI,
-  link: string,
-  workspace: IWorkspace
-): ExternalHref | InternalHref | undefined {
-  if (/^[a-z-][a-z-]+:/i.test(link)) {
-    // Looks like a uri
-    return { kind: HrefKind.External, uri: URI.parse(tryDecodeUri(link)) };
-  }
-
-  const resolved = resolveInternalDocumentLink(sourceDocUri, link, workspace);
-  if (!resolved) {
-    return undefined;
-  }
-
-  return {
-    kind: HrefKind.Internal,
-    path: resolved.resource,
-    fragment: resolved.linkFragment
-  };
-}
-
-function positionToRange (position: Position): Range {
-  return {
-    start: {
-      character: position.start.column - 1,
-      line: position.start.line - 1
-    },
-    end: { character: position.end.column - 1, line: position.end.line - 1 }
-  };
-}
-
-const mdIt = MarkdownIt({ html: true });
-
-export class MarkdownParser implements IMdParser {
-  slugifier = githubSlugifier;
-
-  async tokenize (document: TextDocument) {
-    return mdIt.parse(document.getText(), {});
-  }
-}
-
-export class DocsWorkspace implements IWorkspace {
-  private readonly documentCache: Map<string, TextDocument>;
-  readonly root: string;
-
-  constructor (root: string) {
-    this.documentCache = new Map();
-    this.root = root;
-  }
-
-  get workspaceFolders () {
-    return [URI.file(this.root)];
-  }
-
-  async getAllMarkdownDocuments (): Promise<Iterable<ITextDocument>> {
-    const files = await findMatchingFiles(this.root, (file) =>
-      file.endsWith('.md')
-    );
-
-    for (const file of files) {
-      const document = TextDocument.create(
-        URI.file(file).toString(),
-        'markdown',
-        1,
-        fs.readFileSync(file, 'utf8')
-      );
-
-      this.documentCache.set(file, document);
-    }
-
-    return this.documentCache.values();
-  }
-
-  hasMarkdownDocument (resource: URI) {
-    const relativePath = path.relative(this.root, resource.path);
-    return (
-      !relativePath.startsWith('..') &&
-      !path.isAbsolute(relativePath) &&
-      fs.existsSync(resource.path)
-    );
-  }
-
-  async openMarkdownDocument (resource: URI) {
-    if (!this.documentCache.has(resource.path)) {
-      const document = TextDocument.create(
-        resource.toString(),
-        'markdown',
-        1,
-        fs.readFileSync(resource.path, 'utf8')
-      );
-
-      this.documentCache.set(resource.path, document);
-    }
-
-    return this.documentCache.get(resource.path);
-  }
-
-  async stat (resource: URI): Promise<FileStat | undefined> {
-    if (this.hasMarkdownDocument(resource)) {
-      const stats = fs.statSync(resource.path);
-      return { isDirectory: stats.isDirectory() };
-    }
-
-    return undefined;
-  }
-
-  async readDirectory (): Promise<Iterable<readonly [string, FileStat]>> {
-    throw new Error('Not implemented');
-  }
-
-  //
-  // These events are defined to fulfill the interface, but are never emitted
-  // by this implementation since it's not meant for watching a workspace
-  //
-
-  #onDidChangeMarkdownDocument = new Emitter<ITextDocument>();
-  onDidChangeMarkdownDocument = this.#onDidChangeMarkdownDocument.event;
-
-  #onDidCreateMarkdownDocument = new Emitter<ITextDocument>();
-  onDidCreateMarkdownDocument = this.#onDidCreateMarkdownDocument.event;
-
-  #onDidDeleteMarkdownDocument = new Emitter<URI>();
-  onDidDeleteMarkdownDocument = this.#onDidDeleteMarkdownDocument.event;
-}
-
-export class MarkdownLinkComputer implements IMdLinkComputer {
-  private readonly workspace: IWorkspace;
-
-  constructor (workspace: IWorkspace) {
-    this.workspace = workspace;
-  }
-
-  async getAllLinks (document: ITextDocument): Promise<MdLink[]> {
-    const { fromMarkdown } = (await dynamicImport(
-      'mdast-util-from-markdown'
-    )) as { fromMarkdown: typeof FromMarkdownFunction };
-
-    const tree = fromMarkdown(document.getText());
-
-    const links = [
-      ...(await this.#getInlineLinks(document, tree)),
-      ...(await this.#getReferenceLinks(document, tree)),
-      ...(await this.#getLinkDefinitions(document, tree))
-    ];
-
-    return links;
-  }
-
-  async #getInlineLinks (
-    document: ITextDocument,
-    tree: Node
-  ): Promise<MdLink[]> {
-    const { visit } = (await dynamicImport('unist-util-visit')) as {
-      visit: typeof VisitFunction;
-    };
-
-    const documentUri = URI.parse(document.uri);
-    const links: MdLink[] = [];
-
-    visit(
-      tree,
-      (node) => node.type === 'link',
-      (node: Node) => {
-        const link = node as Link;
-        const href = createHref(documentUri, link.url, this.workspace);
-
-        if (href) {
-          const range = positionToRange(link.position!);
-
-          // NOTE - These haven't been implemented properly, but their
-          //        values aren't used for the link linting use-case
-          const targetRange = range;
-          const hrefRange = range;
-          const fragmentRange = undefined;
-
-          links.push({
-            kind: MdLinkKind.Link,
-            href,
-            source: {
-              hrefText: link.url,
-              resource: documentUri,
-              range,
-              targetRange,
-              hrefRange,
-              fragmentRange,
-              pathText: link.url.split('#')[0]
-            }
-          });
-        }
-      }
-    );
-
-    return links;
-  }
-
-  async #getReferenceLinks (
-    document: ITextDocument,
-    tree: Node
-  ): Promise<MdLink[]> {
-    const { visit } = (await dynamicImport('unist-util-visit')) as {
-      visit: typeof VisitFunction;
-    };
-
-    const links: MdLink[] = [];
-
-    visit(
-      tree,
-      (node) => ['imageReference', 'linkReference'].includes(node.type),
-      (node: Node) => {
-        const link = node as ImageReference | LinkReference;
-        const range = positionToRange(link.position!);
-
-        // NOTE - These haven't been implemented properly, but their
-        //        values aren't used for the link linting use-case
-        const targetRange = range;
-        const hrefRange = range;
-
-        links.push({
-          kind: MdLinkKind.Link,
-          href: {
-            kind: HrefKind.Reference,
-            ref: link.label!
-          },
-          source: {
-            hrefText: link.label!,
-            resource: URI.parse(document.uri),
-            range,
-            targetRange,
-            hrefRange,
-            fragmentRange: undefined,
-            pathText: link.label!
-          }
-        });
-      }
-    );
-
-    return links;
-  }
-
-  async #getLinkDefinitions (
-    document: ITextDocument,
-    tree: Node
-  ): Promise<MdLink[]> {
-    const { visit } = (await dynamicImport('unist-util-visit')) as {
-      visit: typeof VisitFunction;
-    };
-
-    const documentUri = URI.parse(document.uri);
-    const links: MdLink[] = [];
-
-    visit(
-      tree,
-      (node) => node.type === 'definition',
-      (node: Node) => {
-        const definition = node as Definition;
-        const href = createHref(documentUri, definition.url, this.workspace);
-
-        if (href) {
-          const range = positionToRange(definition.position!);
-
-          // NOTE - These haven't been implemented properly, but their
-          //        values aren't used for the link linting use-case
-          const targetRange = range;
-          const hrefRange = range;
-          const fragmentRange = undefined;
-
-          links.push({
-            kind: MdLinkKind.Definition,
-            href,
-            ref: {
-              range,
-              text: definition.label!
-            },
-            source: {
-              hrefText: definition.url,
-              resource: documentUri,
-              range,
-              targetRange,
-              hrefRange,
-              fragmentRange,
-              pathText: definition.url.split('#')[0]
-            }
-          });
-        }
-      }
-    );
-
-    return links;
-  }
-}

+ 0 - 177
script/lint-docs-links.ts

@@ -1,177 +0,0 @@
-#!/usr/bin/env ts-node
-
-import * as path from 'path';
-
-import {
-  createLanguageService,
-  DiagnosticLevel,
-  DiagnosticOptions,
-  ILogger
-} from '@dsanders11/vscode-markdown-languageservice';
-import * as minimist from 'minimist';
-import fetch from 'node-fetch';
-import { CancellationTokenSource } from 'vscode-languageserver';
-import { URI } from 'vscode-uri';
-
-import {
-  DocsWorkspace,
-  MarkdownLinkComputer,
-  MarkdownParser
-} from './lib/markdown';
-
-class NoOpLogger implements ILogger {
-  log (): void {}
-}
-
-const diagnosticOptions: DiagnosticOptions = {
-  ignoreLinks: [],
-  validateDuplicateLinkDefinitions: DiagnosticLevel.error,
-  validateFileLinks: DiagnosticLevel.error,
-  validateFragmentLinks: DiagnosticLevel.error,
-  validateMarkdownFileLinkFragments: DiagnosticLevel.error,
-  validateReferences: DiagnosticLevel.error,
-  validateUnusedLinkDefinitions: DiagnosticLevel.error
-};
-
-async function fetchExternalLink (link: string, checkRedirects = false) {
-  try {
-    const response = await fetch(link);
-    if (response.status !== 200) {
-      console.log('Broken link', link, response.status, response.statusText);
-    } else {
-      if (checkRedirects && response.redirected) {
-        const wwwUrl = new URL(link);
-        wwwUrl.hostname = `www.${wwwUrl.hostname}`;
-
-        // For now cut down on noise to find meaningful redirects
-        const wwwRedirect = wwwUrl.toString() === response.url;
-        const trailingSlashRedirect = `${link}/` === response.url;
-
-        if (!wwwRedirect && !trailingSlashRedirect) {
-          console.log('Link redirection', link, '->', response.url);
-        }
-      }
-
-      return true;
-    }
-  } catch {
-    console.log('Broken link', link);
-  }
-
-  return false;
-}
-
-async function main ({ fetchExternalLinks = false, checkRedirects = false }) {
-  const workspace = new DocsWorkspace(path.resolve(__dirname, '..', 'docs'));
-  const parser = new MarkdownParser();
-  const linkComputer = new MarkdownLinkComputer(workspace);
-  const languageService = createLanguageService({
-    workspace,
-    parser,
-    logger: new NoOpLogger(),
-    linkComputer
-  });
-
-  const cts = new CancellationTokenSource();
-  let errors = false;
-
-  const externalLinks = new Set<string>();
-
-  try {
-    // Collect diagnostics for all documents in the workspace
-    for (const document of await workspace.getAllMarkdownDocuments()) {
-      for (let link of await languageService.getDocumentLinks(
-        document,
-        cts.token
-      )) {
-        if (link.target === undefined) {
-          link =
-            (await languageService.resolveDocumentLink(link, cts.token)) ??
-            link;
-        }
-
-        if (
-          link.target &&
-          link.target.startsWith('http') &&
-          new URL(link.target).hostname !== 'localhost'
-        ) {
-          externalLinks.add(link.target);
-        }
-      }
-      const diagnostics = await languageService.computeDiagnostics(
-        document,
-        diagnosticOptions,
-        cts.token
-      );
-
-      if (diagnostics.length) {
-        console.log(
-          'File Location:',
-          path.relative(workspace.root, URI.parse(document.uri).path)
-        );
-      }
-
-      for (const diagnostic of diagnostics) {
-        console.log(
-          `\tBroken link on line ${diagnostic.range.start.line + 1}:`,
-          diagnostic.message
-        );
-        errors = true;
-      }
-    }
-  } finally {
-    cts.dispose();
-  }
-
-  if (fetchExternalLinks) {
-    const externalLinkStates = await Promise.all(
-      Array.from(externalLinks).map((link) =>
-        fetchExternalLink(link, checkRedirects)
-      )
-    );
-
-    errors = errors || !externalLinkStates.every((x) => x);
-  }
-
-  return errors;
-}
-
-function parseCommandLine () {
-  const showUsage = (arg?: string): boolean => {
-    if (!arg || arg.startsWith('-')) {
-      console.log(
-        'Usage: script/lint-docs-links.ts [-h|--help] [--fetch-external-links] ' +
-          '[--check-redirects]'
-      );
-      process.exit(0);
-    }
-
-    return true;
-  };
-
-  const opts = minimist(process.argv.slice(2), {
-    boolean: ['help', 'fetch-external-links', 'check-redirects'],
-    stopEarly: true,
-    unknown: showUsage
-  });
-
-  if (opts.help) showUsage();
-
-  return opts;
-}
-
-if (process.mainModule === module) {
-  const opts = parseCommandLine();
-
-  main({
-    fetchExternalLinks: opts['fetch-external-links'],
-    checkRedirects: opts['check-redirects']
-  })
-    .then((errors) => {
-      if (errors) process.exit(1);
-    })
-    .catch((error) => {
-      console.error(error);
-      process.exit(1);
-    });
-}

+ 0 - 21
script/markdownlint-emd001.js

@@ -1,21 +0,0 @@
-const { addError, getLineMetadata, getReferenceLinkImageData } = require('markdownlint/helpers');
-
-module.exports = {
-  names: ['EMD001', 'no-shortcut-reference-links'],
-  description:
-    'Disallow shortcut reference links (those with no link label)',
-  tags: ['images', 'links'],
-  function: function EMD001 (params, onError) {
-    const lineMetadata = getLineMetadata(params);
-    const { shortcuts } = getReferenceLinkImageData(lineMetadata);
-    for (const [shortcut, occurrences] of shortcuts) {
-      for (const [lineNumber] of occurrences) {
-        addError(
-          onError,
-          lineNumber + 1, // human-friendly line numbers (1-based)
-          `Disallowed shortcut reference link: "${shortcut}"`
-        );
-      }
-    }
-  }
-};

+ 86 - 31
yarn.lock

@@ -111,10 +111,10 @@
   resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
   integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
 
-"@dsanders11/vscode-markdown-languageservice@^0.3.0-alpha.4":
-  version "0.3.0-alpha.4"
-  resolved "https://registry.yarnpkg.com/@dsanders11/vscode-markdown-languageservice/-/vscode-markdown-languageservice-0.3.0-alpha.4.tgz#cd80b82142a2c10e09b5f36a93c3ea65b7d2a7f9"
-  integrity sha512-MHp/CniEkzJb1CAw/bHwucuImaICrcIuohEFamTW8sJC2jhKCnbYblwJFZ3OOS3wTYZbzFIa8WZ4Dn5yL2E7jg==
+"@dsanders11/vscode-markdown-languageservice@^0.3.0":
+  version "0.3.0"
+  resolved "https://registry.yarnpkg.com/@dsanders11/vscode-markdown-languageservice/-/vscode-markdown-languageservice-0.3.0.tgz#18a561711609651371961b66db4cb8473ab25564"
+  integrity sha512-aFNWtK23dNicyLczBwIKkGUSVuMoZMzUovlwqj/hVZ3zRIBlXWYunByDxI67Pf1maA0TbxPjVfRqBQFALWjVHg==
   dependencies:
     "@vscode/l10n" "^0.0.10"
     picomatch "^2.3.1"
@@ -187,6 +187,23 @@
     "@octokit/auth-app" "^3.6.1"
     "@octokit/rest" "^18.12.0"
 
+"@electron/lint-roller@^1.1.0":
+  version "1.1.0"
+  resolved "https://registry.yarnpkg.com/@electron/lint-roller/-/lint-roller-1.1.0.tgz#2b2ce1c9275fb052109b53990f3136f56c1df7be"
+  integrity sha512-5fDjEi7lXLgF8vAAIhMz7empABSSGQ61saZpQMA/qrigKd1CCkz7Kq/FCtQ8P94FhthlEw/bNE+AUBsHgyrUIQ==
+  dependencies:
+    "@dsanders11/vscode-markdown-languageservice" "^0.3.0"
+    glob "^8.1.0"
+    markdown-it "^13.0.1"
+    markdownlint-cli "^0.33.0"
+    mdast-util-from-markdown "^1.3.0"
+    minimist "^1.2.8"
+    node-fetch "^2.6.9"
+    unist-util-visit "^4.1.2"
+    vscode-languageserver "^8.1.0"
+    vscode-languageserver-textdocument "^1.0.8"
+    vscode-uri "^3.0.7"
+
 "@electron/typescript-definitions@^8.10.0":
   version "8.10.0"
   resolved "https://registry.yarnpkg.com/@electron/typescript-definitions/-/typescript-definitions-8.10.0.tgz#e9cf2b329ec4b0b76947ef751725383a6cf8994d"
@@ -3183,6 +3200,17 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.3, glob@^7.1.6:
     once "^1.3.0"
     path-is-absolute "^1.0.0"
 
+glob@^8.1.0:
+  version "8.1.0"
+  resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e"
+  integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==
+  dependencies:
+    fs.realpath "^1.0.0"
+    inflight "^1.0.4"
+    inherits "2"
+    minimatch "^5.0.1"
+    once "^1.3.0"
+
 glob@~8.0.3:
   version "8.0.3"
   resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e"
@@ -4067,7 +4095,7 @@ make-error@^1.1.1:
   resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
   integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==
 
[email protected]:
[email protected], markdown-it@^13.0.1:
   version "13.0.1"
   resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430"
   integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q==
@@ -4146,10 +4174,10 @@ mdast-util-from-markdown@^1.0.0:
     parse-entities "^3.0.0"
     unist-util-stringify-position "^3.0.0"
 
-mdast-util-from-markdown@^1.2.0:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.2.0.tgz#84df2924ccc6c995dec1e2368b2b208ad0a76268"
-  integrity sha512-iZJyyvKD1+K7QX1b5jXdE7Sc5dtoTry1vzV28UZZe8Z1xVnB/czKntJ7ZAkG0tANqRnBF6p3p7GpU1y19DTf2Q==
+mdast-util-from-markdown@^1.3.0:
+  version "1.3.0"
+  resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.0.tgz#0214124154f26154a2b3f9d401155509be45e894"
+  integrity sha512-HN3W1gRIuN/ZW295c7zi7g9lVBllMgZE40RxCX37wrTPWXCWtpvOZdfnuK+1WNpvZje6XuJeI3Wnb4TJEUem+g==
   dependencies:
     "@types/mdast" "^3.0.0"
     "@types/unist" "^2.0.0"
@@ -4507,6 +4535,11 @@ minimist@^1.2.0:
   resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
   integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
 
+minimist@^1.2.8:
+  version "1.2.8"
+  resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
+  integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
+
 minipass@^3.0.0:
   version "3.3.6"
   resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a"
@@ -4602,6 +4635,13 @@ node-fetch@^2.6.7:
   dependencies:
     whatwg-url "^5.0.0"
 
+node-fetch@^2.6.9:
+  version "2.6.11"
+  resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.11.tgz#cde7fc71deef3131ef80a738919f999e6edfff25"
+  integrity sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==
+  dependencies:
+    whatwg-url "^5.0.0"
+
 node-releases@^2.0.6:
   version "2.0.6"
   resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
@@ -6867,10 +6907,10 @@ unist-util-visit@^2.0.0:
     unist-util-is "^4.0.0"
     unist-util-visit-parents "^3.0.0"
 
-unist-util-visit@^4.1.1:
-  version "4.1.1"
-  resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.1.tgz#1c4842d70bd3df6cc545276f5164f933390a9aad"
-  integrity sha512-n9KN3WV9k4h1DxYR1LoajgN93wpEi/7ZplVe02IoB4gH5ctI1AaF2670BLHQYbwj+pY83gFtyeySFiyMHJklrg==
+unist-util-visit@^4.1.2:
+  version "4.1.2"
+  resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.2.tgz#125a42d1eb876283715a3cb5cceaa531828c72e2"
+  integrity sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==
   dependencies:
     "@types/unist" "^2.0.0"
     unist-util-is "^5.0.0"
@@ -7031,41 +7071,56 @@ vfile@^5.0.0:
     unist-util-stringify-position "^3.0.0"
     vfile-message "^3.0.0"
 
-vscode-jsonrpc@8.0.2:
-  version "8.0.2"
-  resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz#f239ed2cd6004021b6550af9fd9d3e47eee3cac9"
-  integrity sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==
+vscode-jsonrpc@8.1.0:
+  version "8.1.0"
+  resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz#cb9989c65e219e18533cc38e767611272d274c94"
+  integrity sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==
 
[email protected].2:
-  version "3.17.2"
-  resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz#beaa46aea06ed061576586c5e11368a9afc1d378"
-  integrity sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==
[email protected].3:
+  version "3.17.3"
+  resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz#6d0d54da093f0c0ee3060b81612cce0f11060d57"
+  integrity sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==
   dependencies:
-    vscode-jsonrpc "8.0.2"
-    vscode-languageserver-types "3.17.2"
+    vscode-jsonrpc "8.1.0"
+    vscode-languageserver-types "3.17.3"
 
-vscode-languageserver-textdocument@^1.0.5, vscode-languageserver-textdocument@^1.0.7:
+vscode-languageserver-textdocument@^1.0.5:
   version "1.0.7"
   resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.7.tgz#16df468d5c2606103c90554ae05f9f3d335b771b"
   integrity sha512-bFJH7UQxlXT8kKeyiyu41r22jCZXG8kuuVVA33OEJn1diWOZK5n8zBSPZFHVBOu8kXZ6h0LIRhf5UnCo61J4Hg==
 
[email protected], vscode-languageserver-types@^3.17.1:
+vscode-languageserver-textdocument@^1.0.8:
+  version "1.0.8"
+  resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz#9eae94509cbd945ea44bca8dcfe4bb0c15bb3ac0"
+  integrity sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==
+
[email protected]:
+  version "3.17.3"
+  resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz#72d05e47b73be93acb84d6e311b5786390f13f64"
+  integrity sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==
+
+vscode-languageserver-types@^3.17.1:
   version "3.17.2"
   resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz#b2c2e7de405ad3d73a883e91989b850170ffc4f2"
   integrity sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==
 
-vscode-languageserver@^8.0.2:
-  version "8.0.2"
-  resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz#cfe2f0996d9dfd40d3854e786b2821604dfec06d"
-  integrity sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA==
+vscode-languageserver@^8.1.0:
+  version "8.1.0"
+  resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-8.1.0.tgz#5024253718915d84576ce6662dd46a791498d827"
+  integrity sha512-eUt8f1z2N2IEUDBsKaNapkz7jl5QpskN2Y0G01T/ItMxBxw1fJwvtySGB9QMecatne8jFIWJGWI61dWjyTLQsw==
   dependencies:
-    vscode-languageserver-protocol "3.17.2"
+    vscode-languageserver-protocol "3.17.3"
 
-vscode-uri@^3.0.3, vscode-uri@^3.0.6:
+vscode-uri@^3.0.3:
   version "3.0.6"
   resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.6.tgz#5e6e2e1a4170543af30151b561a41f71db1d6f91"
   integrity sha512-fmL7V1eiDBFRRnu+gfRWTzyPpNIHJTc4mWnFkwBUmO9U3KPgJAmTx7oxi2bl/Rh6HLdU7+4C9wlj0k2E4AdKFQ==
 
+vscode-uri@^3.0.7:
+  version "3.0.7"
+  resolved "https://registry.yarnpkg.com/vscode-uri/-/vscode-uri-3.0.7.tgz#6d19fef387ee6b46c479e5fb00870e15e58c1eb8"
+  integrity sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==
+
 walk-sync@^0.3.2:
   version "0.3.4"
   resolved "https://registry.yarnpkg.com/walk-sync/-/walk-sync-0.3.4.tgz#cf78486cc567d3a96b5b2237c6108017a5ffb9a4"