0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/scripts
Yogesh Kumar 1a779e585d
fix(scripts): make the docs link check work on Windows (#11181)
'relativeLinkExists' builds the target path with 'path.resolve', which
uses the platform separator, but then matches it against '/examples/'
and rewrites it with a regex written in forward slashes.

On Windows the resolved path uses backslashes, so neither pattern
matches. Every documentation link that points at an example is looked up
as a markdown file under 'docs/framework/<name>/examples/' instead of a
directory under 'examples/<name>/', and 'pnpm test:docs' reports 27
broken links that are fine on CI.

Normalize the separators before the two comparisons. Node accepts
forward slashes on Windows, so the resolved path stays usable.

Co-authored-by: Yogesh Kumar <webdev1@futeservices.com>
Co-authored-by: Dominik Dorfmeister 🔮 <office@dorfmeister.cc>
History 2026-08-17 09:16:11 +02:00
..
create-github-release.mjs ci: align publishing to router with main/-pre/-maint (#10283) 2026-03-19 22:01:19 +01:00
generate-docs.ts chore(generate-docs): hide redundant TypeDoc page title heading (#11194) 2026-08-16 21:53:52 +09:00
generate-labeler-config.ts ci: add labeler script from router (#9503) 2025-07-26 21:46:39 +10:00
getTsupConfig.js ref: ts cutoff (#10253) 2026-03-09 08:12:35 +01:00
getViteAliases.js Revert "chore(paths): use customConditions to define internal imports… (#8973) 2025-04-09 15:58:33 +02:00
tsconfig.json chore: use "moduleResolution": "Bundler" at root level (#9002) 2025-04-12 11:03:59 +10:00
verify-links.ts fix(scripts): make the docs link check work on Windows (#11181) 2026-08-17 09:16:11 +02:00