arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-1544: [JS] Export Vector types
Date Sun, 17 Sep 2017 23:12:23 GMT
Repository: arrow
Updated Branches:
  refs/heads/master bfe657909 -> e09377245


ARROW-1544: [JS] Export Vector types

Resolves https://issues.apache.org/jira/browse/ARROW-1544

Author: Paul Taylor <paul.e.taylor@me.com>

Closes #1103 from trxcllnt/js-export-vector-typedefs and squashes the following commits:

91a0625 [Paul Taylor] use gulp 4 from github. thought 4-alpha was on npm already.
e5a1034 [Paul Taylor] fix jest test coverage script
c6b09ee [Paul Taylor] export Vector types on root Arrow export
032ad27 [Paul Taylor] add compileOnSave (now required by TS 2.5?)
eb96552 [Paul Taylor] update dependencies


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/e0937724
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/e0937724
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/e0937724

Branch: refs/heads/master
Commit: e093772450ed90ff0ecc76c122cee2af8a56b655
Parents: bfe6579
Author: Paul Taylor <paul.e.taylor@me.com>
Authored: Sun Sep 17 19:12:14 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sun Sep 17 19:12:14 2017 -0400

----------------------------------------------------------------------
 js/gulpfile.js                 |  80 +++++++++++++--------------
 js/package.json                |  21 ++++----
 js/src/Arrow.externs.ts        |   8 +++
 js/src/Arrow.internal.ts       | 105 ------------------------------------
 js/src/Arrow.ts                |  60 ++++++++++++++++++++-
 js/test/Arrow.ts               |  71 ++++++++++++++----------
 js/test/vector-tests.ts        |  38 +++++++------
 js/tsconfig/tsconfig.base.json |   1 +
 8 files changed, 181 insertions(+), 203 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/gulpfile.js
