Skip to content

Commit

Permalink
Update dependencies related to unified
Browse files Browse the repository at this point in the history
This updates `load-plugin` as well as dependencies related to markdown
linting to the latest version.
  • Loading branch information
remcohaszing committed Apr 18, 2024
1 parent 2db6cac commit ea57a9a
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 143 deletions.
6 changes: 6 additions & 0 deletions .changeset/dry-pumas-begin.md
@@ -0,0 +1,6 @@
---
"@mdx-js/typescript-plugin": patch
"@mdx-js/language-server": patch
---

Update to `load-plugin` 6
54 changes: 26 additions & 28 deletions CONTRIBUTING.md
Expand Up @@ -33,32 +33,30 @@ bug or suggest a new feature before creating a pull request.

## Submitting an issue

* The issue tracker is for issues.
Use discussions for support
* Search the issue tracker (including closed issues) before opening a new
issue
* Ensure you’re using the latest version of our packages
* Use a clear and descriptive title
* Include as much information as possible: steps to reproduce the issue,
error message, version, operating system, etcetera
* The more time you put into an issue, the better we will be able to help you
* The best issue report is a [failing test][unit-test] proving it
* The issue tracker is for issues.
Use discussions for support
* Search the issue tracker (including closed issues) before opening a new issue
* Ensure you’re using the latest version of our packages
* Use a clear and descriptive title
* Include as much information as possible: steps to reproduce the issue, error
message, version, operating system, etcetera
* The more time you put into an issue, the better we will be able to help you
* The best issue report is a [failing test][unit-test] proving it

## Submitting a pull request

* See [¶ Project][project] below for info on how the project is structured,
how to test, and how to build the site
* Non-trivial changes are often best discussed in an issue first, to prevent
you from doing unnecessary work
* For ambitious tasks, you should try to get your work in front of the
community for feedback as soon as possible
* New features should be accompanied by tests and documentation
* For significant changes, add a [changeset][] using the `npx changeset`
command
* Don’t include unrelated changes
* Test before submitting code by running `npm test`
* Write a convincing description of why we should land your pull request:
it’s your job to convince us
* See [¶ Project][project] below for info on how the project is structured,
how to test, and how to build the site
* Non-trivial changes are often best discussed in an issue first, to prevent you
from doing unnecessary work
* For ambitious tasks, you should try to get your work in front of the community
for feedback as soon as possible
* New features should be accompanied by tests and documentation
* For significant changes, add a [changeset][] using the `npx changeset` command
* Don’t include unrelated changes
* Test before submitting code by running `npm test`
* Write a convincing description of why we should land your pull request:
it’s your job to convince us

## Project

Expand Down Expand Up @@ -95,11 +93,11 @@ Studio Code extension to the [marketplace][], and create GitHub releases.

## Resources

