diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index ace1fa2..dc0adcb 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -14,11 +14,12 @@ jobs: include: - { target: x86_64-apple-darwin, os: macos-latest } - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } + - { target: aarch64-apple-darwin, os: macos-latest } - { target: x86_64-pc-windows-msvc, os: windows-latest } runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: cache: npm - run: rustup toolchain install stable -t "$TARGET" @@ -34,7 +35,7 @@ jobs: shell: bash env: TARGET: ${{ matrix.target }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ matrix.target }} path: | @@ -50,7 +51,7 @@ jobs: with: cache: npm registry-url: https://registry.npmjs.org/ - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: artifacts - run: npm ci diff --git a/Cargo.lock b/Cargo.lock index f3d6ee1..212aa51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" @@ -710,7 +710,7 @@ dependencies = [ ] [[package]] -name = "rfd-node" +name = "rfd-js" version = "0.0.0" dependencies = [ "futures", diff --git a/README.md b/README.md index ee0979f..799bfdb 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,14 @@ if (answer) { also refer to the original [rfd crate documentation] if you want to learn more about the features and limitations inherited from the Rust API. +## Known Limitations + +### Focus Issues + +File dialogs may not always appear focused or on top of other windows. This is a known limitation of the underlying `rfd` crate. For better focus behavior: + +- Use synchronous dialogs (`FileDialog`, `MessageDialog`) instead of async ones when possible + ## Development ![Rust](https://img.shields.io/static/v1?style=for-the-badge&message=Rust&color=000000&logo=Rust&logoColor=FFFFFF&label=) diff --git a/package.json b/package.json index 516d6a9..f6c3de9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,10 @@ { "type": "commonjs", "name": "@bindrs/rfd", - "version": "2.2.2", + "version": "2.2.3", + "private": false, + "main": "index.js", + "types": "index.d.ts", "description": "📂 Lets you open native file picker and message boxes in JavaScript!", "keywords": [ "bindings", @@ -10,6 +13,9 @@ "nodejs-addon", "rust" ], + "publishConfig": { + "access": "public" + }, "license": "MIT", "contributors": [ "Jacob Hummer (https://jcbhmr.me/)" @@ -18,9 +24,26 @@ "repository": "github:bindrs/rfd", "bugs": "https://github.com/bindrs/rfd/issues", "exports": { - "deno": "./index.js", - "bun": "./index.js", - "node-addons": "./index.js" + "deno": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "bun": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "node-addons": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "node": { + "types": "./index.d.ts", + "default": "./index.js" + }, + "default": { + "types": "./index.d.ts", + "default": "./index.js" + } }, "files": [ "*.node",