build: remove unused Python, client, and documentation dependencies

Merged
FR
11d ago
+20-1994

Summary

Remove unused Python and JavaScript dependencies after auditing imports, scripts, configuration, framework plugins, peer dependencies, and deployment packaging across the server, image resizer, SDK generator, clients, docs, and handbook. Refresh the corresponding lockfiles without upgrading retained package versions.

The client/docs/handbook audit removes 38 direct dependency declarations (including one duplicate), plus one unused catalog entry. All server runtime packages remain required. Intentionally retained implicit dependencies include SQLAlchemy's greenlet support, FastAPI form parsing, certificate trust bundles, Expo native integrations, framework peers, and the separate TypeScript compiler executable/API packages.

Server — server/

Removed dependency or declarationRationale
debugpyNo imports or debugger CLI invocations; VS Code supplies its debugger through the extension.
pytest-recordingNo VCR fixtures, marks, cassettes, recording configuration, or CI arguments.
pytest-subtestsNo subtests fixture or unittest subtest usage.
types-python-slugifyThe library ships its own annotations; raise its minimum to 8.0.2, where those annotations became available.
types-requestsNo server code imports Requests or uses its types.
boto3-stubs[lambda] extraNo Lambda client or stub consumer; keep S3, SQS, and Scheduler extras.
Development typer declarationIdentical runtime requirement already provides it.
Development sqlalchemy-utils declarationRuntime requirement already provides it; preserve the effective >=0.41.2 minimum there.

Retain types-redis: current aliases still depend on its generic Redis/Pipeline types. The lockfile also drops orphaned vcrpy.

Image resizer — lambda/image-resizer/

Removed dependency or declarationRationale
types-PillowPillow ships its own annotations; the stubs target an older API. Add an Image.Image variable annotation to accommodate Pillow's native types.
Runtime taskipy declarationUsed only by development/CI tasks; move it to the development group.

Keep certifi for botocore's trust bundle and preserve the deployment packaging configuration.

SDK generator — sdk/generator/

Removed dependencyRationale
Development adaptixNo generator source, tests, configuration, or release-tool consumer. Generated SDKs declare their own dependencies separately.
Development httpxNo generator consumer; generated SDK dependencies remain unchanged.

Web app — clients/apps/web/

Removed dependencyRationale
@polar-sh/sdkReferences are displayed examples or prose, not executable imports.
@radix-ui/react-dropdown-menuNo direct import or configuration consumer. Shared components declare their own dependencies.
geistNo font import or configuration consumer.
react-focus-lockNo direct consumer; Orbit owns its own FocusLock dependency.
react-timeagoNo direct consumer; the shared UI package owns its TimeAgo dependency.
rehype-mdx-import-mediaNot configured in the MDX pipeline; only mentioned in a stale comment.
@types/webNo explicit type consumer; TypeScript already provides the standard DOM library.
@vitest/uiNo test UI command or configuration.
autoprefixerNot configured; the app uses Tailwind 4's PostCSS integration.
remarkNo direct import or configured pipeline use.
remark-mdxNo direct import or configured pipeline use.

Mobile app — clients/apps/app/

Removed dependencyRationale
@dev-plugins/react-navigationNever initialized; remove its obsolete Expo doctor exclusion.
@react-navigation/bottom-tabsNo app consumer or dependency/peer requirement from retained packages.
expo-blurNo import, plugin, or retained-package requirement.
expo-status-barNo import, plugin, or retained-package requirement.
nativewindNo CSS, class names, Metro/Babel integration, or environment declaration; remove the stale tsconfig include.
tailwindcssNo mobile styles or build configuration using it.
patch-packageNo patch files; remove the inert postinstall invocation.
@types/react-test-rendererNo source/test consumer of its types; retain the renderer used by Jest.

Shared UI — clients/packages/ui/

Removed dependencyRationale
@radix-ui/react-checkboxNo direct import; compatibility export forwards to Orbit.
@radix-ui/react-selectNo direct import or configuration consumer.
@radix-ui/react-switchNo direct import or configuration consumer.
@radix-ui/react-tabsNo direct import or configuration consumer.
@radix-ui/react-toastNo direct import or configuration consumer.
@radix-ui/react-tooltipNo direct import; compatibility export forwards to Orbit.

Orbit continues to declare the Radix dependencies its implementations need.

Checkout — clients/packages/checkout/

Removed declarationRationale
Development date-fnsDuplicate of the identical runtime declaration, which remains.

Orbit package — clients/packages/orbit/

Removed dependencyRationale
@vitest/coverage-v8Tests run without coverage; no configured coverage command or CI consumer.

Better Auth example — clients/adapters/better-auth/example/

Removed dependencyRationale
@typescript/nativeStandalone example runs Next commands without invoking tsc; Next uses the retained typescript compiler API.

Client workspace configuration — clients/

Removed catalog entryRationale
@vitest/uiNo manifest references remain after removing the unused web declaration.

Root tooling remains: esbuild is used by the bundle-measurement script, and @manypkg/cli has an explicit workspace policy.

Documentation — docs/

Removed dependencyRationale
@scalar/openapi-parserNo remaining script, source, or CI consumer.
@types/nodeNo local TypeScript project or tooling requires a direct declaration.
js-yamlNo local YAML-processing script; keep security overrides for transitive copies.
openapi-samplerNo remaining sample-generation script or CI consumer.
tsxNo TypeScript scripts to execute.

Keep Mintlify, React, and React DOM for documentation rendering. OpenAPI generation is handled by the Python SDK generator.

Handbook — handbook/

Removed dependencyRationale
@scalar/openapi-parserNo source, script, or CI consumer.
@types/nodeNo local TypeScript project or tooling requires a direct declaration.
js-yamlNo local YAML-processing script; keep security overrides for transitive copies.
openapi-samplerNo sample-generation consumer.
tsxNo TypeScript scripts to execute; the tech-notes utility is a shell script.

Keep Mintlify, React, and React DOM for handbook rendering.

Validation

  • Python generator: 153 tests passed; lint and type checks passed.
  • Image resizer: 35 tests passed; lint and type checks passed.
  • Server: lint passed, mypy passed across 1,783 files, and 9,083 selected tests collected successfully with removed dependencies uninstalled.
  • Clients: 1,557 tests passed across checkout, Orbit, web, mobile, MCP, and adapters; adapter builds and typechecks passed. Mobile, Orbit app, demo app, MCP, web, and checkout typechecks passed; web/checkout were checked again after rebasing onto current main.
  • Full clients oxlint and changed-manifest formatting checks passed. Mobile lint-rule self-checks and offline Expo configuration resolution passed.
  • Frozen pnpm installs and Python lockfile checks passed. Retained package versions were not upgraded.
  • Docs and handbook source validation passed with package-manager files excluded in temporary source copies. Running Mintlify validation directly in either project encounters its existing YAML-parser incompatibility with the multi-document pnpm lockfile.
  • Polar review: conventions, Accepted ADRs, reuse, slop, and API surface.

Not run: full server test execution, production Next builds, native/device builds, standalone Better Auth example build, or hosted CI. No API contract or application behavior changes are intended.