Skip to content

Remove SQLite and Turso static data path - #3

Merged
gtokman merged 1 commit into
mainfrom
codex/remove-sqlite-turso-static-path
May 26, 2026
Merged

gtokman merged 1 commit into
mainfrom
codex/remove-sqlite-turso-static-path

Conversation

@gtokman

@gtokman gtokman commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the libSQL/Turso database client, CLI, schema push, and persistent SQLite GTFS cache
  • keep direct realtime feed support with optional in-memory staticData for metadata and local stop lookup
  • update docs, examples, and tests around the hosted API as the production static-data path

Breaking changes

  • removes MTA.database and databaseUrl/databaseAuthToken/databaseLocalPath options
  • removes the mta-js CLI/bin and database import/push helpers
  • local stops.near now requires caller-provided in-memory staticData; production stop search should use the hosted API

Verification

  • bun test
  • bun run typecheck
  • rg stale Turso/libSQL/SQLite config references

@gtokman
gtokman marked this pull request as ready for review May 26, 2026 17:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebe8c26b14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/static-gtfs.ts
Comment thread src/static-gtfs.ts
@gtokman
gtokman requested a review from Copilot May 26, 2026 17:36
@gtokman
gtokman force-pushed the codex/remove-sqlite-turso-static-path branch from ebe8c26 to ace7c43 Compare May 26, 2026 17:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the SQLite/Turso-backed static GTFS storage path (including schema/CLI helpers) and shifts the library toward (1) hosted API usage when apiKey is provided and (2) optional in-memory staticData seeding for lightweight local metadata/stop lookup.

Changes:

  • Removed database/Turso/libSQL support, schema push utilities, and the mta-js CLI entrypoint.
  • Reworked GTFSCache from a SQLite-backed store to an in-memory Map-based cache.
  • Updated docs/examples/tests to emphasize the hosted API and in-memory static data seeding.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/types.ts Removes database-related options and import options fields tied to the old DB path.
src/static-gtfs.ts Replaces SQLite implementation with in-memory Maps and updates import/query logic.
src/schema.ts Deletes the SQLite schema statements/utilities.
src/errors.ts Updates static-data-missing guidance to reflect hosted API / staticData.
src/database-url.ts Deletes remote/local SQLite URL hydration and libSQL helpers.
src/cli.ts Deletes the CLI for DB push/import.
README.md Rewrites docs to center the hosted API + optional in-memory static data.
package.json Removes bin + DB scripts and drops @libsql/client dependency; updates description.
index.ts Removes MTA.database and hydration logic; wires staticData into in-memory cache.
index.test.ts Removes Turso/DB/CLI tests; adds hosted auth header test and in-memory static tests.
examples/vercel-route.ts Updates example to use hosted API (apiKey) instead of Turso/SQLite.
CLAUDE.md Removes SQLite guidance.
AGENTS.md Removes SQLite guidance.
bun.lock Removes libSQL-related packages from the lockfile.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.ts Outdated
Comment thread index.ts
Comment thread src/static-gtfs.ts
Comment thread package.json Outdated
@gtokman
gtokman force-pushed the codex/remove-sqlite-turso-static-path branch from ace7c43 to a807324 Compare May 26, 2026 17:44
@gtokman
gtokman merged commit 265e9fd into main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants