feat: replace Python submodule with TypeScript link checker, migrate scripts to ESM#806
Open
EchinopsisM wants to merge 3 commits into
Open
feat: replace Python submodule with TypeScript link checker, migrate scripts to ESM#806EchinopsisM wants to merge 3 commits into
EchinopsisM wants to merge 3 commits into
Conversation
…scripts to ESM - Remove tools/docusaurus-link-checker git submodule (Python version) - Add TypeScript link checker scripts: check_links.ts, check_live_links.ts - Convert fetch-awesome-swarm.mjs → .ts, validate-llms-txt.mjs → check-llms-coverage.ts - Add tsconfig.json with NodeNext/ESM module resolution - Add "type": "module" to package.json; rename babel.config.js/.sidebars.js to .cjs - Split validation: postbuild runs llms.txt coverage check; check:links runs dead link check - Coverage check uses build HTML as ground truth (fixes Windows path bug) - Update README: remove submodule instructions, document tsx-based checker Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ Deploy Preview for test-twitter-preview-testing-3 failed. Why did it fail? →
|
…rm.ts (34 passing) Export walkFind, normalizeNewlines, and rewriteRelativeLinks. Add test files using node:test + node:assert. Add "test" script to package.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…port check-llms-coverage.ts and fetch-awesome-swarm.ts were executing their full logic (network calls, file writes, process.exit) when imported as test subjects. Wrap in main() + isMain check using import.meta.url. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tools/docusaurus-link-checkergit submodule (Python version)check_links.ts,check_live_links.ts) from ethersphere/docusaurus-link-checkerfetch-awesome-swarm.mjs→.tsand replacesvalidate-llms-txt.mjswithcheck-llms-coverage.tstsconfig.jsonwithNodeNext/ESM module resolution"type": "module"topackage.json; renamesbabel.config.jsandsidebars.jsto.cjsto preserve CJS behaviourpostbuildruns llms.txt coverage check;check:linksruns full dead link checktsx-based checker usageTest plan
npm install(picks uptsx,typescript,@types/node)npm run build— postbuild coverage check runs, no errorsnpm run check:links— dead link checker runs in local modenpm run check:links -- --mode live --site-domain docs.ethswarm.org— live crawlbabel.config.cjsandsidebars.cjsload correctly (Docusaurus starts)🤖 Generated with Claude Code