Upgrading to v0.6.13 from v0.6.12 causes prettier --check . runs to fail with errors like TypeError: Cannot read properties of undefined (reading 'length') over *.ts, *.js and *.svelte.ts files.
A look at the release points to #372 as a likely cause, only because the other change in the release looks irrelevant to this issue.
FYI @astrochemx and @thecrypticace
Here's the stack trace:
[error] src/lib/api.ts: TypeError: Cannot read properties of undefined (reading 'length')
[error] at norm (/work/node_modules/.pnpm/binary-searching@2.0.5/node_modules/binary-searching/search-bounds.js:93:27)
[error] at Object.eq (/work/node_modules/.pnpm/binary-searching@2.0.5/node_modules/binary-searching/search-bounds.js:119:12)
[error] at findTokenIndex (file:///work/node_modules/.pnpm/prettier-plugin-jsdoc@1.3.2_prettier@3.6.0/node_modules/prettier-plugin-jsdoc/dist/utils.js:115:20)
[error] at file:///work/node_modules/.pnpm/prettier-plugin-jsdoc@1.3.2_prettier@3.6.0/node_modules/prettier-plugin-jsdoc/dist/parser.js:21:28
[error] at Array.map (<anonymous>)
[error] at Object.jsdocParser [as parse] (file:///work/node_modules/.pnpm/prettier-plugin-jsdoc@1.3.2_prettier@3.6.0/node_modules/prettier-plugin-jsdoc/dist/parser.js:18:36)
[error] at Object.parse (file:///work/node_modules/.pnpm/prettier-plugin-tailwindcss@0.6.12_prettier-plugin-jsdoc@1.3.2_prettier@3.6.0__prettier_caeccab09a45aa66cdb18ce0d7c27616/node_modules/prettier-plugin-tailwindcss/dist/index.mjs:1329:27344)
[error] at async parse5 (file:///work/node_modules/.pnpm/prettier@3.6.0/node_modules/prettier/index.mjs:16737:11)
[error] at async coreFormat (file:///work/node_modules/.pnpm/prettier@3.6.0/node_modules/prettier/index.mjs:17293:25)
[error] at async formatWithCursor (file:///work/node_modules/.pnpm/prettier@3.6.0/node_modules/prettier/index.mjs:17510:14)
What version of prettier-plugin-tailwindcss are you using?
For example: v0.6.13
What version of Tailwind CSS are you using?
For example: v4.1.10
What version of Node.js are you using?
For example: v24.2.0
What package manager are you using?
For example: pnpm
What operating system are you using?
For example: macOS
Reproduction URL
A public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways. Unfortunately we can't provide support without a reproduction, and your issue will be closed with no comment if this is not provided.
Describe your issue
Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead
Upgrading to v0.6.13 from v0.6.12 causes
prettier --check .runs to fail with errors likeTypeError: Cannot read properties of undefined (reading 'length')over *.ts, *.js and *.svelte.ts files.A look at the release points to #372 as a likely cause, only because the other change in the release looks irrelevant to this issue.
FYI @astrochemx and @thecrypticace
Here's the stack trace:
What version of
prettier-plugin-tailwindcssare you using?For example: v0.6.13
What version of Tailwind CSS are you using?
For example: v4.1.10
What version of Node.js are you using?
For example: v24.2.0
What package manager are you using?
For example: pnpm
What operating system are you using?
For example: macOS
Reproduction URL
A public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways. Unfortunately we can't provide support without a reproduction, and your issue will be closed with no comment if this is not provided.
Describe your issue
Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead