Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(node): try @2060.io/ffi-napi fork as alternative to original ffi-napi #255

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 5 additions & 2 deletions .github/workflows/lint-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ jobs:

lint-typescript:
name: Lint Typescript
strategy:
matrix:
node-version: ['20', '21']
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: Install Node
- name: Install Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: ${{ matrix.node-version }}

- name: Lint Typescript source
working-directory: flipt-client-node
Expand Down
2 changes: 2 additions & 0 deletions flipt-client-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ To work around this issue you'll need to downgrade to Node v20 or lower. :(

We plan to look into alternative ffi libraries for node in the future. See [#200](https://github.com/flipt-io/flipt-client-sdks/issues/200)

For alpine, `python3 g++ make` packages may be required.

### Vitest

If you are using this library in combination with [vitest](https://github.com/vitest-dev/vitest), you may run into segmentation fault issues. This is due to the fact that `vitest` does not work nicely with `ffi-napi` by default.
Expand Down
70 changes: 35 additions & 35 deletions flipt-client-node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flipt-client-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"dependencies": {
"@types/ffi": "^0.2.7",
"ffi-napi": "^4.0.3",
"ref-napi": "^3.0.3"
"@2060.io/ffi-napi": "^4.0.3",
"@2060.io/ref-napi": "^3.0.3"
},
"devDependencies": {
"@types/ffi-napi": "^4.0.10",
Expand Down
4 changes: 2 additions & 2 deletions flipt-client-node/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as ffi from 'ffi-napi';
import { Pointer, allocCString } from 'ref-napi';
import * as ffi from '@2060.io/ffi-napi';
import { Pointer, allocCString } from '@2060.io/ref-napi';
import * as os from 'os';
import {
AuthenticationStrategy,
Expand Down
Loading