Refactor/ts standardize scripts#814
Open
EchinopsisM wants to merge 5 commits into
Open
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>
…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>
The PR's lockfile dropped the nested @noble/hashes@2.2.0 entries that @orama/plugin-docusaurus-v3 -> jsdom -> @exodus/bytes requires, so `npm ci` failed with an out-of-sync lockfile and broke CI/Netlify builds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Unify the build/config/script layer on TypeScript instead of mixing .ts, .mjs and .cjs: - Drop `"type": "module"` from package.json. It is incompatible with Docusaurus 3.x (the SSR server bundle is CommonJS, causing `require.resolveWeak is not a function`) and unnecessary — .ts scripts run via tsx and the config is loaded by Docusaurus's own TS loader. - Convert docusaurus.config.mjs -> docusaurus.config.ts (typed Config) and sidebars.cjs -> sidebars.ts (typed SidebarsConfig). - Rename babel.config.cjs -> babel.config.js. Docusaurus hardcodes the filename 'babel.config.js', so the .cjs name was silently ignored, disabling babel-plugin-styled-components (needed by redocusaurus). - Fix the test script: `tsx --test scripts/*.test.ts` works on Node 20 and 22; the previous `node --import tsx/esm` form broke without type:module and the quoted glob wasn't expanded on Node 20. - Add explicit .js extensions to local imports in RedundancyCalc.js. Verified: npm ci, npm run build (clean), npm test (34/34 on Node 20 and 22), and npm run check:links all pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for test-twitter-preview-testing-3 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
No description provided.