Files
lancedb/docs
003b87bfa0 fix(node): support Apache Arrow 19 through 21 and run the library on each
Builds on #4359 (which added the Arrow 19-21 test aliases) and makes the
package genuinely work across the whole peer range:

* Resolve the library's own `apache-arrow` to 21.2.0 (devDependency) so
  the main CI jobs build, type-check and test on the newest release, and
  widen the peer range to `>=15.0.0 <22.0.0` instead of an exact pin.
* Add a CI job that re-installs with `apache-arrow` resolved to 19.0.1 and
  20.0.0 and runs the suite, covering what a consumer on those versions
  gets.
* Arrow 21 overrides `Symbol.hasInstance` on Schema/Field/Table/RecordBatch/
  Data so `instanceof` matches objects from another copy of the library,
  but not on DataType. The sanitizer's short-circuits therefore returned
  foreign schemas unchanged and Arrow's builders then failed with
  "Unrecognized type 'NONE'". Check the real prototype chain instead.
* Sanitize the types added in Arrow 20/21 (LargeList, Utf8View, BinaryView,
  IntervalMonthDayNano), looked up dynamically so the library still compiles
  and runs on older Arrow releases, with a clear error when the installed
  Arrow lacks the type. Carry `variadicBuffers` through `Data`.
* Loosen `FieldLike` so a branded DataType from another Arrow copy still
  type-checks; export the new `DataTypeLike`.
* Share the Arrow version list between test files, exercise embedding
  function types per version in the registry tests, and add sanitize and
  end-to-end coverage for the new column types.
* Enable `skipLibCheck`: flatbuffers 25 (via Arrow 21) ships declarations
  that need TypeScript 5.7+.
* Record the new dev dependencies in the third-party license inventory.

Co-Authored-By: Vincent Koc <vincentkoc@ieee.org>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-01 11:21:59 -05:00
..
2026-09-09 15:33:04 +08:00

LanceDB Documentation

LanceDB docs are available at docs.lancedb.com.

The SDK docs are built and deployed automatically by Github Actions whenever a commit is pushed to the main branch. So it is possible for the docs to show unreleased features.

Building the docs

Setup

  1. Install LanceDB Python. See setup in Python contributing guide. Run make develop to install the Python package.
  2. Install documentation dependencies. From LanceDB repo root: pip install -r docs/requirements.txt

Preview the docs

cd docs
mkdocs serve

If you want to just generate the HTML files:

PYTHONPATH=. mkdocs build -f docs/mkdocs.yml

If successful, you should see a docs/site directory that you can verify locally.

Adding examples

To make sure examples are correct, we put examples in test files so they can be run as part of our test suites.

You can see the tests are at:

  • Python: python/python/tests/docs
  • Typescript: nodejs/examples/

Checking python examples

cd python
pytest -vv python/tests/docs

Checking typescript examples

The examples depend on @lancedb/lancedb at file:../dist, so the package must be built before running the tests. This uses pnpm; see the Typescript contributing guide for the toolchain setup.

pushd nodejs
pnpm install
pnpm build
popd

Then you can run the examples by going to the nodejs/examples directory, which is a separate pnpm package with its own lockfile:

pushd nodejs/examples
pnpm install
pnpm test
popd

API documentation

Python

The Python API documentation is organized based on the file docs/src/python/python.md. We manually add entries there so we can control the organization of the reference page. However, this means any new types must be manually added to the file. No additional steps are needed to generate the API documentation.

Typescript

The typescript API documentation is generated from the typescript source code using typedoc.

When new APIs are added, you must manually re-run the typedoc command to update the API documentation. The new files should be checked into the repository.

pushd nodejs
# `pnpm docs` would invoke pnpm's built-in `docs` command, not the script.
pnpm run docs
popd