@apache-arrow/esnext-esm
Advanced tools
Comparing version 8.0.0 to 9.0.0
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ArrayBufferViewInput } from '../util/buffer.js'; | ||
@@ -12,2 +15,3 @@ import { ReadableDOMStreamOptions } from './interfaces.js'; | ||
}>; | ||
/** @ignore */ | ||
declare const _default: { | ||
@@ -18,6 +22,5 @@ fromIterable<T extends ArrayBufferViewInput>(source: T | Iterable<T>): Uint8ArrayGenerator; | ||
fromNodeStream(stream: NodeJS.ReadableStream): AsyncUint8ArrayGenerator; | ||
toDOMStream<T_3>(source: Iterable<T_3> | AsyncIterable<T_3>, options?: ReadableDOMStreamOptions | undefined): ReadableStream<T_3>; | ||
toNodeStream<T_4>(source: Iterable<T_4> | AsyncIterable<T_4>, options?: import("stream").ReadableOptions | undefined): import('stream').Readable; | ||
toDOMStream<T_3>(source: Iterable<T_3> | AsyncIterable<T_3>, options?: ReadableDOMStreamOptions): ReadableStream<T_3>; | ||
toNodeStream<T_4>(source: Iterable<T_4> | AsyncIterable<T_4>, options?: import('stream').ReadableOptions): import('stream').Readable; | ||
}; | ||
/** @ignore */ | ||
export default _default; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** @ignore */ | ||
@@ -3,0 +4,0 @@ export declare const ITERATOR_DONE: any; |
@@ -25,5 +25,5 @@ /// <reference types="node" /> | ||
_destroy(err: Error | null, cb: (error: Error | null) => void): void; | ||
_open(source: AsyncByteQueue): Promise<import("../../ipc/reader.js").RecordBatchFileReader<T> | import("../../ipc/reader.js").AsyncRecordBatchStreamReader<T>>; | ||
_open(source: AsyncByteQueue): Promise<import("../../ipc/reader.js").AsyncRecordBatchStreamReader<T>>; | ||
_pull(size: number, reader: RecordBatchReader<T>): Promise<boolean>; | ||
} | ||
export {}; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Vector } from '../vector.js'; | ||
@@ -70,3 +71,3 @@ import { DataType, TypeMap } from '../type.js'; | ||
static from<T extends TypeMap = any>(source: FromArg3): Promise<RecordBatchFileReader<T> | RecordBatchStreamReader<T>>; | ||
static from<T extends TypeMap = any>(source: FromArg4): Promise<RecordBatchFileReader<T> | AsyncRecordBatchReaders<T>>; | ||
static from<T extends TypeMap = any>(source: FromArg4): Promise<AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>>; | ||
static from<T extends TypeMap = any>(source: FromArg5): Promise<AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>>; | ||
@@ -73,0 +74,0 @@ static readAll<T extends RecordBatchReader>(source: T): T extends RecordBatchReaders ? IterableIterator<T> : AsyncIterableIterator<T>; |
import { Table } from '../table.js'; | ||
import { TypeMap } from '../type.js'; | ||
import { FromArg0, FromArg1, FromArg2, FromArg3, FromArg4, FromArg5 } from './reader.js'; | ||
import { FromArg0, FromArg1, FromArg2, FromArg3, FromArg4, FromArg5, RecordBatchReader, RecordBatchFileReader, RecordBatchStreamReader, AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader } from './reader.js'; | ||
declare type RecordBatchReaders<T extends TypeMap = any> = RecordBatchFileReader<T> | RecordBatchStreamReader<T>; | ||
declare type AsyncRecordBatchReaders<T extends TypeMap = any> = AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>; | ||
/** | ||
@@ -10,3 +12,6 @@ * Deserialize the IPC format into a {@link Table}. This function is a | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: FromArg1): Promise<Table<T>>; | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: FromArg3 | FromArg4 | FromArg5): Promise<Table<T>> | Table<T>; | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: FromArg3 | FromArg4 | FromArg5): Promise<Table<T>>; | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: RecordBatchReaders<T>): Table<T>; | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: AsyncRecordBatchReaders<T>): Promise<Table<T>>; | ||
export declare function tableFromIPC<T extends TypeMap = any>(source: RecordBatchReader<T>): Table<T> | Promise<Table<T>>; | ||
/** | ||
@@ -21,1 +26,2 @@ * Serialize a {@link Table} to the IPC format. This function is a convenience | ||
export declare function tableToIPC<T extends TypeMap = any>(table: Table, type?: 'file' | 'stream'): Uint8Array; | ||
export {}; |
@@ -24,4 +24,7 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
if (isPromise(reader)) { | ||
return (async () => new Table(await (await reader).readAll()))(); | ||
return reader.then((reader) => tableFromIPC(reader)); | ||
} | ||
if (reader.isAsync()) { | ||
return reader.readAll().then((xs) => new Table(xs)); | ||
} | ||
return new Table(reader.readAll()); | ||
@@ -28,0 +31,0 @@ } |
{ | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"name": "@apache-arrow/esnext-esm", | ||
@@ -32,3 +32,3 @@ "browser": "Arrow.dom.js", | ||
"@types/command-line-usage": "5.0.2", | ||
"@types/node": "^17.0.24", | ||
"@types/node": "^17.0.36", | ||
"@types/pad-left": "2.1.1", | ||
@@ -40,3 +40,3 @@ "command-line-args": "5.2.1", | ||
"pad-left": "^2.1.0", | ||
"tslib": "^2.3.1" | ||
"tslib": "^2.4.0" | ||
}, | ||
@@ -43,0 +43,0 @@ "bin": { |
@@ -150,3 +150,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
public static from<T extends TypeMap = any>(source: FromArg3): Promise<RecordBatchFileReader<T> | RecordBatchStreamReader<T>>; | ||
public static from<T extends TypeMap = any>(source: FromArg4): Promise<RecordBatchFileReader<T> | AsyncRecordBatchReaders<T>>; | ||
public static from<T extends TypeMap = any>(source: FromArg4): Promise<AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>>; | ||
public static from<T extends TypeMap = any>(source: FromArg5): Promise<AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>>; | ||
@@ -153,0 +153,0 @@ /** @nocollapse */ |
@@ -21,5 +21,13 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
import { isPromise } from '../util/compat.js'; | ||
import { FromArg0, FromArg1, FromArg2, FromArg3, FromArg4, FromArg5, RecordBatchReader } from './reader.js'; | ||
import { | ||
FromArg0, FromArg1, FromArg2, FromArg3, FromArg4, FromArg5, | ||
RecordBatchReader, | ||
RecordBatchFileReader, RecordBatchStreamReader, | ||
AsyncRecordBatchFileReader, AsyncRecordBatchStreamReader | ||
} from './reader.js'; | ||
import { RecordBatchFileWriter, RecordBatchStreamWriter } from './writer.js'; | ||
type RecordBatchReaders<T extends TypeMap = any> = RecordBatchFileReader<T> | RecordBatchStreamReader<T>; | ||
type AsyncRecordBatchReaders<T extends TypeMap = any> = AsyncRecordBatchFileReader<T> | AsyncRecordBatchStreamReader<T>; | ||
/** | ||
@@ -31,9 +39,15 @@ * Deserialize the IPC format into a {@link Table}. This function is a | ||
export function tableFromIPC<T extends TypeMap = any>(source: FromArg1): Promise<Table<T>>; | ||
export function tableFromIPC<T extends TypeMap = any>(source: FromArg3 | FromArg4 | FromArg5): Promise<Table<T>> | Table<T>; | ||
export function tableFromIPC<T extends TypeMap = any>(source: FromArg3 | FromArg4 | FromArg5): Promise<Table<T>>; | ||
export function tableFromIPC<T extends TypeMap = any>(source: RecordBatchReaders<T>): Table<T>; | ||
export function tableFromIPC<T extends TypeMap = any>(source: AsyncRecordBatchReaders<T>): Promise<Table<T>>; | ||
export function tableFromIPC<T extends TypeMap = any>(source: RecordBatchReader<T>): Table<T> | Promise<Table<T>>; | ||
export function tableFromIPC<T extends TypeMap = any>(input: any): Table<T> | Promise<Table<T>> { | ||
const reader = RecordBatchReader.from<T>(input); | ||
if (isPromise(reader)) { | ||
return (async () => new Table(await (await reader).readAll()))(); | ||
const reader = RecordBatchReader.from<T>(input) as RecordBatchReader<T> | Promise<RecordBatchReader<T>>; | ||
if (isPromise<RecordBatchReader<T>>(reader)) { | ||
return reader.then((reader) => tableFromIPC(reader)) as Promise<Table<T>>; | ||
} | ||
return new Table(reader.readAll()); | ||
if (reader.isAsync()) { | ||
return (reader as AsyncRecordBatchReaders<T>).readAll().then((xs) => new Table(xs)); | ||
} | ||
return new Table((reader as RecordBatchReaders<T>).readAll()); | ||
} | ||
@@ -40,0 +54,0 @@ |
@@ -227,3 +227,6 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
public [Symbol.iterator]() { | ||
return iteratorVisitor.visit(new Vector(this.data)) as IterableIterator<Struct<T>['TValue']>; | ||
if (this.batches.length > 0) { | ||
return iteratorVisitor.visit(new Vector(this.data)) as IterableIterator<Struct<T>['TValue']>; | ||
} | ||
return (new Array(0))[Symbol.iterator](); | ||
} | ||
@@ -230,0 +233,0 @@ |
@@ -70,3 +70,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
: input as Data<T>[]; | ||
if (data.some((x) => !(x instanceof Data))) { | ||
if (data.length === 0 || data.some((x) => !(x instanceof Data))) { | ||
throw new TypeError('Vector constructor expects an Array of Data instances.'); | ||
@@ -73,0 +73,0 @@ } |
@@ -92,3 +92,3 @@ import { Data } from './data.js'; | ||
*/ | ||
[Symbol.iterator](): IterableIterator<import("./Arrow.js").StructRowProxy<T>>; | ||
[Symbol.iterator](): IterableIterator<any>; | ||
/** | ||
@@ -99,3 +99,3 @@ * Return a JavaScript Array of the Table rows. | ||
*/ | ||
toArray(): import("./Arrow.js").StructRowProxy<T>[]; | ||
toArray(): any[]; | ||
/** | ||
@@ -102,0 +102,0 @@ * Returns a string representation of the Table rows. |
@@ -163,3 +163,6 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
[Symbol.iterator]() { | ||
return iteratorVisitor.visit(new Vector(this.data)); | ||
if (this.batches.length > 0) { | ||
return iteratorVisitor.visit(new Vector(this.data)); | ||
} | ||
return (new Array(0))[Symbol.iterator](); | ||
} | ||
@@ -166,0 +169,0 @@ /** |
@@ -28,2 +28,2 @@ import { Data } from '../data.js'; | ||
/** @ignore */ | ||
export declare function wrapChunkedIndexOf<T extends DataType>(indexOf: (c: Data<T>, e: T['TValue'], o?: number) => any): (this: any, element: T['TValue'], offset?: number | undefined) => any; | ||
export declare function wrapChunkedIndexOf<T extends DataType>(indexOf: (c: Data<T>, e: T['TValue'], o?: number) => any): (this: any, element: T['TValue'], offset?: number) => any; |
/** @ignore */ | ||
export declare const decodeUtf8: (buffer?: BufferSource | undefined) => string; | ||
export declare const decodeUtf8: (buffer?: BufferSource) => string; | ||
/** @ignore */ | ||
export declare const encodeUtf8: (value?: string | undefined) => Uint8Array; | ||
export declare const encodeUtf8: (value?: string) => Uint8Array; |
@@ -37,3 +37,3 @@ // Licensed to the Apache Software Foundation (ASF) under one | ||
: input; | ||
if (data.some((x) => !(x instanceof Data))) { | ||
if (data.length === 0 || data.some((x) => !(x instanceof Data))) { | ||
throw new TypeError('Vector constructor expects an Array of Data instances.'); | ||
@@ -40,0 +40,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2647859
37946
Updated@types/node@^17.0.36
Updatedtslib@^2.4.0