Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Oct 26, 2023
1 parent 2e27c06 commit 763af0b
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 127 deletions.
4 changes: 3 additions & 1 deletion dev/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ export function fromMarkdown(value, encoding, options) {

return compiler(options)(
postprocess(
parse(options).document().write(preprocess()(value, encoding, true))
parse(options)
.document()
.write(preprocess()(value, encoding, true))
)
)
}
Expand Down
32 changes: 22 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,25 @@
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"commonmark.json": "^0.30.0",
"esbuild": "^0.18.0",
"esbuild": "^0.19.0",
"gzip-size-cli": "^5.0.0",
"hast-util-from-html": "^1.0.0",
"hast-util-to-html": "^8.0.0",
"mdast-util-to-hast": "^12.0.0",
"hast-util-from-html": "^2.0.0",
"hast-util-to-html": "^9.0.0",
"mdast-util-to-hast": "^13.0.0",
"micromark-build": "^2.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-gfm": "^4.0.0",
"remark-preset-wooorm": "^9.0.0",
"terser": "^5.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.54.0"
"xo": "^0.56.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage && micromark-build && esbuild . --bundle --minify | terser | gzip-size --raw",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
"test-api-dev": "node --conditions development test/index.js",
"test-api-prod": "node --conditions production test/index.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
Expand All @@ -90,7 +91,16 @@
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
"remark-preset-wooorm",
[
"remark-preset-wooorm/node_modules/remark-gfm/index.js",
false
],
[
"remark-lint-list-item-indent",
"space"
],
"remark-gfm"
]
},
"typeCoverage": {
Expand All @@ -117,7 +127,9 @@
"prettier": true,
"rules": {
"complexity": "off",
"max-depth": "off"
"max-depth": "off",
"unicorn/prefer-at": "off",
"unicorn/prefer-string-replace-all": "off"
}
}
}
232 changes: 116 additions & 116 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@

## Contents

* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`fromMarkdown(value[, encoding][, options])`](#frommarkdownvalue-encoding-options)
* [`CompileContext`](#compilecontext)
* [`CompileData`](#compiledata)
* [`Encoding`](#encoding)
* [`Extension`](#extension)
* [`Handle`](#handle)
* [`OnEnterError`](#onentererror)
* [`OnExitError`](#onexiterror)
* [`Options`](#options)
* [`Token`](#token)
* [`Transform`](#transform)
* [`Value`](#value)
* [List of extensions](#list-of-extensions)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`fromMarkdown(value[, encoding][, options])`](#frommarkdownvalue-encoding-options)
* [`CompileContext`](#compilecontext)
* [`CompileData`](#compiledata)
* [`Encoding`](#encoding)
* [`Extension`](#extension)
* [`Handle`](#handle)
* [`OnEnterError`](#onentererror)
* [`OnExitError`](#onexiterror)
* [`Options`](#options)
* [`Token`](#token)
* [`Transform`](#transform)
* [`Value`](#value)
* [List of extensions](#list-of-extensions)
* [Syntax](#syntax)
* [Syntax tree](#syntax-tree)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)

## What is this?

Expand Down Expand Up @@ -142,18 +142,18 @@ Turn markdown into a syntax tree.

###### Overloads

* `(value: Value, encoding: Encoding, options?: Options) => Root`
* `(value: Value, options?: Options) => Root`
* `(value: Value, encoding: Encoding, options?: Options) => Root`
* `(value: Value, options?: Options) => Root`

###### Parameters

* `value` ([`Value`][api-value])
— markdown to parse
* `encoding` ([`Encoding`][api-encoding], default: `'utf8'`)
[character encoding][encoding] for when `value` is
[`Uint8Array`][uint8-array]
* `options` ([`Options`][api-options], optional)
— configuration
* `value` ([`Value`][api-value])
— markdown to parse
* `encoding` ([`Encoding`][api-encoding], default: `'utf8'`)
[character encoding][encoding] for when `value` is
[`Uint8Array`][uint8-array]
* `options` ([`Options`][api-options], optional)
— configuration

###### Returns

Expand All @@ -165,24 +165,24 @@ mdast compiler context (TypeScript type).

###### Fields

* `stack` ([`Array<Node>`][node])
— stack of nodes
* `tokenStack` (`Array<[Token, OnEnterError | undefined]>`)
— stack of tokens
* `data` ([`CompileData`][api-compile-data])
— info passed around; key/value store
* `buffer` (`() => undefined`)
— capture some of the output data
* `resume` (`() => string`)
— stop capturing and access the output data
* `enter` (`(node: Node, token: Token, onError?: OnEnterError) => undefined`)
— enter a node
* `exit` (`(token: Token, onError?: OnExitError) => undefined`)
— exit a node
* `sliceSerialize` (`(token: Token, expandTabs?: boolean) => string`)
— get the string value of a token
* `config` (`Required<Extension>`)
— configuration
* `stack` ([`Array<Node>`][node])
— stack of nodes
* `tokenStack` (`Array<[Token, OnEnterError | undefined]>`)
— stack of tokens
* `data` ([`CompileData`][api-compile-data])
— info passed around; key/value store
* `buffer` (`() => undefined`)
— capture some of the output data
* `resume` (`() => string`)
— stop capturing and access the output data
* `enter` (`(node: Node, token: Token, onError?: OnEnterError) => undefined`)
— enter a node
* `exit` (`(token: Token, onError?: OnExitError) => undefined`)
— exit a node
* `sliceSerialize` (`(token: Token, expandTabs?: boolean) => string`)
— get the string value of a token
* `config` (`Required<Extension>`)
— configuration

### `CompileData`

Expand Down Expand Up @@ -225,25 +225,25 @@ type).
###### Properties
* `canContainEols` (`Array<string>`, optional)
— token types where line endings are used
* `enter` ([`Record<string, Handle>`][api-handle], optional)
— opening handles
* `exit` ([`Record<string, Handle>`][api-handle], optional)
— closing handles
* `transforms` ([`Array<Transform>`][api-transform], optional)
— tree transforms
* `canContainEols` (`Array<string>`, optional)
— token types where line endings are used
* `enter` ([`Record<string, Handle>`][api-handle], optional)
— opening handles
* `exit` ([`Record<string, Handle>`][api-handle], optional)
— closing handles
* `transforms` ([`Array<Transform>`][api-transform], optional)
— tree transforms
### `Handle`
Handle a token (TypeScript type).
###### Parameters
* `this` ([`CompileContext`][api-compile-context])
— context
* `token` ([`Token`][api-token])
— current token
* `this` ([`CompileContext`][api-compile-context])
— context
* `token` ([`Token`][api-token])
— current token
###### Returns
Expand All @@ -256,12 +256,12 @@ Handle the case where the `right` token is open, but it is closed (by the
###### Parameters
* `this` ([`CompileContext`][api-compile-context])
— context
* `left` ([`Token`][api-token] or `undefined`)
— left token
* `right` ([`Token`][api-token])
— right token
* `this` ([`CompileContext`][api-compile-context])
— context
* `left` ([`Token`][api-token] or `undefined`)
— left token
* `right` ([`Token`][api-token])
— right token
###### Returns
Expand All @@ -274,12 +274,12 @@ exiting the `left` token (TypeScript type).
###### Parameters
* `this` ([`CompileContext`][api-compile-context])
— context
* `left` ([`Token`][api-token])
— left token
* `right` ([`Token`][api-token])
— right token
* `this` ([`CompileContext`][api-compile-context])
— context
* `left` ([`Token`][api-token])
— left token
* `right` ([`Token`][api-token])
— right token
###### Returns
Expand All @@ -291,11 +291,11 @@ Configuration (TypeScript type).
###### Properties
* `extensions` ([`Array<MicromarkExtension>`][micromark-extension], optional)
— micromark extensions to change how markdown is parsed
* `mdastExtensions` ([`Array<Extension | Array<Extension>>`][api-extension],
optional)
— extensions for this utility to change how tokens are turned into a tree
* `extensions` ([`Array<MicromarkExtension>`][micromark-extension], optional)
— micromark extensions to change how markdown is parsed
* `mdastExtensions` ([`Array<Extension | Array<Extension>>`][api-extension],
optional)
— extensions for this utility to change how tokens are turned into a tree
### `Token`
Expand All @@ -313,8 +313,8 @@ Extra transform, to change the AST afterwards (TypeScript type).
###### Parameters
* `tree` ([`Root`][root])
— tree to transform
* `tree` ([`Root`][root])
— tree to transform
###### Returns
Expand All @@ -334,32 +334,32 @@ type Value = Uint8Array | string
## List of extensions
* [`syntax-tree/mdast-util-directive`](https://github.com/syntax-tree/mdast-util-directive)
— directives
* [`syntax-tree/mdast-util-frontmatter`](https://github.com/syntax-tree/mdast-util-frontmatter)
— frontmatter (YAML, TOML, more)
* [`syntax-tree/mdast-util-gfm`](https://github.com/syntax-tree/mdast-util-gfm)
— GFM
* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
— GFM autolink literals
* [`syntax-tree/mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)
— GFM footnotes
* [`syntax-tree/mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
— GFM strikethrough
* [`syntax-tree/mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)
— GFM tables
* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
— GFM task list items
* [`syntax-tree/mdast-util-math`](https://github.com/syntax-tree/mdast-util-math)
— math
* [`syntax-tree/mdast-util-mdx`](https://github.com/syntax-tree/mdast-util-mdx)
— MDX
* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)
— MDX expressions
* [`syntax-tree/mdast-util-mdx-jsx`](https://github.com/syntax-tree/mdast-util-mdx-jsx)
— MDX JSX
* [`syntax-tree/mdast-util-mdxjs-esm`](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
— MDX ESM
* [`syntax-tree/mdast-util-directive`](https://github.com/syntax-tree/mdast-util-directive)
— directives
* [`syntax-tree/mdast-util-frontmatter`](https://github.com/syntax-tree/mdast-util-frontmatter)
— frontmatter (YAML, TOML, more)
* [`syntax-tree/mdast-util-gfm`](https://github.com/syntax-tree/mdast-util-gfm)
— GFM
* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
— GFM autolink literals
* [`syntax-tree/mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)
— GFM footnotes
* [`syntax-tree/mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
— GFM strikethrough
* [`syntax-tree/mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)
— GFM tables
* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
— GFM task list items
* [`syntax-tree/mdast-util-math`](https://github.com/syntax-tree/mdast-util-math)
— math
* [`syntax-tree/mdast-util-mdx`](https://github.com/syntax-tree/mdast-util-mdx)
— MDX
* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)
— MDX expressions
* [`syntax-tree/mdast-util-mdx-jsx`](https://github.com/syntax-tree/mdast-util-mdx-jsx)
— MDX JSX
* [`syntax-tree/mdast-util-mdxjs-esm`](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
— MDX ESM
## Syntax
Expand Down Expand Up @@ -407,12 +407,12 @@ When going to HTML, use this utility in combination with
## Related
* [`syntax-tree/mdast-util-to-markdown`](https://github.com/syntax-tree/mdast-util-to-markdown)
— serialize mdast as markdown
* [`micromark/micromark`](https://github.com/micromark/micromark)
— parse markdown
* [`remarkjs/remark`](https://github.com/remarkjs/remark)
— process markdown
* [`syntax-tree/mdast-util-to-markdown`](https://github.com/syntax-tree/mdast-util-to-markdown)
— serialize mdast as markdown
* [`micromark/micromark`](https://github.com/micromark/micromark)
— parse markdown
* [`remarkjs/remark`](https://github.com/remarkjs/remark)
— process markdown
## Contribute
Expand Down

0 comments on commit 763af0b

Please sign in to comment.