----------------------------------------------------------------------
diff --git a/js/gulpfile.js b/js/gulpfile.js
index 90c45b7..9c945aa 100644
--- a/js/gulpfile.js
+++ b/js/gulpfile.js
@@ -84,7 +84,7 @@ function runTaskCombos(name) {
 }
 
 function cleanTask(target, format, taskName, outDir) {
-    return () => {
+    return function cleanTask() {
         const globs = [`${outDir}/**`];
         if (target === `es5` && format === `cjs`) {
             globs.push(`typings`);
@@ -102,25 +102,27 @@ function buildTask(target, format, taskName, outDir) {
 function bundleTask(target, format, taskName, outDir) {
     return [
         [`build:${taskName}`],
-        (cb) => streamMerge([
-            pump(gulp.src([`LICENSE`, `README.md`, `CHANGELOG.md`]), gulp.dest(outDir)),
-            pump(
-                gulp.src(`package.json`),
-                gulpJsonTransform((orig) => [
-                    `version`, `description`,
-                    `author`, `homepage`, `bugs`, `license`,
-                    `keywords`, `repository`, `peerDependencies`
-                ].reduce((copy, key) => (
-                    (copy[key] = orig[key]) && copy || copy
-                ), {
-                    main: `Arrow.js`,
-                    typings: `Arrow.d.ts`,
-                    name: `@apache-arrow/${target}-${format}`
-                }), 2),
-                gulp.dest(outDir),
-                onError
-            )
-        ])
+        function bundleTask() {
+            return streamMerge([
+                pump(gulp.src([`LICENSE`, `README.md`]), gulp.dest(outDir), onError),
+                pump(
+                    gulp.src(`package.json`),
+                    gulpJsonTransform((orig) => [
+                        `version`, `description`,
+                        `author`, `homepage`, `bugs`, `license`,
+                        `keywords`, `repository`, `peerDependencies`
+                    ].reduce((copy, key) => (
+                        (copy[key] = orig[key]) && copy || copy
+                    ), {
+                        main: `Arrow.js`,
+                        typings: `Arrow.d.ts`,
+                        name: `@apache-arrow/${target}-${format}`
+                    }), 2),
+                    gulp.dest(outDir),
+                    onError
+                )
+            ])
+        }
     ];
 }
 
@@ -138,9 +140,11 @@ function testTask(target, format, taskName, outDir, debug) {
             TEST_TARGET: target, TEST_MODULE: format
         })
     };
-    return () => !debug ?
-        child_process.spawn(jestPath, jestOptions, spawnOptions) :
-        child_process.exec(`node --inspect-brk ${jestPath} ${debugOpts}`, spawnOptions);
+    return function testTask() {
+        return !debug ?
+            child_process.spawn(jestPath, jestOptions, spawnOptions) :
+            child_process.exec(`node --inspect-brk ${jestPath} ${debugOpts}`, spawnOptions);
+    }
 }
 
 function closureTask(target, format, taskName, outDir) {
@@ -149,38 +153,36 @@ function closureTask(target, format, taskName, outDir) {
     const languageIn = clsTarget === `es5` ? `es2015` : clsTarget;
     return [
         [`clean:${taskName}`, `build:${clsTarget}:cls`],
-        () => {
-            return streamMerge([
-                closureStream(closureSrcs(false), `Arrow`, onError, true),
-                closureStream(closureSrcs(true), `Arrow.internal`, onError)
-            ])
-            .on('end', () => del([`targets/${target}/cls/**`]));
+        function closureTask() {
+            return closureStream(
+                closureSrcs(),
+                closureCompiler(closureArgs())
+            ).on('end', () => del([`targets/${target}/cls/**`]));
         }
     ];
-    function closureSrcs(isInternal) {
+    function closureSrcs() {
         return gulp.src([
             `closure-compiler-scripts/*.js`,
             `${googleRoot}/**/*.js`,
             `!${googleRoot}/format/*.js`,
             `!${googleRoot}/Arrow.externs.js`,
-            `!${googleRoot}/Arrow${isInternal ? `` : `.internal`}.js`
         ], { base: `./` });
     }
-    function closureStream(sources, entry, onError, copyToDist) {
+    function closureStream(sources, compiler) {
         const streams = [
             sources,
             sourcemaps.init(),
-            closureCompiler(closureArgs(entry)),
+            compiler,
             sourcemaps.write('.'),
             gulp.dest(outDir)
         ];
-        // copy the UMD bundle to dist
-        if (target === `es5` && copyToDist) {
+        // copy the ES5 UMD bundle to dist
+        if (target === `es5`) {
             streams.push(gulp.dest(`dist`));
         }
         return pump(...streams, onError);
     }
-    function closureArgs(entry) {
+    function closureArgs() {
         return {
             third_party: true,
             externs: `${googleRoot}/Arrow.externs.js`,
@@ -190,10 +192,10 @@ function closureTask(target, format, taskName, outDir) {
             // formatting: `PRETTY_PRINT`,
             compilation_level: `ADVANCED`,
             assume_function_wrapper: true,
-            js_output_file: `${entry}.js`,
+            js_output_file: `Arrow.js`,
             language_in: gCCTargets[languageIn],
             language_out: gCCTargets[clsTarget],
-            entry_point: `${googleRoot}/${entry}.js`,
+            entry_point: `${googleRoot}/Arrow.js`,
             output_wrapper:
 `// Licensed to the Apache Software Foundation (ASF) under one
 // or more contributor license agreements.  See the NOTICE file
@@ -223,7 +225,7 @@ function closureTask(target, format, taskName, outDir) {
 function typescriptTask(target, format, taskName, outDir) {
     return [
         [`clean:${taskName}`],
-        () => {
+        function typescriptTask() {
             const tsconfigPath = `tsconfig/tsconfig.${target}.${format}.json`;
             let { js, dts } = tsProjects.find((p) => p.target === target && p.format
=== format) || {};
             if (!js || !dts) {

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/package.json
----------------------------------------------------------------------
diff --git a/js/package.json b/js/package.json
index 8998221..e6848fd 100644
--- a/js/package.json
+++ b/js/package.json
@@ -73,28 +73,28 @@
     "del": "~3.0.0",
     "esdoc": "~1.0.1",
     "esdoc-standard-plugin": "~1.0.0",
-    "google-closure-compiler": "~20170806.0.0",
+    "google-closure-compiler": "~20170910.0.0",
     "gulp": "github:gulpjs/gulp#4.0",
     "gulp-json-transform": "~0.4.2",
     "gulp-sourcemaps": "~2.6.1",
     "gulp-typescript": "~3.2.2",
-    "jest": "~20.0.4",
+    "jest": "~21.1.0",
     "jest-environment-node-debug": "~2.0.0",
     "json": "~9.0.6",
-    "lerna": "2.0.0",
-    "lint-staged": "~4.0.1",
-    "merge2": "~1.1.0",
+    "lerna": "~2.1.2",
+    "lint-staged": "~4.2.1",
+    "merge2": "~1.2.0",
     "mkdirp": "~0.5.1",
-    "npm-run-all": "~4.0.2",
+    "npm-run-all": "~4.1.1",
     "pump": "~1.0.2",
     "rimraf": "~2.6.1",
     "shx": "~0.2.2",
     "text-encoding-utf-8": "~1.0.1",
     "trash": "~4.0.1",
-    "ts-jest": "~20.0.10",
+    "ts-jest": "~21.0.1",
     "tslib": "~1.7.1",
-    "tslint": "~5.6.0",
-    "typescript": "~2.4.2",
+    "tslint": "~5.7.0",
+    "typescript": "~2.5.2",
     "validate-commit-msg": "~2.14.0"
   },
   "config": {
@@ -129,7 +129,8 @@
     ],
     "coveragePathIgnorePatterns": [
       "format\\/(File|Message|Schema|Tensor)_generated\\.(js|ts)$",
-      "test\\/.*\\.(ts|tsx|js)$"
+      "test\\/.*\\.(ts|tsx|js)$",
+      "/node_modules/"
     ],
     "transform": {
       ".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js",

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/src/Arrow.externs.ts
----------------------------------------------------------------------
diff --git a/js/src/Arrow.externs.ts b/js/src/Arrow.externs.ts
index 7342684..7289d6d 100644
--- a/js/src/Arrow.externs.ts
+++ b/js/src/Arrow.externs.ts
@@ -26,6 +26,8 @@ Symbol.iterator;
 Symbol.asyncIterator;
 let Table = function() {};
 /** @type {?} */
+Table.prototype.length;
+/** @type {?} */
 Table.prototype.rows;
 /** @type {?} */
 Table.prototype.cols;
@@ -65,3 +67,9 @@ TypedVector.prototype.arrayType;
 let ValidityVector = function() {};
 /** @type {?} */
 (<any> ValidityVector).pack;
+
+let DictionaryVector = function() {};
+/** @type {?} */
+DictionaryVector.prototype.index;
+/** @type {?} */
+DictionaryVector.prototype.value;

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/src/Arrow.internal.ts
----------------------------------------------------------------------
diff --git a/js/src/Arrow.internal.ts b/js/src/Arrow.internal.ts
deleted file mode 100644
index d8f0c37..0000000
--- a/js/src/Arrow.internal.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-import { Vector as Vector_ } from './vector/vector';
-import { StructVector as StructVector_ } from './vector/struct';
-import { DictionaryVector as DictionaryVector_ } from './vector/dictionary';
-import { ListVector as ListVector_, Utf8Vector as Utf8Vector_, FixedSizeListVector as FixedSizeListVector_
} from './vector/list';
-import {
-    TypedVector as TypedVector_, BitVector as BitVector_,
-    DateVector as DateVector_, IndexVector as IndexVector_,
-    Int8Vector as Int8Vector_, Int16Vector as Int16Vector_,
-    Int32Vector as Int32Vector_, Int64Vector as Int64Vector_,
-    Uint8Vector as Uint8Vector_, Uint16Vector as Uint16Vector_,
-    Uint32Vector as Uint32Vector_, Uint64Vector as Uint64Vector_,
-    Float32Vector as Float32Vector_, Float64Vector as Float64Vector_,
-} from './vector/typed';
-
-export const vectors = {
-    Vector: Vector_,
-    BitVector: BitVector_,
-    ListVector: ListVector_,
-    Utf8Vector: Utf8Vector_,
-    DateVector: DateVector_,
-    IndexVector: IndexVector_,
-    TypedVector: TypedVector_,
-    Int8Vector: Int8Vector_,
-    Int16Vector: Int16Vector_,
-    Int32Vector: Int32Vector_,
-    Int64Vector: Int64Vector_,
-    Uint8Vector: Uint8Vector_,
-    Uint16Vector: Uint16Vector_,
-    Uint32Vector: Uint32Vector_,
-    Uint64Vector: Uint64Vector_,
-    Float32Vector: Float32Vector_,
-    Float64Vector: Float64Vector_,
-    StructVector: StructVector_,
-    DictionaryVector: DictionaryVector_,
-    FixedSizeListVector: FixedSizeListVector_,
-};
-
-export namespace vectors {
-    export type Vector<T> =  Vector_<T>;
-    export type BitVector =  BitVector_;
-    export type ListVector<T> =  ListVector_<T>;
-    export type Utf8Vector =  Utf8Vector_;
-    export type DateVector =  DateVector_;
-    export type IndexVector =  IndexVector_;
-    export type Int8Vector =  Int8Vector_;
-    export type Int16Vector =  Int16Vector_;
-    export type Int32Vector =  Int32Vector_;
-    export type Int64Vector =  Int64Vector_;
-    export type Uint8Vector =  Uint8Vector_;
-    export type Uint16Vector =  Uint16Vector_;
-    export type Uint32Vector =  Uint32Vector_;
-    export type Uint64Vector =  Uint64Vector_;
-    export type Float32Vector =  Float32Vector_;
-    export type Float64Vector =  Float64Vector_;
-    export type StructVector =  StructVector_;
-    export type DictionaryVector<T> =  DictionaryVector_<T>;
-    export type FixedSizeListVector<T> =  FixedSizeListVector_<T>;
-    export type TypedVector<T, TArray> =  TypedVector_<T, TArray>;
-}
-
-/* These exports are needed for the closure umd targets */
-try {
-    const Arrow = eval('exports');
-    if (typeof Arrow === 'object') {
-        // string indexers tell closure compiler not to rename these properties
-        Arrow['vectors'] = {};
-        Arrow['vectors']['Vector'] = Vector_;
-        Arrow['vectors']['BitVector'] = BitVector_;
-        Arrow['vectors']['ListVector'] = ListVector_;
-        Arrow['vectors']['Utf8Vector'] = Utf8Vector_;
-        Arrow['vectors']['DateVector'] = DateVector_;
-        Arrow['vectors']['IndexVector'] = IndexVector_;
-        Arrow['vectors']['Int8Vector'] = Int8Vector_;
-        Arrow['vectors']['Int16Vector'] = Int16Vector_;
-        Arrow['vectors']['Int32Vector'] = Int32Vector_;
-        Arrow['vectors']['Int64Vector'] = Int64Vector_;
-        Arrow['vectors']['Uint8Vector'] = Uint8Vector_;
-        Arrow['vectors']['Uint16Vector'] = Uint16Vector_;
-        Arrow['vectors']['Uint32Vector'] = Uint32Vector_;
-        Arrow['vectors']['Uint64Vector'] = Uint64Vector_;
-        Arrow['vectors']['Float32Vector'] = Float32Vector_;
-        Arrow['vectors']['Float64Vector'] = Float64Vector_;
-        Arrow['vectors']['StructVector'] = StructVector_;
-        Arrow['vectors']['DictionaryVector'] = DictionaryVector_;
-        Arrow['vectors']['FixedSizeListVector'] = FixedSizeListVector_;
-    }
-} catch (e) { /* not the UMD bundle */ }
-/** end closure exports */

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/src/Arrow.ts
----------------------------------------------------------------------
diff --git a/js/src/Arrow.ts b/js/src/Arrow.ts
index fe19645..ea8a5c3 100644
--- a/js/src/Arrow.ts
+++ b/js/src/Arrow.ts
@@ -17,7 +17,43 @@
 
 import { Table } from './table';
 import { readBuffers } from './reader/arrow';
-export { Table, readBuffers };
+import { Vector } from './vector/vector';
+import { StructVector } from './vector/struct';
+import { DictionaryVector } from './vector/dictionary';
+import { ListVector, Utf8Vector, FixedSizeListVector } from './vector/list';
+import {
+    TypedVector, BitVector,
+    DateVector, IndexVector,
+    Int8Vector, Int16Vector,
+    Int32Vector, Int64Vector,
+    Uint8Vector, Uint16Vector,
+    Uint32Vector, Uint64Vector,
+    Float32Vector, Float64Vector,
+} from './vector/typed';
+
+export {
+    Table, readBuffers,
+    Vector,
+    BitVector,
+    ListVector,
+    Utf8Vector,
+    DateVector,
+    IndexVector,
+    TypedVector,
+    Int8Vector,
+    Int16Vector,
+    Int32Vector,
+    Int64Vector,
+    Uint8Vector,
+    Uint16Vector,
+    Uint32Vector,
+    Uint64Vector,
+    Float32Vector,
+    Float64Vector,
+    StructVector,
+    DictionaryVector,
+    FixedSizeListVector,
+};
 
 /* These exports are needed for the closure umd targets */
 try {
@@ -26,6 +62,26 @@ try {
         // string indexers tell closure compiler not to rename these properties
         Arrow['Table'] = Table;
         Arrow['readBuffers'] = readBuffers;
+        Arrow['Vector'] = Vector;
+        Arrow['BitVector'] = BitVector;
+        Arrow['ListVector'] = ListVector;
+        Arrow['Utf8Vector'] = Utf8Vector;
+        Arrow['DateVector'] = DateVector;
+        Arrow['IndexVector'] = IndexVector;
+        Arrow['TypedVector'] = TypedVector;
+        Arrow['Int8Vector'] = Int8Vector;
+        Arrow['Int16Vector'] = Int16Vector;
+        Arrow['Int32Vector'] = Int32Vector;
+        Arrow['Int64Vector'] = Int64Vector;
+        Arrow['Uint8Vector'] = Uint8Vector;
+        Arrow['Uint16Vector'] = Uint16Vector;
+        Arrow['Uint32Vector'] = Uint32Vector;
+        Arrow['Uint64Vector'] = Uint64Vector;
+        Arrow['Float32Vector'] = Float32Vector;
+        Arrow['Float64Vector'] = Float64Vector;
+        Arrow['StructVector'] = StructVector;
+        Arrow['DictionaryVector'] = DictionaryVector;
+        Arrow['FixedSizeListVector'] = FixedSizeListVector;
     }
 } catch (e) { /* not the UMD bundle */ }
-/** end closure exports */
+/* end closure exports */

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/test/Arrow.ts
----------------------------------------------------------------------
diff --git a/js/test/Arrow.ts b/js/test/Arrow.ts
index a9ab2b7..3f29c54 100644
--- a/js/test/Arrow.ts
+++ b/js/test/Arrow.ts
@@ -34,34 +34,51 @@ if (!~targets.indexOf(target)) throwInvalidImportError('target', target,
targets
 if (!~formats.indexOf(format)) throwInvalidImportError('module', format, formats);
 
 let Arrow: any = require(resolve(`./targets/${target}/${format}/Arrow.js`));
-let ArrowInternal: any = require(resolve(`./targets/${target}/${format}/Arrow.internal.js`));
 
-import { vectors as vectors_ } from '../src/Arrow.internal';
-import { Table as Table_, readBuffers as readBuffers_ } from '../src/Arrow';
+import {
+    Table as Table_,
+    readBuffers as readBuffers_,
+    Vector as Vector_,
+    BitVector as BitVector_,
+    ListVector as ListVector_,
+    Utf8Vector as Utf8Vector_,
+    DateVector as DateVector_,
+    IndexVector as IndexVector_,
+    TypedVector as TypedVector_,
+    Int8Vector as Int8Vector_,
+    Int16Vector as Int16Vector_,
+    Int32Vector as Int32Vector_,
+    Int64Vector as Int64Vector_,
+    Uint8Vector as Uint8Vector_,
+    Uint16Vector as Uint16Vector_,
+    Uint32Vector as Uint32Vector_,
+    Uint64Vector as Uint64Vector_,
+    Float32Vector as Float32Vector_,
+    Float64Vector as Float64Vector_,
+    StructVector as StructVector_,
+    DictionaryVector as DictionaryVector_,
+    FixedSizeListVector as FixedSizeListVector_,
+} from '../src/Arrow';
 
 export let Table = Arrow.Table as typeof Table_;
 export let readBuffers = Arrow.readBuffers as typeof readBuffers_;
-
-export let vectors: typeof vectors_ = ArrowInternal.vectors;
-export namespace vectors {
-    export type Vector<T> = vectors_.Vector<T>;
-    export type BitVector = vectors_.BitVector;
-    export type ListVector<T> = vectors_.ListVector<T>;
-    export type Utf8Vector = vectors_.Utf8Vector;
-    export type DateVector = vectors_.DateVector;
-    export type IndexVector = vectors_.IndexVector;
-    export type Int8Vector = vectors_.Int8Vector;
-    export type Int16Vector = vectors_.Int16Vector;
-    export type Int32Vector = vectors_.Int32Vector;
-    export type Int64Vector = vectors_.Int64Vector;
-    export type Uint8Vector = vectors_.Uint8Vector;
-    export type Uint16Vector = vectors_.Uint16Vector;
-    export type Uint32Vector = vectors_.Uint32Vector;
-    export type Uint64Vector = vectors_.Uint64Vector;
-    export type Float32Vector = vectors_.Float32Vector;
-    export type Float64Vector = vectors_.Float64Vector;
-    export type StructVector = vectors_.StructVector;
-    export type DictionaryVector<T> = vectors_.DictionaryVector<T>;
-    export type FixedSizeListVector<T> = vectors_.FixedSizeListVector<T>;
-};
-
+export let Vector = Arrow.Vector as typeof Vector_;
+export let BitVector = Arrow.BitVector as typeof BitVector_;
+export let ListVector = Arrow.ListVector as typeof ListVector_;
+export let Utf8Vector = Arrow.Utf8Vector as typeof Utf8Vector_;
+export let DateVector = Arrow.DateVector as typeof DateVector_;
+export let IndexVector = Arrow.IndexVector as typeof IndexVector_;
+export let TypedVector = Arrow.TypedVector as typeof TypedVector_;
+export let Int8Vector = Arrow.Int8Vector as typeof Int8Vector_;
+export let Int16Vector = Arrow.Int16Vector as typeof Int16Vector_;
+export let Int32Vector = Arrow.Int32Vector as typeof Int32Vector_;
+export let Int64Vector = Arrow.Int64Vector as typeof Int64Vector_;
+export let Uint8Vector = Arrow.Uint8Vector as typeof Uint8Vector_;
+export let Uint16Vector = Arrow.Uint16Vector as typeof Uint16Vector_;
+export let Uint32Vector = Arrow.Uint32Vector as typeof Uint32Vector_;
+export let Uint64Vector = Arrow.Uint64Vector as typeof Uint64Vector_;
+export let Float32Vector = Arrow.Float32Vector as typeof Float32Vector_;
+export let Float64Vector = Arrow.Float64Vector as typeof Float64Vector_;
+export let StructVector = Arrow.StructVector as typeof StructVector_;
+export let DictionaryVector = Arrow.DictionaryVector as typeof DictionaryVector_;
+export let FixedSizeListVector = Arrow.FixedSizeListVector as typeof FixedSizeListVector_;

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/test/vector-tests.ts
----------------------------------------------------------------------
diff --git a/js/test/vector-tests.ts b/js/test/vector-tests.ts
index 54d50d1..0c9ef44 100644
--- a/js/test/vector-tests.ts
+++ b/js/test/vector-tests.ts
@@ -15,30 +15,28 @@
 // specific language governing permissions and limitations
 // under the License.
 
-import { vectors } from './Arrow';
 import { flatbuffers } from 'flatbuffers';
 import Long = flatbuffers.Long;
-const BitVector = vectors.BitVector;
-const TypedVector = vectors.TypedVector;
+import {
+    BitVector,
+    TypedVector,
+    Int64Vector,
+    Uint64Vector,
+    Int8Vector,
+    Int16Vector,
+    Int32Vector,
+    Uint8Vector,
+    Uint16Vector,
+    Uint32Vector,
+    Float32Vector,
+    Float64Vector,
+} from './Arrow';
 
-const LongVectors = {
-    Int64Vector: vectors.Int64Vector,
-    Uint64Vector: vectors.Uint64Vector,
-};
+const LongVectors = { Int64Vector, Uint64Vector };
+const ByteVectors = { Int8Vector, Int16Vector, Int32Vector, Uint8Vector, Uint16Vector, Uint32Vector,
Float32Vector, Float64Vector };
 
-const ByteVectors = {
-    Int8Vector: vectors.Int8Vector,
-    Int16Vector: vectors.Int16Vector,
-    Int32Vector: vectors.Int32Vector,
-    Uint8Vector: vectors.Uint8Vector,
-    Uint16Vector: vectors.Uint16Vector,
-    Uint32Vector: vectors.Uint32Vector,
-    Float32Vector: vectors.Float32Vector,
-    Float64Vector: vectors.Float64Vector,
-};
-
-const longVectors = toMap<typeof TypedVector>(vectors, Object.keys(LongVectors));
-const byteVectors = toMap<typeof TypedVector>(vectors, Object.keys(ByteVectors));
+const longVectors = toMap<typeof TypedVector>(LongVectors, Object.keys(LongVectors));
+const byteVectors = toMap<typeof TypedVector>(ByteVectors, Object.keys(ByteVectors));
 const bytes = Array.from(
     { length: 5 },
     () => Uint8Array.from(

http://git-wip-us.apache.org/repos/asf/arrow/blob/e0937724/js/tsconfig/tsconfig.base.json
----------------------------------------------------------------------
diff --git a/js/tsconfig/tsconfig.base.json b/js/tsconfig/tsconfig.base.json
index 4723854..4a46ed1 100644
--- a/js/tsconfig/tsconfig.base.json
+++ b/js/tsconfig/tsconfig.base.json
@@ -1,6 +1,7 @@
 {
   "exclude": ["../node_modules"],
   "include": ["../src/**/*.ts"],
+  "compileOnSave": false,
   "compilerOptions": {
     "lib": ["dom", "esnext", "esnext.asynciterable"],
     "moduleResolution": "node",


Mime
View raw message