Skip to content

Commit

Permalink
Update load-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 2, 2023
1 parent b97d6ff commit 11a116f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import fs from 'node:fs/promises'
import path from 'node:path'
import process from 'node:process'
import {pathToFileURL} from 'node:url'
// @ts-expect-error: untyped.
import contributorsFromGit from 'contributors-from-git'
import dlv from 'dlv'
Expand Down Expand Up @@ -380,7 +381,10 @@ async function indexContributors(cwd, contributors) {

if (typeof contributors === 'string') {
const exported = /** @type {ContributorsModule} */ (
await loadPlugin(contributors, {cwd: [cwd, process.cwd()], key: false})
await loadPlugin(contributors, {
from: [pathToFileURL(cwd) + '/', pathToFileURL(process.cwd()) + '/'],
key: false
})
)

if (Array.isArray(exported.contributors)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/mdast": "^4.0.0",
"contributors-from-git": "^1.0.0",
"dlv": "^1.0.0",
"load-plugin": "^5.0.0",
"load-plugin": "^6.0.0",
"mdast-util-heading-range": "^4.0.0",
"parse-author": "^2.0.0",
"remark-contributors": "^7.0.0",
Expand Down

0 comments on commit 11a116f

Please sign in to comment.