From 333cac8baf47d98b9a773c54ba5f0f212e231a24 Mon Sep 17 00:00:00 2001 From: kyomic Date: Sat, 23 Aug 2025 16:53:57 +0800 Subject: [PATCH] Update getJsdocProcessorPlugin.js fix: The "path" argument must be of type string. join(import.meta.dirname, '../package.json') --- src/getJsdocProcessorPlugin.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/getJsdocProcessorPlugin.js b/src/getJsdocProcessorPlugin.js index 62913fe9..13c5a6c9 100644 --- a/src/getJsdocProcessorPlugin.js +++ b/src/getJsdocProcessorPlugin.js @@ -26,12 +26,18 @@ import { * Linter, * } from 'eslint'; */ +import { fileURLToPath } from 'node:url'; +import { dirname } from 'node:path'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const { + + version, } = JSON.parse( // @ts-expect-error `Buffer` is ok for `JSON.parse` - readFileSync(join(import.meta.dirname, '../package.json')), + readFileSync(join(__dirname, '../package.json')), ); // const zeroBasedLineIndexAdjust = -1;