Skip to content
Merged
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
1 change: 1 addition & 0 deletions js/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module.exports = {
"@typescript-eslint/no-misused-new": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "off",
"@typescript-eslint/no-unused-vars": "off", // ts already takes care of this

"prefer-const": ["error", {
Expand Down
2 changes: 1 addition & 1 deletion js/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"jest.jestCommandLine": "node --experimental-vm-modules node_modules/jest/bin/jest.js --config jest.config.js",
"jest.autoRun": {"watch": false, "onSave": "test-src-file"},
"jest.runMode": { "type": "on-save", "testFileOnly": true },
"typescript.preferences.importModuleSpecifierEnding": "js"
}
58 changes: 29 additions & 29 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,69 +52,69 @@
"jest.config.js"
],
"dependencies": {
"@swc/helpers": "^0.5.2",
"@types/command-line-args": "^5.2.1",
"@types/command-line-usage": "^5.0.2",
"@types/node": "^20.6.0",
"@swc/helpers": "^0.5.10",
"@types/command-line-args": "^5.2.3",
"@types/command-line-usage": "^5.0.4",
"@types/node": "^20.12.7",
"command-line-args": "^5.2.1",
"command-line-usage": "^7.0.1",
"flatbuffers": "^23.5.26",
"flatbuffers": "^24.3.25",
"json-bignum": "^0.0.3",
"tslib": "^2.6.2"
},
"devDependencies": {
"@openpgp/web-stream-tools": "0.0.13",
"@rollup/plugin-alias": "5.0.0",
"@rollup/plugin-node-resolve": "15.1.0",
"@rollup/plugin-alias": "5.1.0",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/stream": "3.0.1",
"@swc/core": "1.3.82",
"@types/benchmark": "2.1.4",
"@swc/core": "1.4.14",
"@types/benchmark": "2.1.5",
"@types/glob": "8.1.0",
"@types/jest": "29.5.3",
"@types/jest": "29.5.12",
"@types/multistream": "4.1.3",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@typescript-eslint/eslint-plugin": "7.7.0",
"@typescript-eslint/parser": "7.7.0",
"async-done": "2.0.0",
"benny": "3.7.1",
"cross-env": "7.0.3",
"del": "7.1.0",
"del-cli": "5.1.0",
"esbuild": "0.20.0",
"esbuild": "0.20.2",
"esbuild-plugin-alias": "0.2.1",
"eslint": "8.52.0",
"eslint-plugin-jest": "27.4.2",
"eslint-plugin-unicorn": "49.0.0",
"eslint": "8.57.0",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-unicorn": "52.0.0",
"esm": "https://github.com/jsg2021/esm/releases/download/v3.x.x-pr883/esm-3.x.x-pr883.tgz",
"glob": "10.3.10",
"google-closure-compiler": "20230802.0.0",
"gulp": "4.0.2",
"gulp-esbuild": "0.11.1",
"gulp-json-transform": "0.4.8",
"glob": "10.3.12",
"google-closure-compiler": "20240317.0.0",
"gulp-esbuild": "0.12.0",
"gulp-json-transform": "0.5.0",
"gulp-rename": "2.0.0",
"gulp-replace": "1.1.4",
"gulp-sourcemaps": "3.0.0",
"gulp-terser": "2.1.0",
"gulp-typescript": "5.0.1",
"gulp-vinyl-size": "1.1.4",
"ix": "5.0.0",
"jest": "29.6.2",
"jest": "29.7.0",
"jest-silent-reporter": "0.5.0",
"memfs": "4.5.0",
"memfs": "4.8.2",
"mkdirp": "3.0.1",
"multistream": "4.1.0",
"regenerator-runtime": "0.14.1",
"rollup": "4.3.0",
"rollup": "4.14.3",
"rxjs": "7.8.1",
"ts-jest": "29.1.1",
"ts-node": "10.9.1",
"typedoc": "0.24.8",
"typescript": "5.1.6",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typedoc": "0.25.13",
"typescript": "5.4.5",
"vinyl-buffer": "1.0.1",
"vinyl-named": "1.1.0",
"vinyl-source-stream": "2.0.0",
"web-streams-polyfill": "3.2.1",
"webpack": "5.86.0",
"webpack-bundle-analyzer": "4.10.1",
"webpack": "5.91.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-stream": "7.0.0",
"xml2js": "0.6.2"
},
Expand Down
2 changes: 1 addition & 1 deletion js/src/io/node/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class RecordBatchReaderDuplex<T extends TypeMap = any> extends Duplex {
async _pull(size: number, reader: RecordBatchReader<T>) {
let r: IteratorResult<RecordBatch<T>> | null = null;
while (this.readable && !(r = await reader.next()).done) {
if (!this.push(r.value) || (size != null && --size <= 0)) { break; }
if (!this.push(r!.value) || (size != null && --size <= 0)) { break; }
}
if (!this.readable || (r?.done && (reader.autoDestroy || (await reader.reset().open()).closed))) {
this.push(null);
Expand Down
2 changes: 1 addition & 1 deletion js/src/io/whatwg/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function recordBatchReaderThroughDOMStream<T extends TypeMap = any>(writa
let size = controller.desiredSize;
let r: IteratorResult<RecordBatch<T>> | null = null;
while (!(r = await reader.next()).done) {
controller.enqueue(r.value);
controller.enqueue(r!.value);
if (size != null && --size <= 0) {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions js/src/ipc/reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ export class RecordBatchReader<T extends TypeMap = any> extends ReadableInterop<
public [Symbol.asyncIterator](): AsyncIterableIterator<RecordBatch<T>> {
return (<AsyncIterableIterator<RecordBatch<T>>>this._impl)[Symbol.asyncIterator]();
}
public toDOMStream() {
public toDOMStream(): ReadableStream<RecordBatch<T>> {
return streamAdapters.toDOMStream<RecordBatch<T>>(
(this.isSync()
? { [Symbol.iterator]: () => this } as Iterable<RecordBatch<T>>
: { [Symbol.asyncIterator]: () => this } as AsyncIterable<RecordBatch<T>>));
}
public toNodeStream() {
public toNodeStream(): import('stream').Readable {
return streamAdapters.toNodeStream<RecordBatch<T>>(
(this.isSync()
? { [Symbol.iterator]: () => this } as Iterable<RecordBatch<T>>
Expand Down
Loading