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

Publish CLIs and N-API dependent modules #766

Open
amrbashir opened this issue Oct 18, 2024 · 0 comments
Open

Publish CLIs and N-API dependent modules #766

amrbashir opened this issue Oct 18, 2024 · 0 comments

Comments

@amrbashir
Copy link

amrbashir commented Oct 18, 2024

I am trying to publish @tauri-apps/cli package to JSR to make it easier for deno projects to consume. We also want to publish @tauri-apps/api as well and benefit from automatic documentation.

Our current CLI is written in Rust and uses NAPI-rs to generate a .node module and is published in a separate package for each OS+Arch combination, see https://www.npmjs.com/package/@tauri-apps/cli-win32-arm64-msvc. It is currently published to NPM and can work with deno project using npm: specifier.

However, when I have attempted to publish it to JSR in this commit tauri-apps/tauri@b01893d I have ran into issues:

  1. package.json > bin field doesn't seem to be respected and deno task tauri doesn't seem to run the CLI script (I added "tauri": "tauri" in tasks in deno.json which works with npm: specifier).
  2. JSR requires at least one export but @tauri-apps/cli-win32-arm64-msvc doesn't have any entry points and only includes a .node file that will be required by the main @tauri-apps/cli.
  3. deno add @tauri-apps/cli or deno install doesn't automatically pull the relevant package for the OS+Arch, for example on Windows x64, it should also pull @tauri-apps/cli-win32-x64-msvc

Current published packages to test and inspect:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant