ci(nodejs): lint for unused imports (#2673)

This commit is contained in:
Will Jones
2025-09-23 18:49:42 -07:00
committed by GitHub
parent d6cc68f671
commit 48e5caabda
12 changed files with 107 additions and 21 deletions

View File

@@ -116,7 +116,7 @@ jobs:
set -e set -e
npm ci npm ci
npm run docs npm run docs
if ! git diff --exit-code -- . ':(exclude)Cargo.lock'; then if ! git diff --exit-code -- ../ ':(exclude)Cargo.lock'; then
echo "Docs need to be updated" echo "Docs need to be updated"
echo "Run 'npm run docs', fix any warnings, and commit the changes." echo "Run 'npm run docs', fix any warnings, and commit the changes."
exit 1 exit 1

View File

@@ -25,6 +25,51 @@ the underlying connection has been closed.
## Methods ## Methods
### cloneTable()
```ts
abstract cloneTable(
targetTableName,
sourceUri,
options?): Promise<Table>
```
Clone a table from a source table.
A shallow clone creates a new table that shares the underlying data files
with the source table but has its own independent manifest. This allows
both the source and cloned tables to evolve independently while initially
sharing the same data, deletion, and index files.
#### Parameters
* **targetTableName**: `string`
The name of the target table to create.
* **sourceUri**: `string`
The URI of the source table to clone from.
* **options?**
Clone options.
* **options.isShallow?**: `boolean`
Whether to perform a shallow clone (defaults to true).
* **options.sourceTag?**: `string`
The tag of the source table to clone.
* **options.sourceVersion?**: `number`
The version of the source table to clone.
* **options.targetNamespace?**: `string`[]
The namespace for the target table (defaults to root namespace).
#### Returns
`Promise`&lt;[`Table`](Table.md)&gt;
***
### close() ### close()
```ts ```ts

View File

@@ -13,7 +13,7 @@ function makeArrowTable(
metadata?): ArrowTable metadata?): ArrowTable
``` ```
An enhanced version of the makeTable function from Apache Arrow An enhanced version of the apache-arrow makeTable function from Apache Arrow
that supports nested fields and embeddings columns. that supports nested fields and embeddings columns.
(typically you do not need to call this function. It will be called automatically (typically you do not need to call this function. It will be called automatically

View File

@@ -78,6 +78,7 @@
- [TableNamesOptions](interfaces/TableNamesOptions.md) - [TableNamesOptions](interfaces/TableNamesOptions.md)
- [TableStatistics](interfaces/TableStatistics.md) - [TableStatistics](interfaces/TableStatistics.md)
- [TimeoutConfig](interfaces/TimeoutConfig.md) - [TimeoutConfig](interfaces/TimeoutConfig.md)
- [TlsConfig](interfaces/TlsConfig.md)
- [TokenResponse](interfaces/TokenResponse.md) - [TokenResponse](interfaces/TokenResponse.md)
- [UpdateOptions](interfaces/UpdateOptions.md) - [UpdateOptions](interfaces/UpdateOptions.md)
- [UpdateResult](interfaces/UpdateResult.md) - [UpdateResult](interfaces/UpdateResult.md)

View File

@@ -40,6 +40,14 @@ optional timeoutConfig: TimeoutConfig;
*** ***
### tlsConfig?
```ts
optional tlsConfig: TlsConfig;
```
***
### userAgent? ### userAgent?
```ts ```ts

View File

@@ -0,0 +1,49 @@
[**@lancedb/lancedb**](../README.md) • **Docs**
***
[@lancedb/lancedb](../globals.md) / TlsConfig
# Interface: TlsConfig
TLS/mTLS configuration for the remote HTTP client.
## Properties
### assertHostname?
```ts
optional assertHostname: boolean;
```
Whether to verify the hostname in the server's certificate.
***
### certFile?
```ts
optional certFile: string;
```
Path to the client certificate file (PEM format) for mTLS authentication.
***
### keyFile?
```ts
optional keyFile: string;
```
Path to the client private key file (PEM format) for mTLS authentication.
***
### sslCaCert?
```ts
optional sslCaCert: string;
```
Path to the CA certificate file (PEM format) for server verification.

View File

@@ -1,17 +1,5 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright The LanceDB Authors // SPDX-FileCopyrightText: Copyright The LanceDB Authors
import {
Bool,
Field,
Int32,
List,
Schema,
Struct,
Uint8,
Utf8,
} from "apache-arrow";
import * as arrow15 from "apache-arrow-15"; import * as arrow15 from "apache-arrow-15";
import * as arrow16 from "apache-arrow-16"; import * as arrow16 from "apache-arrow-16";
import * as arrow17 from "apache-arrow-17"; import * as arrow17 from "apache-arrow-17";
@@ -25,11 +13,9 @@ import {
fromTableToBuffer, fromTableToBuffer,
makeArrowTable, makeArrowTable,
makeEmptyTable, makeEmptyTable,
tableFromIPC,
} from "../lancedb/arrow"; } from "../lancedb/arrow";
import { import {
EmbeddingFunction, EmbeddingFunction,
FieldOptions,
FunctionOptions, FunctionOptions,
} from "../lancedb/embedding/embedding_function"; } from "../lancedb/embedding/embedding_function";
import { EmbeddingFunctionConfig } from "../lancedb/embedding/registry"; import { EmbeddingFunctionConfig } from "../lancedb/embedding/registry";

View File

@@ -7,7 +7,6 @@ import {
ClientConfig, ClientConfig,
Connection, Connection,
ConnectionOptions, ConnectionOptions,
NativeJsHeaderProvider,
TlsConfig, TlsConfig,
connect, connect,
} from "../lancedb"; } from "../lancedb";

View File

@@ -39,7 +39,6 @@ import {
Operator, Operator,
instanceOfFullTextQuery, instanceOfFullTextQuery,
} from "../lancedb/query"; } from "../lancedb/query";
import exp = require("constants");
describe.each([arrow15, arrow16, arrow17, arrow18])( describe.each([arrow15, arrow16, arrow17, arrow18])(
"Given a table", "Given a table",

View File

@@ -48,6 +48,7 @@
"noUnreachableSuper": "error", "noUnreachableSuper": "error",
"noUnsafeFinally": "error", "noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error", "noUnsafeOptionalChaining": "error",
"noUnusedImports": "error",
"noUnusedLabels": "error", "noUnusedLabels": "error",
"noUnusedVariables": "warn", "noUnusedVariables": "warn",
"useIsNan": "error", "useIsNan": "error",

View File

@@ -41,7 +41,6 @@ import {
vectorFromArray as badVectorFromArray, vectorFromArray as badVectorFromArray,
makeBuilder, makeBuilder,
makeData, makeData,
makeTable,
} from "apache-arrow"; } from "apache-arrow";
import { Buffers } from "apache-arrow/data"; import { Buffers } from "apache-arrow/data";
import { type EmbeddingFunction } from "./embedding/embedding_function"; import { type EmbeddingFunction } from "./embedding/embedding_function";
@@ -279,7 +278,7 @@ export class MakeArrowTableOptions {
} }
/** /**
* An enhanced version of the {@link makeTable} function from Apache Arrow * An enhanced version of the apache-arrow makeTable function from Apache Arrow
* that supports nested fields and embeddings columns. * that supports nested fields and embeddings columns.
* *
* (typically you do not need to call this function. It will be called automatically * (typically you do not need to call this function. It will be called automatically

View File

@@ -3,7 +3,6 @@
import { import {
Data, Data,
Schema,
SchemaLike, SchemaLike,
TableLike, TableLike,
fromTableToStreamBuffer, fromTableToStreamBuffer,