Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Apr 10, 2024
1 parent 6e0a70b commit 95a6156
Show file tree
Hide file tree
Showing 10 changed files with 639 additions and 502 deletions.
730 changes: 435 additions & 295 deletions doc/plugins.md

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions package.json
Expand Up @@ -19,23 +19,20 @@
"devDependencies": {
"@types/mdast": "^4.0.0",
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^9.0.0",
"mdast-util-gfm": "^3.0.0",
"micromark-extension-gfm": "^3.0.0",
"prettier": "^3.0.0",
"remark-preset-wooorm": "^9.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"unified": "^11.0.0",
"unist-util-remove-position": "^5.0.0",
"vfile": "^6.0.0",
"xo": "^0.56.0"
"xo": "^0.58.0"
},
"#": "to do: remove `vfile` above when dust settles, it’s not needed, other that for TS build bugs currently",
"scripts": {
"#": "./packages/remark-cli/cli.js . --frail --output --quiet",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "prettier . --log-level warn --write && xo --fix",
"format": "./packages/remark-cli/cli.js . --frail --output --quiet && prettier . --log-level warn --write && xo --fix",
"prepack": "npm run build && npm run format",
"test": "npm run build && npm run format && npm run test-coverage",
"test-api": "node --conditions development test.js",
Expand Down
14 changes: 7 additions & 7 deletions packages/remark-cli/cli.js
Expand Up @@ -14,7 +14,7 @@ import {remark} from 'remark'
import {args} from 'unified-args'

/** @type {Pack} */
const proc = JSON.parse(
const process_ = JSON.parse(
String(
await fs.readFile(
new URL('package.json', resolve('remark', import.meta.url))
Expand All @@ -30,14 +30,14 @@ const cli = JSON.parse(
args({
description: cli.description,
extensions: markdownExtensions,
ignoreName: '.' + proc.name + 'ignore',
name: proc.name,
packageField: proc.name + 'Config',
pluginPrefix: proc.name,
ignoreName: '.' + process_.name + 'ignore',
name: process_.name,
packageField: process_.name + 'Config',
pluginPrefix: process_.name,
processor: remark,
rcName: '.' + proc.name + 'rc',
rcName: '.' + process_.name + 'rc',
version: [
proc.name + ': ' + proc.version,
process_.name + ': ' + process_.version,
cli.name + ': ' + cli.version
].join(', ')
})
58 changes: 29 additions & 29 deletions packages/remark-cli/readme.md
Expand Up @@ -11,19 +11,19 @@ Command line interface to inspect and change markdown files with **[remark][]**.

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [CLI](#cli)
* [Examples](#examples)
* [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli)
* [Example: config files (JSON, YAML, JS)](#example-config-files-json-yaml-js)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [CLI](#cli)
* [Examples](#examples)
* [Example: checking and formatting markdown on the CLI](#example-checking-and-formatting-markdown-on-the-cli)
* [Example: config files (JSON, YAML, JS)](#example-config-files-json-yaml-js)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)

## What is this?

Expand Down Expand Up @@ -122,14 +122,14 @@ More info on all these options is available at [`unified-args`][unified-args],
which does the work.
`remark-cli` is `unified-args` preconfigured to:

* load `remark-` plugins
* search for markdown extensions
([`.md`, `.markdown`, etc][markdown-extensions])
* ignore paths found in [`.remarkignore` files][ignore-file]
* load configuration from
[`.remarkrc`, `.remarkrc.js`, etc files][config-file]
* use configuration from
[`remarkConfig` fields in `package.json` files][config-file]
* load `remark-` plugins
* search for markdown extensions
([`.md`, `.markdown`, etc][markdown-extensions])
* ignore paths found in [`.remarkignore` files][ignore-file]
* load configuration from
[`.remarkrc`, `.remarkrc.js`, etc files][config-file]
* use configuration from
[`remarkConfig` fields in `package.json` files][config-file]

## Examples

Expand Down Expand Up @@ -268,14 +268,14 @@ The order of precedence is as follows.
Earlier wins (so in the above file structure `folder/.remarkrc.js` wins over
`folder/package.json`):

1. `.remarkrc` (JSON)
3. `.remarkrc.cjs` (CJS)
5. `.remarkrc.js` (CJS or ESM, depending on `type: 'module'` in `package.json`)
2. `.remarkrc.json` (JSON)
4. `.remarkrc.mjs` (ESM)
6. `.remarkrc.yaml` (YAML)
7. `.remarkrc.yml` (YAML)
8. `package.json` with `remarkConfig` field
1. `.remarkrc` (JSON)
2. `.remarkrc.cjs` (CJS)
3. `.remarkrc.js` (CJS or ESM, depending on `type: 'module'` in `package.json`)
4. `.remarkrc.json` (JSON)
5. `.remarkrc.mjs` (ESM)
6. `.remarkrc.yaml` (YAML)
7. `.remarkrc.yml` (YAML)
8. `package.json` with `remarkConfig` field

## Compatibility

Expand Down
4 changes: 2 additions & 2 deletions packages/remark-parse/lib/index.js
Expand Up @@ -29,8 +29,8 @@ export default function remarkParse(options) {
/**
* @type {Parser}
*/
function parser(doc) {
return fromMarkdown(doc, {
function parser(document) {
return fromMarkdown(document, {
...self.data('settings'),
...options,
// Note: these options are not in the readme.
Expand Down
34 changes: 17 additions & 17 deletions packages/remark-parse/readme.md
Expand Up @@ -12,23 +12,23 @@

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(remarkParse)`](#unifieduseremarkparse)
* [Examples](#examples)
* [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter)
* [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(remarkParse)`](#unifieduseremarkparse)
* [Examples](#examples)
* [Example: support GFM and frontmatter](#example-support-gfm-and-frontmatter)
* [Example: turning markdown into a man page](#example-turning-markdown-into-a-man-page)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)

## What is this?

Expand Down
140 changes: 71 additions & 69 deletions packages/remark-stringify/readme.md
Expand Up @@ -12,19 +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)
* [`unified().use(remarkStringify[, options])`](#unifieduseremarkstringify-options)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`unified().use(remarkStringify[, options])`](#unifieduseremarkstringify-options)
* [`Options`](#options)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)

## What is this?

Expand Down Expand Up @@ -125,8 +127,8 @@ Add support for serializing to markdown.

###### Parameters

* `options` ([`Options`][api-options], optional)
— configuration
* `options` ([`Options`][api-options], optional)
— configuration

###### Returns

Expand All @@ -138,60 +140,60 @@ Configuration (TypeScript type).

###### Fields

* `bullet` (`'*'`, `'+'`, or `'-'`, default: `'*'`)
— marker to use for bullets of items in unordered lists
* `bulletOther` (`'*'`, `'+'`, or `'-'`, default: `'-'` when `bullet` is
`'*'`, `'*'` otherwise)
— marker to use in certain cases where the primary bullet doesn’t work;
cannot be equal to `bullet`
* `bulletOrdered` (`'.'` or `')'`, default: `'.'`)
— marker to use for bullets of items in ordered lists
* `closeAtx` (`boolean`, default: `false`)
— add the same number of number signs (`#`) at the end of an ATX heading as
the opening sequence
* `emphasis` (`'*'` or `'_'`, default: `'*'`)
— marker to use for emphasis
* `fence` (``'`'`` or `'~'`, default: ``'`'``)
— marker to use for fenced code
* `fences` (`boolean`, default: `true`)
— use fenced code always; when `false`, uses fenced code if there is a
language defined, if the code is empty, or if it starts or ends in blank
lines
* `handlers` (`Handlers`, optional)
— handle particular nodes;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info
* `incrementListMarker` (`boolean`, default: `true`)
— increment the counter of ordered lists items
* `join` (`Array<Join>`, optional)
— how to join blocks;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info
* `listItemIndent` (`'mixed'`, `'one'`, or `'tab'`, default: `'one'`)
— how to indent the content of list items;
either with the size of the bullet plus one space (when `'one'`), a tab
stop (`'tab'`), or depending on the item and its parent list: `'mixed'`
uses `'one'` if the item and list are tight and `'tab'` otherwise
* `quote` (`'"'` or `"'"`, default: `'"'`)
— marker to use for titles
* `resourceLink` (`boolean`, default: `false`)
— always use resource links (`[text](url)`);
when `false`, uses autolinks (`<https://example.com>`) when possible
* `rule` (`'*'`, `'-'`, or `'_'`, default: `'*'`)
— marker to use for thematic breaks
* `ruleRepetition` (`number`, default: `3`, min: `3`)
— number of markers to use for thematic breaks
* `ruleSpaces` (`boolean`, default: `false`)
— add spaces between markers in thematic breaks
* `setext` (`boolean`, default: `false`)
— use setext headings when possible;
when `true`, uses setext headings (`heading\n=======`) for non-empty rank 1
or 2 headings
* `strong` (`'*'` or `'_'`, default: `'*'`)
— marker to use for strong
* `tightDefinitions` (`boolean`, default: `false`)
— join definitions without a blank line
* `unsafe` (`Array<Unsafe>`, optional)
— schemas that define when characters cannot occur;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info
* `bullet` (`'*'`, `'+'`, or `'-'`, default: `'*'`)
— marker to use for bullets of items in unordered lists
* `bulletOther` (`'*'`, `'+'`, or `'-'`, default: `'-'` when `bullet` is
`'*'`, `'*'` otherwise)
— marker to use in certain cases where the primary bullet doesn’t work;
cannot be equal to `bullet`
* `bulletOrdered` (`'.'` or `')'`, default: `'.'`)
— marker to use for bullets of items in ordered lists
* `closeAtx` (`boolean`, default: `false`)
— add the same number of number signs (`#`) at the end of an ATX heading as
the opening sequence
* `emphasis` (`'*'` or `'_'`, default: `'*'`)
— marker to use for emphasis
* `fence` (``'`'`` or `'~'`, default: ``'`'``)
— marker to use for fenced code
* `fences` (`boolean`, default: `true`)
— use fenced code always; when `false`, uses fenced code if there is a
language defined, if the code is empty, or if it starts or ends in blank
lines
* `handlers` (`Handlers`, optional)
— handle particular nodes;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info
* `incrementListMarker` (`boolean`, default: `true`)
— increment the counter of ordered lists items
* `join` (`Array<Join>`, optional)
— how to join blocks;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info
* `listItemIndent` (`'mixed'`, `'one'`, or `'tab'`, default: `'one'`)
— how to indent the content of list items;
either with the size of the bullet plus one space (when `'one'`), a tab
stop (`'tab'`), or depending on the item and its parent list: `'mixed'`
uses `'one'` if the item and list are tight and `'tab'` otherwise
* `quote` (`'"'` or `"'"`, default: `'"'`)
— marker to use for titles
* `resourceLink` (`boolean`, default: `false`)
— always use resource links (`[text](url)`);
when `false`, uses autolinks (`<https://example.com>`) when possible
* `rule` (`'*'`, `'-'`, or `'_'`, default: `'*'`)
— marker to use for thematic breaks
* `ruleRepetition` (`number`, default: `3`, min: `3`)
— number of markers to use for thematic breaks
* `ruleSpaces` (`boolean`, default: `false`)
— add spaces between markers in thematic breaks
* `setext` (`boolean`, default: `false`)
— use setext headings when possible;
when `true`, uses setext headings (`heading\n=======`) for non-empty rank 1
or 2 headings
* `strong` (`'*'` or `'_'`, default: `'*'`)
— marker to use for strong
* `tightDefinitions` (`boolean`, default: `false`)
— join definitions without a blank line
* `unsafe` (`Array<Unsafe>`, optional)
— schemas that define when characters cannot occur;
see [`mdast-util-to-markdown`][mdast-util-to-markdown] for more info

<!-- Note: `extensions` intentionally not supported/documented. -->

Expand Down
34 changes: 17 additions & 17 deletions packages/remark/readme.md
Expand Up @@ -13,23 +13,23 @@ serializing to markdown.

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`remark()`](#remark-1)
* [Examples](#examples)
* [Example: checking markdown](#example-checking-markdown)
* [Example: passing options to `remark-stringify`](#example-passing-options-to-remark-stringify)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`remark()`](#remark-1)
* [Examples](#examples)
* [Example: checking markdown](#example-checking-markdown)
* [Example: passing options to `remark-stringify`](#example-passing-options-to-remark-stringify)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [Sponsor](#sponsor)
* [License](#license)

## What is this?

Expand Down

0 comments on commit 95a6156

Please sign in to comment.