@loaders.gl/parquet 4.0.0-alpha.21 → 4.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/parquet",
3
- "version": "4.0.0-alpha.21",
3
+ "version": "4.0.0-alpha.22",
4
4
  "description": "Framework-independent loader for Apache Parquet files",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -41,10 +41,10 @@
41
41
  "./src/lib/wasm/load-wasm/load-wasm-node.ts": "./src/lib/wasm/load-wasm/load-wasm-browser.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@loaders.gl/bson": "4.0.0-alpha.21",
45
- "@loaders.gl/compression": "4.0.0-alpha.21",
46
- "@loaders.gl/loader-utils": "4.0.0-alpha.21",
47
- "@loaders.gl/schema": "4.0.0-alpha.21",
44
+ "@loaders.gl/bson": "4.0.0-alpha.22",
45
+ "@loaders.gl/compression": "4.0.0-alpha.22",
46
+ "@loaders.gl/loader-utils": "4.0.0-alpha.22",
47
+ "@loaders.gl/schema": "4.0.0-alpha.22",
48
48
  "async-mutex": "^0.2.2",
49
49
  "brotli": "^1.3.2",
50
50
  "int53": "^0.2.4",
@@ -67,5 +67,5 @@
67
67
  "@types/varint": "^5.0.0",
68
68
  "apache-arrow": "^9.0.0"
69
69
  },
70
- "gitHead": "df5d670b136192b26941396e944f9c46be788e83"
70
+ "gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2"
71
71
  }
@@ -1,25 +1,22 @@
1
+ // loaders.gl, MIT license
2
+
1
3
  import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';
4
+ import type {Table as ArrowTable} from 'apache-arrow';
2
5
 
3
6
  // __VERSION__ is injected by babel-plugin-version-inline
4
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
5
8
  const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
6
9
 
7
- export type ParquetLoaderOptions = LoaderOptions & {
10
+ /** Parquet WASM loader options */
11
+ export type ParquetWasmLoaderOptions = LoaderOptions & {
8
12
  parquet?: {
9
13
  type?: 'arrow-table';
10
14
  wasmUrl?: string;
11
15
  };
12
16
  };
13
17
 
14
- const DEFAULT_PARQUET_LOADER_OPTIONS: ParquetLoaderOptions = {
15
- parquet: {
16
- type: 'arrow-table',
17
- wasmUrl: 'https://unpkg.com/parquet-wasm@0.3.1/esm2/arrow1_bg.wasm'
18
- }
19
- };
20
-
21
- /** ParquetJS table loader */
22
- export const ParquetWasmLoader = {
18
+ /** Parquet WASM table loader */
19
+ export const ParquetWasmLoader: Loader<ArrowTable, never, ParquetWasmLoaderOptions> = {
23
20
  name: 'Apache Parquet',
24
21
  id: 'parquet-wasm',
25
22
  module: 'parquet',
@@ -30,7 +27,10 @@ export const ParquetWasmLoader = {
30
27
  mimeTypes: ['application/octet-stream'],
31
28
  binary: true,
32
29
  tests: ['PAR1', 'PARE'],
33
- options: DEFAULT_PARQUET_LOADER_OPTIONS
30
+ options: {
31
+ parquet: {
32
+ type: 'arrow-table',
33
+ wasmUrl: 'https://unpkg.com/parquet-wasm@0.3.1/esm2/arrow1_bg.wasm'
34
+ }
35
+ }
34
36
  };
35
-
36
- export const _typecheckParquetLoader: Loader = ParquetWasmLoader;
@@ -1,17 +1,15 @@
1
+ // loaders.gl, MIT license
2
+
1
3
  import type {Writer} from '@loaders.gl/loader-utils';
2
4
  import {encode, ParquetWriterOptions} from './lib/wasm/encode-parquet-wasm';
5
+ import type {Table as ArrowTable} from 'apache-arrow';
3
6
 
4
7
  // __VERSION__ is injected by babel-plugin-version-inline
5
8
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
6
9
  const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
7
10
 
8
- const DEFAULT_PARQUET_WRITER_OPTIONS: ParquetWriterOptions = {
9
- parquet: {
10
- wasmUrl: 'https://unpkg.com/parquet-wasm@0.3.1/esm2/arrow1_bg.wasm'
11
- }
12
- };
13
-
14
- export const ParquetWasmWriter: Writer = {
11
+ /** Parquet WASM writer */
12
+ export const ParquetWasmWriter: Writer<ArrowTable, never, ParquetWriterOptions> = {
15
13
  name: 'Apache Parquet',
16
14
  id: 'parquet-wasm',
17
15
  module: 'parquet',
@@ -20,5 +18,9 @@ export const ParquetWasmWriter: Writer = {
20
18
  mimeTypes: ['application/octet-stream'],
21
19
  encode,
22
20
  binary: true,
23
- options: DEFAULT_PARQUET_WRITER_OPTIONS
21
+ options: {
22
+ parquet: {
23
+ wasmUrl: 'https://unpkg.com/parquet-wasm@0.3.1/esm2/arrow1_bg.wasm'
24
+ }
25
+ }
24
26
  };