Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,30 @@ replace = 'lance-namespace-urllib3-client=={new_version}'
[[tool.bumpversion.files]]
filename = "java/lance-namespace-core/pom.xml"
search = "<version>{current_version}</version>"
replace = "<version>{new_version}</version>"
replace = "<version>{new_version}</version>"

# TypeScript workspace and package versions
[[tool.bumpversion.files]]
filename = "typescript/Makefile"
search = "VERSION = {current_version}"
replace = "VERSION = {new_version}"

[[tool.bumpversion.files]]
filename = "typescript/package.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'

[[tool.bumpversion.files]]
filename = "typescript/lance-namespace/package.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'

[[tool.bumpversion.files]]
filename = "typescript/lance-namespace-fetch-client/package.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'

[[tool.bumpversion.files]]
filename = "typescript/lance-namespace-rest/package.json"
search = '"version": "{current_version}"'
replace = '"version": "{new_version}"'
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,17 @@ jobs:
java-version: 17
cache: "maven"

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Enable corepack
run: corepack enable

- name: Install dependencies
run: uv sync --all-packages

Expand Down Expand Up @@ -217,9 +225,9 @@ jobs:
echo "3. Publish the release to:" >> $GITHUB_STEP_SUMMARY
if [ "${{ inputs.release_channel }}" == "stable" ]; then
echo " - Create the official release" >> $GITHUB_STEP_SUMMARY
echo " - Trigger automatic publishing to Maven Central, PyPI, and crates.io" >> $GITHUB_STEP_SUMMARY
echo " - Trigger automatic publishing to Maven Central, PyPI, crates.io, and npm" >> $GITHUB_STEP_SUMMARY
else
echo " - Create a preview/beta release" >> $GITHUB_STEP_SUMMARY
echo " - Trigger automatic publishing to Maven Central, PyPI, and crates.io (as pre-release version)" >> $GITHUB_STEP_SUMMARY
echo " - Trigger automatic publishing to Maven Central, PyPI, crates.io, and npm (as pre-release version)" >> $GITHUB_STEP_SUMMARY
fi
fi
6 changes: 6 additions & 0 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ jobs:
distribution: temurin
java-version: 17
cache: "maven"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: uv sync --all-packages
- name: Codegen
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/typescript-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: TypeScript Publish

on:
release:
types:
- released
pull_request:
paths:
- .github/workflows/typescript-publish.yml
workflow_dispatch:
inputs:
mode:
description: "Release mode"
required: true
type: choice
default: dry_run
options:
- dry_run
- release
ref:
description: "The branch, tag or SHA to checkout"
required: false
type: string

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || inputs.ref || '' }}

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: pnpm
cache-dependency-path: typescript/pnpm-lock.yaml

- name: Build TypeScript modules
working-directory: typescript
run: make build

- name: Dry run publish
if: |
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run')
working-directory: typescript
run: make publish PUBLISH_FLAGS="--dry-run --no-git-checks --access public"

- name: Publish to npm
if: |
(github.event_name == 'release' && github.event.action == 'released') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'release')
working-directory: typescript
run: make publish PUBLISH_FLAGS="--no-git-checks --access public"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72 changes: 72 additions & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: TypeScript

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- ready_for_review
- reopened
paths:
- docs/src/rest.yaml
- typescript/**
- Makefile
- .github/workflows/typescript.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
linux-build:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout lance-namespace repo
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: typescript/pnpm-lock.yaml
- name: Regenerate TypeScript code
run: make gen-typescript
- name: Check no difference in TypeScript codegen
run: |
output=$(git diff)
if [ -z "$output" ]; then
echo "There is no difference in TypeScript codegen"
else
echo "Detected difference in TypeScript codegen"
echo "$output"
exit 1
fi
- name: Lint TypeScript modules
run: make -C typescript lint
- name: Test TypeScript modules
run: make -C typescript test
- name: Build TypeScript modules
run: make build-typescript
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dist/
cmake-build-*
.vscode
.DS_Store
node_modules/

python/lance/_*.cpp

Expand Down Expand Up @@ -117,4 +118,4 @@ env.bak/
venv.bak/

# Docs
docs/site
docs/site
11 changes: 9 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ This repository currently contains the following components:
| Java Apache Client | Java | java/lance-namespace-apache-client | Generated Java Apache HTTP client for Lance REST Namespace |
| Java SpringBoot Server| Java | java/lance-namespace-springboot-server | Generated Java SpringBoot server for Lance REST Namespace |
| Rust Reqwest Client | Rust | rust/lance-namespace-reqwest-client | Generated Rust reqwest client for Lance REST Namespace |
| TypeScript Core | TypeScript | typescript/lance-namespace | Core LanceNamespace interface and connect functionality |
| TypeScript REST Impl | TypeScript | typescript/lance-namespace-rest | REST namespace implementation for TypeScript core interface |
| TypeScript Fetch Client | TypeScript | typescript/lance-namespace-fetch-client | Generated TypeScript fetch client for Lance REST Namespace |


## Install uv
Expand Down Expand Up @@ -138,11 +141,15 @@ You can also run `make <command>-<language>` to only run the command in the spec

- `make gen-python`: codegen and lint all Python modules
- `make build-rust`: build all Rust modules
- `make gen-typescript`: codegen TypeScript fetch client module
- `make build-typescript`: build all TypeScript modules

You can also run `make <command>-<language>-<module>` inside a language folder to run the command against a specific module, for example:

- `make gen-rust-reqwest-client`: codegen and lint the Rust reqwest client module
- `make build-java-springboot-server`: build the Java Spring Boot server module
- `make gen-fetch-client` (inside `typescript`): codegen TypeScript fetch client module
- `make build` (inside `typescript`): build TypeScript fetch client and core module

## Documentation

Expand Down Expand Up @@ -200,5 +207,5 @@ This section describes the CI/CD workflows for automated version management, rel
- Go to the [Releases page](../../releases) to review the draft
- Edit release notes if needed
- Click "Publish release" to:
- For stable releases: Trigger automatic publishing for Java, Python, Rust
- For preview releases: Create a beta release (not published)
- For stable releases: Trigger automatic publishing for Java, Python, Rust, and TypeScript (npm)
- For preview releases: Create a beta release and trigger preview package publishing
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,26 @@ lint:
clean-rust:
cd rust; make clean

.PHONY: clean-typescript
clean-typescript:
cd typescript; make clean

.PHONY: sync gen-rust
gen-rust:
cd rust; make gen

.PHONY: gen-typescript
gen-typescript:
cd typescript; make gen

.PHONY: build-rust
build-rust:
cd rust; make build

.PHONY: build-typescript
build-typescript:
cd typescript; make build

.PHONY: clean-python
clean-python:
cd python; make clean
Expand Down Expand Up @@ -63,10 +75,10 @@ sync:
uv sync --all-packages

.PHONY: clean
clean: clean-rust clean-python clean-java
clean: clean-rust clean-python clean-java clean-typescript

.PHONY: gen
gen: lint gen-rust gen-python gen-java
gen: lint gen-rust gen-python gen-java gen-typescript

.PHONY: build
build: lint build-docs build-rust build-python build-java
build: lint build-docs build-rust build-python build-java build-typescript
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ that compute engines can integrate against:
| Python | `lance-namespace` | Core interface and connect functionality |
| Java | `org.lance:lance-namespace-core` | Core interface for Spark, Flink, Kafka, Trino, Presto |
| Rust | `lance-namespace` | Core interface (in [lance-format/lance](https://github.com/lance-format/lance)) |
| TypeScript | `@lance/lance-namespace` | Core interface and connect functionality for TypeScript |

## Resources

Expand Down
Loading