Skip to content

Commit 112c828

Browse files
committed
Update dev-dependencies
1 parent 96f7515 commit 112c828

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
* @typedef {import('hast').Comment} HastComment
77
* @typedef {import('hast').Text} HastText
88
* @typedef {import('hast').Properties[string]} HastPropertyValue
9-
* @typedef {import('property-information').html['property'][string]} Info
9+
* @typedef {import('property-information').Info} Info
10+
* @typedef {import('property-information').Schema} Schema
1011
* @typedef {import('xast').Root} BaseXastRoot
1112
* @typedef {import('xast').Element} XastElement
1213
* @typedef {import('xast').Text} XastText
@@ -22,7 +23,6 @@
2223
* @typedef Options
2324
* @property {Space} [space]
2425
*
25-
* @typedef {html|svg} Schema
2626
* @typedef {webNamespaces[Space]} Namespace
2727
*
2828
* @typedef Context
@@ -139,10 +139,8 @@ function element(node, parentConfig) {
139139
}
140140

141141
/** @type {Context} */
142-
const config = Object.assign({}, parentConfig, {
143-
schema,
144-
ns: schema.space ? ns[schema.space] : undefined
145-
})
142+
// @ts-expect-error: `schema.space` is set because html, svg have it set.
143+
const config = Object.assign({}, parentConfig, {schema, ns: ns[schema.space]})
146144

147145
if (parentConfig.ns !== config.ns) {
148146
attributes.xmlns = config.ns

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"devDependencies": {
4848
"@types/tape": "^4.0.0",
4949
"c8": "^7.0.0",
50-
"hastscript": "^6.0.0",
50+
"hastscript": "^7.0.0",
5151
"prettier": "^2.0.0",
5252
"remark-cli": "^9.0.0",
5353
"remark-preset-wooorm": "^8.0.0",
@@ -56,7 +56,7 @@
5656
"type-coverage": "^2.0.0",
5757
"typescript": "^4.0.0",
5858
"unist-builder": "^3.0.0",
59-
"xastscript": "^2.0.0",
59+
"xastscript": "^3.0.0",
6060
"xo": "^0.39.0"
6161
},
6262
"scripts": {

test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import test from 'tape'
22
import {webNamespaces as ns} from 'web-namespaces'
33
import {u} from 'unist-builder'
4-
import h from 'hastscript'
5-
import s from 'hastscript/svg.js'
6-
import x from 'xastscript'
4+
import {h, s} from 'hastscript'
5+
import {x} from 'xastscript'
76
import {toXast} from './index.js'
87

98
test('toXast', (t) => {

0 commit comments

Comments
 (0)