Skip to content

Commit

Permalink
fix: look for prebuilds in the root path
Browse files Browse the repository at this point in the history
fixes #121
  • Loading branch information
dvirtz committed Apr 12, 2024
1 parent 273aaf9 commit 8b94ae2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/parquet-reader/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import bindings from 'pkg-prebuilds';
import { Stream } from 'stream';
import bindingOptions from './binding-options';
import * as path from 'path';

interface ParquetReader
{
readParquet: (path: string, stream: Stream) => void;
}

export const { readParquet } = bindings<ParquetReader>(__dirname, bindingOptions);
const rootPath = path.basename(__dirname) == 'dist' ? path.join(__dirname, '..') : __dirname;

export const { readParquet } = bindings<ParquetReader>(rootPath, bindingOptions);
2 changes: 1 addition & 1 deletion packages/parquet-reader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "dist/index.js",
"scripts": {
"vscode:prepublish": "tsc --build",
"build": "pipenv run cmake-js build",
"build": "pipenv run cmake-js build && tsc --build && pkg-prebuilds-verify dist/binding-options.js",
"rebuild": "pipenv run cmake-js rebuild",
"build:debug": "npm run rebuild -- -D",
"preinstall": "pipenv install && tsc --build",
Expand Down

0 comments on commit 8b94ae2

Please sign in to comment.