chore(site): remove unused dependencies and drop node-fetch#3294
chore(site): remove unused dependencies and drop node-fetch#3294yonib05 wants to merge 4 commits into
Conversation
remove sanitize-html, @types/sanitize-html, and @a2a-js/sdk (zero imports; only prose mentions in docs), dedupe typedoc into devDependencies, and switch the inlined broken-links checker to the global fetch available in node 18+, dropping node-fetch and its web-streams-polyfill transitive. move express, @types/express, @aws-sdk/client-s3, and the opentelemetry trace deps to test-snippets/package.json, where the snippet typecheck that imports them actually runs.
|
Assessment: Approve Clean, well-scoped dependency cleanup. I verified each claim against the branch and everything checks out — removals are safe and the moves land where the importing code is actually typechecked. Verification notes
Two low-severity, non-blocking notes left inline (lockfile transitive bumps, and an |
Documentation Preview ReadyYour documentation preview has been successfully deployed! Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-3294/docs/user-guide/quickstart/overview/ Updated at: 2026-07-16T21:05:23.282Z |
|
Note on Issue: Beyond removing the unused deps, the lockfile regen also bumps Suggestion: No code change strictly required (they'd resolve on the next install anyway). Worth a one-line note in the PR description, since it currently states the lockfile is purely the output of the package.json edits. Non-blocking. |
Description
site/package.json accumulated dependencies that nothing in the site imports, which inflates every
npm ciand widens the dependency surface CI and dependabot have to track. This PR trims it down to what the build actually uses.sanitize-html,@types/sanitize-html, and@a2a-js/sdkare removed: zero imports anywhere under site/; the only mentions are prose in .mdx pages (install instructions and package references), which do not need the package installed.typedocwas listed in both dependencies and devDependencies; it stays in devDependencies only (it is a build-time tool for API doc generation).scripts/astro-broken-links-checker-check-links.js) now uses the global fetch available since Node 18 instead ofnode-fetch, which also drops the 8.7MBweb-streams-polyfilltransitive.express,@types/express,@aws-sdk/client-s3,@opentelemetry/exporter-trace-otlp-http, and@opentelemetry/sdk-trace-nodeare only imported by code-snippet .ts files under src/content/docs, which are typechecked by the test-snippets harness with its own package.json. test-snippets already declared express, @types/express, and sdk-trace-node; this PR adds the missing client-s3 and otlp exporter there and removes all five from site/package.json, so the snippet-only deps live where the code that imports them is checked.Net effect:
npm installin site/ removes 65 packages.@modelcontextprotocol/sdkstays (imported by blog snippet files); it still pulls express transitively, which is expected.Lockfile changes are the output of
npm installafter the package.json edits, no manual edits. Note: regenerating against thefile:../strands-tsreference also refreshed a handful of strands-ts transitive pins (bedrock-runtime, anthropic sdk, vitest) that had gone stale in the lockfile; these would resolve identically on any next install.Related Issues
None
Documentation PR
N/A
Type of Change
Other (please describe): cleanup
Testing
Ran in
site/:npm run test(29 files, 453 passed, 2 skipped),npm run typecheck:snippets(passes with the deps moved to test-snippets, after building strands-ts as CI does), andnpm run build(845 pages built; the modified broken-links checker ran against the full build and reported no broken links, which exercises its fetch path end to end). Also verified the modified script imports cleanly under plainnode.hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.