File tree Expand file tree Collapse file tree 11 files changed +35
-17
lines changed Expand file tree Collapse file tree 11 files changed +35
-17
lines changed Original file line number Diff line number Diff line change 9
9
steps :
10
10
- uses : actions/checkout@v3
11
11
- run : npm i
12
- - run : npm run build
13
12
- run : npm run lint
13
+ - run : npm run typecheck
14
14
- run : npm test
Original file line number Diff line number Diff line change 31
31
< body >
32
32
< div id ="dropzone "> Drop .parquet file here</ div >
33
33
< script type ="module ">
34
- import { parquetMetadata , toJson } from './dist /metadata.js'
34
+ import { parquetMetadata , toJson } from './src /metadata.js'
35
35
36
36
const dropZone = document . getElementById ( 'dropzone' )
37
37
Original file line number Diff line number Diff line change 11
11
"type" : " git" ,
12
12
"url" : " https://github.com/hyparam/hyparquet"
13
13
},
14
- "main" : " dist /hyparquet.js" ,
14
+ "main" : " src /hyparquet.js" ,
15
15
"files" : [
16
- " dist "
16
+ " src "
17
17
],
18
18
"type" : " module" ,
19
- "types" : " dist /hyparquet.d.ts" ,
19
+ "types" : " src /hyparquet.d.ts" ,
20
20
"scripts" : {
21
- "build" : " tsc && cp src/*.js dist" ,
22
21
"coverage" : " vitest run --coverage" ,
23
22
"demo" : " http-server -o" ,
24
- "lint" : " eslint . --ext .ts,.js" ,
25
- "test" : " vitest run"
23
+ "lint" : " eslint ." ,
24
+ "test" : " vitest run" ,
25
+ "typecheck" : " tsc"
26
26
},
27
27
"devDependencies" : {
28
28
"@types/node" : " 20.10.6" ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Read parquet data rows from a file
3
+ *
4
+ * @param {ArrayBuffer } arrayBuffer parquet file contents
5
+ * @returns {any[][] } row data
6
+ */
7
+ export function parquetRead ( arrayBuffer : ArrayBuffer ) : any [ ] [ ]
8
+
9
+
10
+ /**
11
+ * Read parquet header, metadata, and schema information from a file
12
+ *
13
+ * @typedef {import("./hyparquet.js").FileMetaData } FileMetaData
14
+ * @param {ArrayBuffer } arrayBuffer parquet file contents
15
+ * @returns {FileMetaData } metadata object
16
+ */
17
+ export function parquetMetadata ( arrayBuffer : ArrayBuffer ) : any
Original file line number Diff line number Diff line change 1
1
import { parquetMetadata } from './metadata.js'
2
+ export { parquetMetadata }
2
3
3
4
/**
4
5
* Read parquet data rows from a file
5
6
*
6
7
* @param {ArrayBuffer } arrayBuffer parquet file contents
7
8
* @returns {any[][] } row data
8
9
*/
9
- export function parquetRead ( arrayBuffer : ArrayBuffer ) : any [ ] [ ] {
10
+ export function parquetRead ( arrayBuffer ) {
10
11
const metadata = parquetMetadata ( arrayBuffer )
11
12
throw new Error ( 'not implemented' )
12
13
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { deserializeTCompactProtocol } from './thrift.js'
3
3
/**
4
4
* Read parquet header, metadata, and schema information from a file
5
5
*
6
- * @typedef {import("./types.js ").FileMetaData } FileMetaData
6
+ * @typedef {import("./types.d.ts ").FileMetaData } FileMetaData
7
7
* @param {ArrayBuffer } arrayBuffer parquet file contents
8
8
* @returns {FileMetaData } metadata object
9
9
*/
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const CompactType = {
19
19
/**
20
20
* Parse TCompactProtocol
21
21
*
22
- * @typedef {import("./types.js ").Decoded<T> } Decoded
22
+ * @typedef {import("./types.d.ts ").Decoded<T> } Decoded
23
23
* @template T
24
24
* @param {ArrayBuffer } arrayBuffer
25
25
* @returns {Decoded<Record<string, any>> }
Original file line number Diff line number Diff line change 1
1
import { promises as fs } from 'fs'
2
2
import { describe , expect , it } from 'vitest'
3
- import { parquetMetadata , toJson } from '../src/metadata'
3
+ import { parquetMetadata , toJson } from '../src/metadata.js '
4
4
5
5
/**
6
6
* Helper function to read .parquet file into ArrayBuffer
Original file line number Diff line number Diff line change 1
1
import { describe , expect , it } from 'vitest'
2
- import { snappyUncompress } from '../src/snappy'
2
+ import { snappyUncompress } from '../src/snappy.js '
3
3
4
4
describe ( 'snappy uncompress' , ( ) => {
5
5
it ( 'decompresses valid input correctly' , ( ) => {
Original file line number Diff line number Diff line change 1
1
import { describe , expect , it } from 'vitest'
2
- import { deserializeTCompactProtocol , toVarInt } from '../src/thrift'
2
+ import { deserializeTCompactProtocol , toVarInt } from '../src/thrift.js '
3
3
4
4
describe ( 'deserializeTCompactProtocol function' , ( ) => {
5
5
Original file line number Diff line number Diff line change 4
4
"checkJs" : true ,
5
5
"lib" : [" esnext" , " dom" ],
6
6
"module" : " nodenext" ,
7
- "outDir" : " dist" ,
7
+ "noEmit" : true ,
8
+ "resolveJsonModule" : true ,
8
9
"skipLibCheck" : true ,
9
- "sourceMap" : true ,
10
10
"strict" : true ,
11
11
"target" : " esnext" ,
12
12
},
13
- "include" : [" src" ]
13
+ "include" : [" src" , " test " ]
14
14
}
You can’t perform that action at this time.
0 commit comments