Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 6, 2024
1 parent 6849661 commit 4e092c5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^9.0.0",
"hast-util-assert": "^4.0.0",
"prettier": "^3.0.0",
"remark-cli": "^11.0.0",
Expand All @@ -28,7 +28,7 @@
"unified": "^11.0.0",
"unist-util-remove-position": "^5.0.0",
"vfile": "^6.0.0",
"xo": "^0.56.0"
"xo": "^0.57.0"
},
"scripts": {
"build": "tsc --build --clean && tsc --build && type-coverage",
Expand Down
20 changes: 10 additions & 10 deletions packages/rehype-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {rehype} from 'rehype'
import {args} from 'unified-args'

/** @type {Pack} */
const proc = JSON.parse(
const rehypePackage = JSON.parse(
String(
await fs.readFile(
new URL('package.json', resolve('rehype', import.meta.url))
Expand All @@ -26,21 +26,21 @@ const proc = JSON.parse(
)

/** @type {Pack} */
const cli = JSON.parse(
const cliPackage = JSON.parse(
String(await fs.readFile(new URL('package.json', import.meta.url)))
)

args({
description: cli.description,
description: cliPackage.description,
extensions: ['html', 'htm', 'xht', 'xhtml'],
ignoreName: '.' + proc.name + 'ignore',
name: proc.name,
packageField: proc.name,
pluginPrefix: proc.name,
ignoreName: '.' + rehypePackage.name + 'ignore',
name: rehypePackage.name,
packageField: rehypePackage.name,
pluginPrefix: rehypePackage.name,
processor: rehype,
rcName: '.' + proc.name + 'rc',
rcName: '.' + rehypePackage.name + 'rc',
version: [
proc.name + ': ' + proc.version,
cli.name + ': ' + cli.version
rehypePackage.name + ': ' + rehypePackage.version,
cliPackage.name + ': ' + cliPackage.version
].join(', ')
})
3 changes: 1 addition & 2 deletions packages/rehype-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@
"cli.js"
],
"dependencies": {
"import-meta-resolve": "^3.0.0",
"import-meta-resolve": "^4.0.0",
"rehype": "^13.0.0",
"unified-args": "^11.0.0"
},
"scripts": {},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/rehype-parse/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default function rehypeParse(options) {
/**
* @type {Parser}
*/
function parser(doc, file) {
return fromHtml(doc, {
function parser(document, file) {
return fromHtml(document, {
...settings,
onerror: emitParseErrors
? function (message) {
Expand Down
1 change: 0 additions & 1 deletion packages/rehype-parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"unified": "^11.0.0"
},
"scripts": {},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
Expand Down
1 change: 0 additions & 1 deletion packages/rehype-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"unified": "^11.0.0"
},
"scripts": {},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
Expand Down
1 change: 0 additions & 1 deletion packages/rehype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"index.js"
],
"scripts": {},
"xo": false,
"typeCoverage": {
"atLeast": 100,
"detail": true,
Expand Down
6 changes: 3 additions & 3 deletions test/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import {fileURLToPath} from 'node:url'
const exec = promisify(childProcess.exec)

test('rehype-cli', async function (t) {
const bin = fileURLToPath(
const binary = fileURLToPath(
new URL('../packages/rehype-cli/cli.js', import.meta.url)
)

await t.test('should show help on `--help`', async function () {
const result = await exec(bin + ' --help')
const result = await exec(binary + ' --help')

assert.equal(
result.stdout,
Expand Down Expand Up @@ -66,7 +66,7 @@ test('rehype-cli', async function (t) {
})

await t.test('should show version on `--version`', async function () {
const result = await exec(bin + ' --version')
const result = await exec(binary + ' --version')

assert.match(result.stdout, /rehype: \d+\.\d+\.\d+/)
assert.match(result.stdout, /rehype-cli: \d+\.\d+\.\d+/)
Expand Down

0 comments on commit 4e092c5

Please sign in to comment.