Update dev-dependencies

This commit is contained in:
Titus Wormer 2024-07-05 17:13:22 +02:00
parent 7f23ba84fe
commit fdc0fa5291
No known key found for this signature in database
GPG key ID: E6E581152ED04E2E
4 changed files with 69 additions and 68 deletions

View file

@ -7,13 +7,13 @@ jobs:
name: ${{matrix.node}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
strategy:
matrix:
node:

View file

@ -46,16 +46,16 @@
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^10.0.0",
"html-void-elements": "^3.0.0",
"micromark": "^4.0.0",
"micromark-build": "^2.0.0",
"prettier": "^3.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
"xo": "^0.58.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
@ -99,9 +99,10 @@
],
"prettier": true,
"rules": {
"logical-assignment-operators": "off",
"max-params": "off",
"unicorn/prefer-at": "off",
"unicorn/no-this-assignment": "off"
"unicorn/no-this-assignment": "off",
"unicorn/prefer-at": "off"
}
}
}

View file

@ -13,26 +13,26 @@ such).
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`directive()`](#directive)
* [`directiveHtml(options?)`](#directivehtmloptions)
* [`Directive`](#directive-1)
* [`Handle`](#handle)
* [`HtmlOptions`](#htmloptions)
* [Authoring](#authoring)
* [HTML](#html)
* [CSS](#css)
* [Syntax](#syntax)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`directive()`](#directive)
* [`directiveHtml(options?)`](#directivehtmloptions)
* [`Directive`](#directive-1)
* [`Handle`](#handle)
* [`HtmlOptions`](#htmloptions)
* [Authoring](#authoring)
* [HTML](#html)
* [CSS](#css)
* [Syntax](#syntax)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
@ -155,8 +155,8 @@ HTML.
###### Parameters
* `options` ([`HtmlOptions`][api-html-options], default: `{}`)
— configuration
* `options` ([`HtmlOptions`][api-html-options], default: `{}`)
— configuration
###### Returns
@ -170,16 +170,16 @@ Structure representing a directive (TypeScript type).
###### Fields
* `type` (`'containerDirective'`, `'leafDirective'`, or `'textDirective'`)
— kind
* `name` (`string`)
— name of directive
* `label` (`string` or `undefined`)
— compiled HTML content that was in `[brackets]`
* `attributes` (`Record<string, string>` or `undefined`)
— object w/ HTML attributes
* `content` (`string` or `undefined`)
— compiled HTML content inside container directive
* `type` (`'containerDirective'`, `'leafDirective'`, or `'textDirective'`)
— kind
* `name` (`string`)
— name of directive
* `label` (`string` or `undefined`)
— compiled HTML content that was in `[brackets]`
* `attributes` (`Record<string, string>` or `undefined`)
— object w/ HTML attributes
* `content` (`string` or `undefined`)
— compiled HTML content inside container directive
### `Handle`
@ -187,10 +187,10 @@ Handle a directive (TypeScript type).
###### Parameters
* `this` ([`CompileContext`][micromark-compile-context])
— current context
* `directive` ([`Directive`][api-directive-type])
— directive
* `this` ([`CompileContext`][micromark-compile-context])
— current context
* `directive` ([`Directive`][api-directive-type])
— directive
###### Returns
@ -290,14 +290,14 @@ So this line is also part of the container.
Note that while other implementations are sometimes loose in what they allow,
this implementation mimics CommonMark as closely as possible:
* Whitespace is not allowed between colons and name (~~`: a`~~), name and
label (~~`:a []`~~), name and attributes (~~`:a {}`~~), or label and
attributes (~~`:a[] {}`~~) — because its not allowed in links either
(~~`[] ()`~~)
* No trailing colons allowed on the opening fence of a container
(~~`:::a:::`~~) — because its not allowed in fenced code either
* The label and attributes in a leaf or container cannot include line endings
(~~`::a[b\nc]`~~) — because its not allowed in fenced code either
* Whitespace is not allowed between colons and name (~~`: a`~~), name and
label (~~`:a []`~~), name and attributes (~~`:a {}`~~), or label and
attributes (~~`:a[] {}`~~) — because its not allowed in links either
(~~`[] ()`~~)
* No trailing colons allowed on the opening fence of a container
(~~`:::a:::`~~) — because its not allowed in fenced code either
* The label and attributes in a leaf or container cannot include line endings
(~~`::a[b\nc]`~~) — because its not allowed in fenced code either
## Types
@ -325,10 +325,10 @@ Any vulnerability in your code could open you to a
## Related
* [`remark-directive`][remark-directive]
— remark plugin to support directives
* [`mdast-util-directive`][mdast-util-directive]
— mdast utility to support directives
* [`remark-directive`][remark-directive]
— remark plugin to support directives
* [`mdast-util-directive`][mdast-util-directive]
— mdast utility to support directives
## Contribute

View file

@ -1678,10 +1678,10 @@ function abbr(d) {
* @type {Handle}
*/
function youtube(d) {
const attrs = d.attributes || {}
const v = attrs.v
const attributes = d.attributes || {}
const v = attributes.v
/** @type {string} */
let prop
let key
if (!v) return false
@ -1694,9 +1694,9 @@ function youtube(d) {
list.push('title="' + this.encode(d.label) + '"')
}
for (prop in attrs) {
if (prop !== 'v') {
list.push(this.encode(prop) + '="' + this.encode(attrs[prop]) + '"')
for (key in attributes) {
if (key !== 'v') {
list.push(this.encode(key) + '="' + this.encode(attributes[key]) + '"')
}
}
@ -1721,15 +1721,15 @@ function youtube(d) {
*/
function h(d) {
const content = d.content || d.label
const attrs = d.attributes || {}
const attributes = d.attributes || {}
/** @type {Array<string>} */
const list = []
/** @type {string} */
let prop
let key
for (prop in attrs) {
if (own.call(attrs, prop)) {
list.push(this.encode(prop) + '="' + this.encode(attrs[prop]) + '"')
for (key in attributes) {
if (own.call(attributes, key)) {
list.push(this.encode(key) + '="' + this.encode(attributes[key]) + '"')
}
}