Skip to content

Commit

Permalink
Update @types/mdast, utilities, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 24, 2023
1 parent d809ad5 commit 0766548
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
11 changes: 6 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ import {loadPlugin} from 'load-plugin'
import {headingRange} from 'mdast-util-heading-range'
import parseAuthor from 'parse-author'
import remarkContributors from 'remark-contributors'
import {findUpOne} from 'vfile-find-up'
import {findUp} from 'vfile-find-up'
import {defaultFormatters} from './formatters.js'

const noreply = '@users.noreply.github.com'
Expand Down Expand Up @@ -120,7 +120,7 @@ export default function remarkGitContributors(options) {
/* c8 ignore next -- verbose to test. */
const base = file.dirname ? path.resolve(cwd, file.dirname) : cwd
const indices = await indexContributors(cwd, settings.contributors)
const pkgFile = await findUpOne('package.json', base)
const pkgFile = await findUp('package.json', base)
/** @type {PackageJson} */
let pkg = {}

Expand Down Expand Up @@ -317,13 +317,14 @@ export default function remarkGitContributors(options) {
formatters.social = {exclude: true}
}

remarkContributors({
const transform = remarkContributors({
contributors,
formatters,
// @ts-expect-error: to do: update.
appendIfMissing: settings.appendIfMissing,
align: 'left'
})(tree, file).then(resolve, reject)
})

transform(tree, file).then(resolve, reject)
}
})
}
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@
"index.js"
],
"dependencies": {
"@types/mdast": "^3.0.0",
"@types/mdast": "^4.0.0",
"contributors-from-git": "^1.0.0",
"dlv": "^1.0.0",
"load-plugin": "^4.0.0",
"mdast-util-heading-range": "^3.0.0",
"load-plugin": "^5.0.0",
"mdast-util-heading-range": "^4.0.0",
"parse-author": "^2.0.0",
"remark-contributors": "^6.0.0",
"to-vfile": "^7.0.0",
"unified": "^10.0.0",
"vfile-find-up": "^6.0.0"
"remark-contributors": "^7.0.0",
"unified": "^11.0.0",
"vfile": "^6.0.0",
"vfile-find-up": "^7.0.0"
},
"devDependencies": {
"@types/dlv": "^1.0.0",
"@types/node": "^20.0.0",
"@types/parse-author": "^2.0.0",
"c8": "^8.0.0",
"prettier": "^3.0.0",
"remark": "^14.0.0",
"remark": "^15.0.0",
"remark-cli": "^11.0.0",
"remark-gfm": "^3.0.0",
"remark-gfm": "^4.0.0",
"remark-preset-wooorm": "^9.0.0",
"semver": "^7.0.0",
"tmpgen": "^1.0.0",
Expand Down

0 comments on commit 0766548

Please sign in to comment.