* [Good first issues in the MDX repository](https://github.com/mdx-js/mdx-analyzer/labels/good%20first%20issue%20👋)
* [How to contribute to open source](https://opensource.guide/how-to-contribute/)
* [Making your first contribution](https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190)
* [Using pull requests](https://help.github.com/articles/about-pull-requests/)
* [GitHub help](https://help.github.com)
* [Good first issues in the MDX repository](https://github.com/mdx-js/mdx-analyzer/labels/good%20first%20issue%20👋)
* [How to contribute to open source](https://opensource.guide/how-to-contribute/)
* [Making your first contribution](https://medium.com/@vadimdemedes/making-your-first-contribution-de6576ddb190)
* [Using pull requests](https://help.github.com/articles/about-pull-requests/)
* [GitHub help](https://help.github.com)

[changeset]: .changeset/README.md

Expand Down
32 changes: 16 additions & 16 deletions README.md
Expand Up @@ -10,27 +10,27 @@ This repository contains the code to provide editor tooling support for [MDX][].

## Contents

* [Workspaces](#workspaces)
* [Use](#use)
* [TypeScript](#typescript)
* [Plugins](#plugins)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
* [Workspaces](#workspaces)
* [Use](#use)
* [TypeScript](#typescript)
* [Plugins](#plugins)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)

## Workspaces

This repository contains the following workspaces:

* [`@mdx-js/language-service`][] provides utilities to integrate MDX into
[Volar][].
* [`@mdx-js/language-server`][] provides an MDX language server using the
[Language Server Protocol][].
* [`@mdx-js/typescript-plugin`][] provides a [TypeScript plugin][] to
integrate MDX in TypeScript editors.
* [`vscode-mdx`][] integrates the MDX language server into
[Visual Studio Code][], but also provides some Visual Studio Code specific
features such as syntax highlighting.
* [`@mdx-js/language-service`][] provides utilities to integrate MDX into
[Volar][].
* [`@mdx-js/language-server`][] provides an MDX language server using the
[Language Server Protocol][].
* [`@mdx-js/typescript-plugin`][] provides a [TypeScript plugin][] to integrate
MDX in TypeScript editors.
* [`vscode-mdx`][] integrates the MDX language server into
[Visual Studio Code][], but also provides some Visual Studio Code specific
features such as syntax highlighting.

## Use

Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -21,9 +21,9 @@
"prettier": "^3.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"remark-cli": "^11.0.0",
"remark-frontmatter": "^4.0.0",
"remark-preset-wooorm": "^9.0.0",
"remark-cli": "^12.0.0",
"remark-frontmatter": "^5.0.0",
"remark-preset-wooorm": "^10.0.0",
"typescript": "^5.0.0",
"xo": "^0.58.0"
},
Expand Down
103 changes: 52 additions & 51 deletions packages/language-server/README.md
Expand Up @@ -11,23 +11,23 @@ A [language server][lsp] for [MDX][].

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [Language server features](#language-server-features)
* [Initialize Options](#initialize-options)
* [Configuration](#configuration)
* [TypeScript](#typescript)
* [Plugins](#plugins)
* [Examples](#examples)
* [Visual Studio Code](#visual-studio-code)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [Changelog](#changelog)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [Language server features](#language-server-features)
* [Initialize Options](#initialize-options)
* [Configuration](#configuration)
* [TypeScript](#typescript)
* [Plugins](#plugins)
* [Examples](#examples)
* [Visual Studio Code](#visual-studio-code)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [Changelog](#changelog)
* [License](#license)

## What is this?

Expand Down Expand Up @@ -69,45 +69,46 @@ features specific to MDX.

MDX language server supports the following LSP initialization options:

* `typescript.enabled` (`boolean`, default: `false`) —
If true, enable TypeScript.
* `typescript.tsdk` (`string`, required) —
The path from which to load TypeScript.
* `locale` (`string`, optional) —
The locale to use for TypeScript error messages.
* `typescript.enabled` (`boolean`, default: `false`) —
If true, enable TypeScript.
* `typescript.tsdk` (`string`, required) —
The path from which to load TypeScript.
* `locale` (`string`, optional) —
The locale to use for TypeScript error messages.

### Configuration

MDX language server supports the following LSP configuration options:

* `mdx.trace.server.verbosity` (`"off"` | `"messages"` | `"compact"` |
`"verbose"`, default: `"off"`) —
Trace MDX language server requests in the output console.
* `mdx.trace.server.format` (`"text"` | `"json"`, default: `"text"`) —
How to format traced MDX language server requests.
* `mdx.validate.validateReferences` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for invalid reference links, e.g. `[text][no-such-ref]`.
* `mdx.validate.validateFragmentLinks` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for fragments links to headers in the current file that
don’t exist, e.g. `[text](#no-such-header)`
* `mdx.validate.validateFileLinks` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for links to local files that don’t exist, e.g.
`[text](./no-such-file.png)`.
* `mdx.validate.validateMarkdownFileLinkFragments` (`"ignore"` | `"hint"` |
`"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for the fragment part of links to other local markdown
files , e.g. `[text](./no-such-file.png)`.
* `mdx.validate.validateUnusedLinkDefinitions` (`"ignore"` | `"hint"` |
`"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for link definitions that aren’t used anywhere.
`[never-used]: http://example.com`.
* `mdx.validate.validateDuplicateLinkDefinitions` (`"ignore"` | `"hint"` | `"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for duplicate link definitions.
* `mdx.validate.ignoreLinks` (`Array<string>`, optional) —
Glob of links that should not be validated.
* `mdx.trace.server.verbosity` (`"off"` | `"messages"` | `"compact"` |
`"verbose"`, default: `"off"`) —
Trace MDX language server requests in the output console.
* `mdx.trace.server.format` (`"text"` | `"json"`, default: `"text"`) —
How to format traced MDX language server requests.
* `mdx.validate.validateReferences` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for invalid reference links, e.g. `[text][no-such-ref]`.
* `mdx.validate.validateFragmentLinks` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for fragments links to headers in the current file that don’t
exist, e.g. `[text](#no-such-header)`
* `mdx.validate.validateFileLinks` (`"ignore"` | `"hint"` | `"warning"` |
`"error"`, default: `"warning"`) —
Diagnostic level for links to local files that don’t exist, e.g.
`[text](./no-such-file.png)`.
* `mdx.validate.validateMarkdownFileLinkFragments` (`"ignore"` | `"hint"` |
`"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for the fragment part of links to other local markdown files,
e.g. `[text](./no-such-file.png)`.
* `mdx.validate.validateUnusedLinkDefinitions` (`"ignore"` | `"hint"` |
`"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for link definitions that aren’t used anywhere.
`[never-used]: http://example.com`.
* `mdx.validate.validateDuplicateLinkDefinitions` (`"ignore"` | `"hint"` |
`"warning"` | `"error"`, default: `"warning"`) —
Diagnostic level for duplicate link definitions.
* `mdx.validate.ignoreLinks` (`Array<string>`, optional) —
Glob of links that should not be validated.

### TypeScript

Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/package.json
Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@mdx-js/language-service": "0.5.4",
"@volar/language-server": "~2.1.0",
"load-plugin": "^5.0.0",
"load-plugin": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"volar-service-markdown": "0.0.34",
Expand Down
62 changes: 31 additions & 31 deletions packages/language-service/README.md
Expand Up @@ -12,21 +12,21 @@

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`createMdxLanguagePlugin([plugins][, checkMdx][, jsxImportSource])`](#createmdxlanguagepluginplugins-checkmdx-jsximportsource)
* [`createMdxServicePlugin()`](#createmdxserviceplugin)
* [`resolveRemarkPlugins(mdxConfig, resolvePlugin)`](#resolveremarkpluginsmdxconfig-resolveplugin)
* [Compatibility](#compatibility)
* [Types](#types)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [Changelog](#changelog)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`createMdxLanguagePlugin([plugins][, checkMdx][, jsxImportSource])`](#createmdxlanguagepluginplugins-checkmdx-jsximportsource)
* [`createMdxServicePlugin()`](#createmdxserviceplugin)
* [`resolveRemarkPlugins(mdxConfig, resolvePlugin)`](#resolveremarkpluginsmdxconfig-resolveplugin)
* [Compatibility](#compatibility)
* [Types](#types)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [Changelog](#changelog)
* [License](#license)

## What is this?

Expand Down Expand Up @@ -90,14 +90,14 @@ Create a [Volar][] language plugin to support [MDX][].

#### Parameters

* `plugins` ([`PluggableList`][pluggablelist], optional) —
A list of remark syntax plugins.
Only syntax plugins are supported.
Transformers are unused.
* `checkMdx` (`boolean`, default: `false`) —
If true, check MDX files strictly.
* `jsxImportSource` (`string`, default: `react`) —
The JSX import source to use in the embedded JavaScript file.
* `plugins` ([`PluggableList`][pluggablelist], optional) —
A list of remark syntax plugins.
Only syntax plugins are supported.
Transformers are unused.
* `checkMdx` (`boolean`, default: `false`) —
If true, check MDX files strictly.
* `jsxImportSource` (`string`, default: `react`) —
The JSX import source to use in the embedded JavaScript file.

#### Returns

Expand All @@ -108,10 +108,10 @@ A Volar language plugin to support MDX.
Create a [Volar][] service module to support [MDX][].
The service supports:

* Reporting diagnostics for parsing errors.
* Document drop support for images.
* Custom commands for toggling `delete`, `emphasis`, `inlineCode`, and
`strong` text.
* Reporting diagnostics for parsing errors.
* Document drop support for images.
* Custom commands for toggling `delete`, `emphasis`, `inlineCode`, and `strong`
text.

#### Parameters

Expand All @@ -127,10 +127,10 @@ Resolve remark plugins from TypeScript’s parsed command line options.

#### Parameters

* `mdxConfig` (`unknown`) —
The parsed command line options from which to resolve plugins.
* `resolvePlugin` (`Function`) —
A function which takes a plugin name, and resolvs it to a remark plugin.
* `mdxConfig` (`unknown`) —
The parsed command line options from which to resolve plugins.
* `resolvePlugin` (`Function`) —
A function which takes a plugin name, and resolvs it to a remark plugin.

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-plugin/package.json
Expand Up @@ -31,7 +31,7 @@
"dependencies": {
"@mdx-js/language-service": "0.5.4",
"@volar/typescript": "~2.1.0",
"load-plugin": "^5.0.0",
"load-plugin": "^6.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0"
},
Expand Down

0 comments on commit ea57a9a

Please sign in to comment.