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}} name: ${{matrix.node}}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: ${{matrix.node}} node-version: ${{matrix.node}}
- run: npm install - run: npm install
- run: npm test - run: npm test
- uses: codecov/codecov-action@v3 - uses: codecov/codecov-action@v4
strategy: strategy:
matrix: matrix:
node: node:

View file

@ -46,16 +46,16 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
"c8": "^8.0.0", "c8": "^10.0.0",
"html-void-elements": "^3.0.0", "html-void-elements": "^3.0.0",
"micromark": "^4.0.0", "micromark": "^4.0.0",
"micromark-build": "^2.0.0", "micromark-build": "^2.0.0",
"prettier": "^3.0.0", "prettier": "^3.0.0",
"remark-cli": "^11.0.0", "remark-cli": "^12.0.0",
"remark-preset-wooorm": "^9.0.0", "remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0", "type-coverage": "^2.0.0",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"xo": "^0.56.0" "xo": "^0.58.0"
}, },
"scripts": { "scripts": {
"prepack": "npm run build && npm run format", "prepack": "npm run build && npm run format",
@ -99,9 +99,10 @@
], ],
"prettier": true, "prettier": true,
"rules": { "rules": {
"logical-assignment-operators": "off",
"max-params": "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 ## Contents
* [What is this?](#what-is-this) * [What is this?](#what-is-this)
* [When to use this](#when-to-use-this) * [When to use this](#when-to-use-this)
* [Install](#install) * [Install](#install)
* [Use](#use) * [Use](#use)
* [API](#api) * [API](#api)
* [`directive()`](#directive) * [`directive()`](#directive)
* [`directiveHtml(options?)`](#directivehtmloptions) * [`directiveHtml(options?)`](#directivehtmloptions)
* [`Directive`](#directive-1) * [`Directive`](#directive-1)
* [`Handle`](#handle) * [`Handle`](#handle)
* [`HtmlOptions`](#htmloptions) * [`HtmlOptions`](#htmloptions)
* [Authoring](#authoring) * [Authoring](#authoring)
* [HTML](#html) * [HTML](#html)
* [CSS](#css) * [CSS](#css)
* [Syntax](#syntax) * [Syntax](#syntax)
* [Types](#types) * [Types](#types)
* [Compatibility](#compatibility) * [Compatibility](#compatibility)
* [Security](#security) * [Security](#security)
* [Related](#related) * [Related](#related)
* [Contribute](#contribute) * [Contribute](#contribute)
* [License](#license) * [License](#license)
## What is this? ## What is this?
@ -155,8 +155,8 @@ HTML.
###### Parameters ###### Parameters
* `options` ([`HtmlOptions`][api-html-options], default: `{}`) * `options` ([`HtmlOptions`][api-html-options], default: `{}`)
— configuration — configuration
###### Returns ###### Returns
@ -170,16 +170,16 @@ Structure representing a directive (TypeScript type).
###### Fields ###### Fields
* `type` (`'containerDirective'`, `'leafDirective'`, or `'textDirective'`) * `type` (`'containerDirective'`, `'leafDirective'`, or `'textDirective'`)
— kind — kind
* `name` (`string`) * `name` (`string`)
— name of directive — name of directive
* `label` (`string` or `undefined`) * `label` (`string` or `undefined`)
— compiled HTML content that was in `[brackets]` — compiled HTML content that was in `[brackets]`
* `attributes` (`Record<string, string>` or `undefined`) * `attributes` (`Record<string, string>` or `undefined`)
— object w/ HTML attributes — object w/ HTML attributes
* `content` (`string` or `undefined`) * `content` (`string` or `undefined`)
— compiled HTML content inside container directive — compiled HTML content inside container directive
### `Handle` ### `Handle`
@ -187,10 +187,10 @@ Handle a directive (TypeScript type).
###### Parameters ###### Parameters
* `this` ([`CompileContext`][micromark-compile-context]) * `this` ([`CompileContext`][micromark-compile-context])
— current context — current context
* `directive` ([`Directive`][api-directive-type]) * `directive` ([`Directive`][api-directive-type])
— directive — directive
###### Returns ###### 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, Note that while other implementations are sometimes loose in what they allow,
this implementation mimics CommonMark as closely as possible: this implementation mimics CommonMark as closely as possible:
* Whitespace is not allowed between colons and name (~~`: a`~~), name and * Whitespace is not allowed between colons and name (~~`: a`~~), name and
label (~~`:a []`~~), name and attributes (~~`:a {}`~~), or label and label (~~`:a []`~~), name and attributes (~~`:a {}`~~), or label and
attributes (~~`:a[] {}`~~) — because its not allowed in links either attributes (~~`:a[] {}`~~) — because its not allowed in links either
(~~`[] ()`~~) (~~`[] ()`~~)
* No trailing colons allowed on the opening fence of a container * No trailing colons allowed on the opening fence of a container
(~~`:::a:::`~~) — because its not allowed in fenced code either (~~`:::a:::`~~) — because its not allowed in fenced code either
* The label and attributes in a leaf or container cannot include line endings * The label and attributes in a leaf or container cannot include line endings
(~~`::a[b\nc]`~~) — because its not allowed in fenced code either (~~`::a[b\nc]`~~) — because its not allowed in fenced code either
## Types ## Types
@ -325,10 +325,10 @@ Any vulnerability in your code could open you to a
## Related ## Related
* [`remark-directive`][remark-directive] * [`remark-directive`][remark-directive]
— remark plugin to support directives — remark plugin to support directives
* [`mdast-util-directive`][mdast-util-directive] * [`mdast-util-directive`][mdast-util-directive]
— mdast utility to support directives — mdast utility to support directives
## Contribute ## Contribute

View file

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