Skip to content
Draft
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
2 changes: 1 addition & 1 deletion js/gulp/typescript-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function compileTypescript(out, tsconfigPath, tsconfigOverrides, writeSourcemaps
);
const writeSources = observableFromStreams(tsProject.src(), gulp.dest(path.join(out, 'src')));
const writeDTypes = observableFromStreams(dts, sourcemaps.write('./', { includeContent: false, sourceRoot: './src' }), gulp.dest(out));
const mapFile = tsProject.options.module === tsc.ModuleKind.ES2015 ? esmMapFile : cjsMapFile;
const mapFile = tsProject.options.module === tsc.ModuleKind.CommonJS ? cjsMapFile : esmMapFile;
const writeJSArgs = writeSourcemaps ? [
js,
sourcemaps.write('./', { mapFile, includeContent: false, sourceRoot: './src' }),
Expand Down
2 changes: 1 addition & 1 deletion js/perf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import * as Arrow from '../src/Arrow.ts';

import config, { arrays, typedArrays, vectors } from './config.js';
import b from 'benny';
import { CaseResult, Summary } from 'benny/lib/internal/common-types';
import { CaseResult, Summary } from 'benny/lib/internal/common-types.js';
import kleur from 'kleur';

const { RecordBatchReader, RecordBatchStreamWriter } = Arrow;
Expand Down
4 changes: 2 additions & 2 deletions js/src/ipc/metadata/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ FieldNode['decode'] = decodeFieldNode;
BufferRegion['encode'] = encodeBufferRegion;
BufferRegion['decode'] = decodeBufferRegion;

declare module '../../schema' {
declare module '../../schema.js' {
namespace Field {
export { encodeField as encode };
export { decodeField as decode };
Expand All @@ -269,7 +269,7 @@ declare module '../../schema' {
}
}

declare module './message' {
declare module './message.js' {
namespace RecordBatch {
export { encodeRecordBatch as encode };
export { decodeRecordBatch as decode };
Expand Down
2 changes: 1 addition & 1 deletion js/test/inference/visitor/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
Bool, List, Dictionary
} from 'apache-arrow';

import { instance as getVisitor } from 'apache-arrow/visitor/get';
import { instance as getVisitor } from 'apache-arrow/visitor/get.js';

const data_Bool = new Data(new Bool(), 0, 0);
const data_List_Bool = new Data(new List<Bool>(null as any), 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion js/test/jest-extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

import { zip } from 'ix/iterable/zip';
import { zip } from 'ix/iterable/zip.js';
import { Table, Vector, RecordBatch, util } from 'apache-arrow';

declare global {
Expand Down
8 changes: 4 additions & 4 deletions js/test/unit/builders/builder-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'web-streams-polyfill';

import '../../jest-extensions.js';
import { from, fromDOMStream, toArray } from 'ix/asynciterable';
import { fromNodeStream } from 'ix/asynciterable/fromnodestream';
import { fromNodeStream } from 'ix/asynciterable/fromnodestream.js';

import { validateVector } from './utils.js';
import * as generate from '../../generate-test-data.js';
Expand Down Expand Up @@ -239,9 +239,9 @@ function fillNADefault(values: any[], nulls: any[]): any[] {
});
}

type BuilderOptions<T extends DataType = any, TNull = any> = import('apache-arrow/builder').BuilderOptions<T, TNull>;
type BuilderDuplexOptions<T extends DataType = any, TNull = any> = import('apache-arrow/io/node/builder').BuilderDuplexOptions<T, TNull>;
type BuilderTransformOptions<T extends DataType = any, TNull = any> = import('apache-arrow/io/whatwg/builder').BuilderTransformOptions<T, TNull>;
type BuilderOptions<T extends DataType = any, TNull = any> = import('apache-arrow/builder.js').BuilderOptions<T, TNull>;
type BuilderDuplexOptions<T extends DataType = any, TNull = any> = import('apache-arrow/io/node/builder.js').BuilderDuplexOptions<T, TNull>;
type BuilderTransformOptions<T extends DataType = any, TNull = any> = import('apache-arrow/io/whatwg/builder.js').BuilderTransformOptions<T, TNull>;

function encodeSingle<T extends DataType, TNull = any>(values: (T['TValue'] | TNull)[], options: BuilderOptions<T, TNull>) {
const builder = makeBuilder(options);
Expand Down
2 changes: 1 addition & 1 deletion js/test/unit/builders/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import 'web-streams-polyfill';

import { from, fromDOMStream, toArray } from 'ix/asynciterable';
import { fromNodeStream } from 'ix/asynciterable/fromnodestream';
import { fromNodeStream } from 'ix/asynciterable/fromnodestream.js';
import 'ix/Ix.node';
import randstr from 'randomatic';

Expand Down
4 changes: 2 additions & 2 deletions js/test/unit/ipc/reader/file-reader-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

import { toArray } from 'ix/asynciterable/toarray';
import { toArray } from 'ix/asynciterable/toarray.js';
import { generateRandomTables } from '../../../data/tables.js';
import { ArrowIOTestHelper } from '../helpers.js';
import {
Expand Down Expand Up @@ -103,7 +103,7 @@ function validateRandomAccess(source: any) {

async function validateRandomAccessAsync(source: any) {
const reader = (await RecordBatchReader.from(source)) as AsyncRecordBatchFileReader;
const {schema} = await reader.open({ autoDestroy: false });
const { schema } = await reader.open({ autoDestroy: false });
const batches = await toArray(reader);
expect(reader.closed).toBe(false);
expect(reader.schema).toBe(schema);
Expand Down
2 changes: 1 addition & 1 deletion js/test/unit/ipc/writer/stream-writer-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import * as generate from '../../../generate-test-data.js';
import { validateRecordBatchIterator } from '../validate.js';

import type { RecordBatchStreamWriterOptions } from 'apache-arrow/ipc/writer';
import type { RecordBatchStreamWriterOptions } from 'apache-arrow/ipc/writer.js';
import {
builderThroughIterable,
Dictionary,
Expand Down
2 changes: 1 addition & 1 deletion js/test/unit/vector/numeric-vector-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type {
TypedArrayConstructor,
BigIntArray,
BigIntArrayConstructor
} from 'apache-arrow/interfaces';
} from 'apache-arrow/interfaces.js';

const { joinUint8Arrays, float64ToUint16, uint16ToFloat64 } = util;

Expand Down
4 changes: 2 additions & 2 deletions js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "NodeNext",
"isolatedModules": true,
"noEmit": true,
"esModuleInterop": true,
"baseUrl": "./",
"rootDir": "./",
"paths": {
"apache-arrow": ["src/Arrow.node"],
"apache-arrow": ["src/Arrow.node.js"],
"apache-arrow/*": ["src/*"]
},
"allowImportingTsExtensions": true,
Expand Down
2 changes: 1 addition & 1 deletion js/tsconfig/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},

/* Basic stuff */
"moduleResolution": "Node",
"moduleResolution": "NodeNext",
"lib": ["DOM", "ESNext", "ESNext.AsyncIterable"],
"esModuleInterop": true,

Expand Down