Skip to content

feat(typescript): add TypeScript namespace client and align architecture with Python#312

Open
Xuanwo wants to merge 4 commits into
mainfrom
xuanwo/namespace-client
Open

feat(typescript): add TypeScript namespace client and align architecture with Python#312
Xuanwo wants to merge 4 commits into
mainfrom
xuanwo/namespace-client

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

This PR follows the python's pattern and added a ts namespace client.

Key design points

  • core package only provides abstractions and class-path based implementation loading
  • NATIVE_IMPLS follows Python-style aliases (rest, dir) and dynamic loading
  • REST implementation lives in a separate package and is wired through class paths
  • OpenAPI generation is post-processed by typescript/scripts/patch-fetch-client.mjs to keep build/lint/test and exports stable after regen

Validation

  • make -C typescript build
  • make -C typescript lint

Parts of this PR were drafted with assistance from Codex (with gpt-5.3-codex) and fully reviewed and edited by me. I take full responsibility for all changes.

@github-actions github-actions Bot added the enhancement New feature or request label Feb 23, 2026

@wjones127 wjones127 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.

This all looks reasonable. Happy to merge once the conflicts are resolved.

Xuanwo and others added 4 commits July 1, 2026 00:59
…ementations

- Rebase onto main 0.9.0 and bump all TypeScript versions 0.5.2 -> 0.9.0
- Remove the lance-namespace-rest package and NATIVE_IMPLS; the core now ships
  only the LanceNamespace interface plus the generic connect/registerNamespaceImpl
  machinery, matching the Python and Java cores (implementations live elsewhere)
- Publish under the @lance-format npm scope; name the generated client
  @lance-format/lance-namespace-fetch-client for consistency across the workspace
- Generate the fetch client from docs/src/spec.yaml (the stale rest.yaml no longer
  exists) and fix the CI trigger path accordingly
- Make patch-fetch-client.mjs discover API classes dynamically so new spec tags
  (Branch, MaterializedView) are exported without editing the script
- Sync the LanceNamespace interface with the spec: add batchCommitTables,
  updateFieldMetadata, alterTableBackfillColumns, createMaterializedView,
  refreshMaterializedView, createTableBranch, listTableBranches, deleteTableBranch;
  remove createEmptyTable (dropped from the spec)
- Align queryTable/countTableRows/namespaceExists/tableExists return types with the
  Python and Java cores (return the response models, preserving response context)
- Publish the fetch client as dist-only (files: ["dist"])
- Update README and CONTRIBUTING to describe the two-package layout
@jackye1995
jackye1995 force-pushed the xuanwo/namespace-client branch from 6554e99 to 0fb4d8c Compare July 3, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants