mirror of
https://github.com/lancedb/lancedb.git
synced 2026-08-29 17:38:31 +00:00
a87cada90e
The bindings are built, installed and published with pnpm everywhere,
but a parallel npm dependency graph was still being maintained beside
it. This removes it, raises the supported Node floor to the versions we
actually test, and gives Dependabot the npm coverage it was missing.
## Dropping npm
`nodejs/package-lock.json` was regenerated by `ci/update_lockfiles.sh`
on every release commit and read by nothing — no workflow runs `npm ci`
or `npm install` in `nodejs/`, and npm never publishes a lockfile in a
package tarball. It could not even agree with the real install, since
npm does not see pnpm's `overrides`. Because GitHub's dependency graph
parses `package-lock.json`, it was also reporting vulnerabilities for a
tree we neither install nor ship.
`docs/package.json`, `docs/package-lock.json` and `docs/tsconfig.json`
go too. They depend on `file:../node` and
`file:../node/node_modules/apache-arrow` — the `node/` directory was
removed long ago — the tsconfig compiles `src/*.ts` where no TypeScript
files exist, and nothing installs any of it. `docs.yml` only referenced
the lockfile to configure an npm cache for an install it never ran.
Two `workflow_dispatch` workflows for regenerating those lockfiles are
removed as well. Both were already broken: they `uses:` composite
actions at `.github/workflows/update_package_lock{,_nodejs}` that do not
exist, so dispatching either failed immediately.
The remaining `npx` calls become direct `node_modules/.bin/...`
invocations. These were already running locally installed binaries
rather than resolving anything, but naming the binary removes the npm
CLI from the loop and does not depend on which Node version is active.
`dev.yml`'s commitlint check was the last place doing real npm
dependency resolution — an unpinned `npm install
@commitlint/config-conventional` that also bypassed the
`minimumReleaseAge` hold configured for `nodejs/` — and is now a pinned
`pnpm dlx`.
## Node support
Node 18 and 20 both reached end-of-life, in April 2025 and April 2026.
The matrix moves to 22, 24 and 26, and `engines` rises from `>= 18` to
`>= 22` so the declared floor is one the matrix actually covers. Node 22
is LTS until April 2027; 24 is LTS; 26 is Current and becomes LTS in
October 2026.
This also removes the reason the workflows reached for `npx` in the
first place: pnpm 11 requires Node >= 22.13, which every matrix version
now satisfies.
The prebuilt-binary smoke test in `npm-publish.yml` moves from Node 20
to Node 22 — the floor, where a napi ABI problem would surface first —
rather than fanning out across all three, to keep the publish matrix
from tripling.
## Dependabot
There were no npm-ecosystem entries at all, which is why the advisories
behind #4073 went unnoticed. Both pnpm lockfiles are now watched —
`nodejs/` and `nodejs/examples/`, which is a separate install — using
the same `lockfile-only` strategy as the existing cargo and pip entries,
so version ranges in `package.json` are left alone.
## Pre-commit biome
The hook ran `npx @biomejs/biome@1.8.3` while `nodejs/package.json`
resolved 1.9.4. The two disagree about formatting, so the hook rejected
code that `pnpm lint` accepts, and failed on unmodified `main` for
anyone touching `nodejs/`. It now uses the pnpm-managed biome, which
fixes the drift with no source changes.
## Testing
`dev.yml`'s commitlint job does not check out the repo, so it runs in an
empty workspace, and I could not verify `pnpm/action-setup` there
locally. It triggers on `pull_request_target`, so this PR exercises it
directly — worth confirming green before merge. I did verify the `pnpm
dlx` invocation itself locally: it accepts a conventional title and
rejects a non-conventional one with exit 1.
Node 26 is new enough that the examples job may surface gaps in prebuilt
native binaries (`onnxruntime-node`, `sharp`) before their maintainers
publish for it.
## Not included
`nodejs/examples/` still pins `sharp: "0.33.5"` and has its own audit
findings. Raising the Node floor unblocks that work — sharp 0.35
requires Node >= 20.9, which the matrix now satisfies — but it is a
dependency bump rather than tooling cleanup, so it is left separate.
## Breaking changes
`@lancedb/lancedb` now requires Node >= 22; previously >= 18. The
`@types/node` peer range moves from `>=18` to `>=22` to match. Users on
Node 18 or 20 must upgrade their runtime; both have been end-of-life for
some time. Existing installs are unaffected, since `engines` is only
checked on install.
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
113 lines
3.5 KiB
JSON
113 lines
3.5 KiB
JSON
{
|
|
"name": "@lancedb/lancedb",
|
|
"description": "LanceDB: A serverless, low-latency vector database for AI applications",
|
|
"keywords": [
|
|
"database",
|
|
"lance",
|
|
"lancedb",
|
|
"search",
|
|
"vector",
|
|
"vector database",
|
|
"ann"
|
|
],
|
|
"private": false,
|
|
"version": "0.38.0-beta.12",
|
|
"main": "dist/index.js",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./embedding": "./dist/embedding/index.js",
|
|
"./embedding/openai": "./dist/embedding/openai.js",
|
|
"./embedding/transformers": "./dist/embedding/transformers.js"
|
|
},
|
|
"types": "dist/index.d.ts",
|
|
"napi": {
|
|
"binaryName": "lancedb",
|
|
"targets": [
|
|
"aarch64-apple-darwin",
|
|
"x86_64-unknown-linux-gnu",
|
|
"aarch64-unknown-linux-gnu",
|
|
"x86_64-unknown-linux-musl",
|
|
"aarch64-unknown-linux-musl",
|
|
"x86_64-pc-windows-msvc",
|
|
"aarch64-pc-windows-msvc"
|
|
]
|
|
},
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/lancedb/lancedb"
|
|
},
|
|
"devDependencies": {
|
|
"@aws-sdk/client-dynamodb": "3.1003.0",
|
|
"@aws-sdk/client-kms": "3.1003.0",
|
|
"@aws-sdk/client-s3": "3.1003.0",
|
|
"@biomejs/biome": "^1.7.3",
|
|
"@jest/globals": "^29.7.0",
|
|
"@napi-rs/cli": "3.7.0",
|
|
"@opentelemetry/sdk-metrics": "^1.30.0",
|
|
"@types/axios": "^0.14.0",
|
|
"@types/jest": "^29.1.2",
|
|
"@types/node": "22.7.4",
|
|
"@types/tmp": "^0.2.6",
|
|
"apache-arrow-15": "npm:apache-arrow@15.0.0",
|
|
"apache-arrow-16": "npm:apache-arrow@16.0.0",
|
|
"apache-arrow-17": "npm:apache-arrow@17.0.0",
|
|
"apache-arrow-18": "npm:apache-arrow@18.0.0",
|
|
"eslint": "^8.57.0",
|
|
"jest": "^29.7.0",
|
|
"shx": "^0.3.4",
|
|
"tmp": "^0.2.3",
|
|
"ts-jest": "^29.1.2",
|
|
"typedoc": "0.26.4",
|
|
"typedoc-plugin-markdown": "4.2.1",
|
|
"typescript": "5.5.4",
|
|
"typescript-eslint": "^7.1.0"
|
|
},
|
|
"ava": {
|
|
"timeout": "3m"
|
|
},
|
|
"engines": {
|
|
"node": ">= 22"
|
|
},
|
|
"packageManager": "pnpm@11.1.1",
|
|
"cpu": ["x64", "arm64"],
|
|
"os": ["darwin", "linux", "win32"],
|
|
"scripts": {
|
|
"artifacts": "napi artifacts",
|
|
"build:debug": "napi build --platform --dts ../lancedb/native.d.ts --js ../lancedb/native.js --output-dir lancedb",
|
|
"postbuild:debug": "shx mkdir -p dist && shx cp lancedb/*.node dist/ && node -e \"require('fs').writeFileSync('dist/package.json', JSON.stringify({name:'@lancedb/lancedb',type:'commonjs'}))\"",
|
|
"build:release": "napi build --platform --release --dts ../lancedb/native.d.ts --js ../lancedb/native.js --output-dir dist",
|
|
"build": "pnpm build:debug && pnpm tsc",
|
|
"build-release": "pnpm build:release && pnpm tsc",
|
|
"tsc": "tsc -b",
|
|
"posttsc": "shx cp lancedb/native.d.ts dist/native.d.ts",
|
|
"lint-ci": "biome ci .",
|
|
"docs": "typedoc --plugin typedoc-plugin-markdown --treatWarningsAsErrors --out ../docs/src/js lancedb/index.ts",
|
|
"postdocs": "node typedoc_post_process.js",
|
|
"lint": "biome check . && biome format .",
|
|
"lint-fix": "biome check --write . && biome format --write .",
|
|
"prepublishOnly": "napi prepublish -t npm",
|
|
"test": "jest --verbose",
|
|
"integration": "S3_TEST=1 pnpm test",
|
|
"universal": "napi universalize",
|
|
"version": "napi version"
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/api": "^1.9.0",
|
|
"reflect-metadata": "^0.2.2"
|
|
},
|
|
"optionalDependencies": {
|
|
"@huggingface/transformers": "3.0.2",
|
|
"openai": "4.29.2"
|
|
},
|
|
"peerDependencies": {
|
|
"@types/node": ">=22",
|
|
"apache-arrow": ">=15.0.0 <=18.1.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@types/node": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|