Skip to content

Commit

Permalink
readme updates (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkaliski authored May 7, 2024
1 parent 0d97b76 commit dd3c831
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ Running:

- `bun install`
- `bun run build` / `bun run build:debug`
- `bun test`
- `bun test:linux` on Linux
- `npm run test:darwin` on macOS

The code mainly targets Bun, but does work in Node too.
The code mainly targets Bun on Linux.

The biggest difference from existing PTY libraries is that this one works with Bun, and doesn't cross the FFI bridge for every input/output instead requiring the consumer to deal with the `fd` of the PTY.

The Rust PTY implementation is cargo-culted from [Alacritty's Unix TTY code](https://github.com/alacritty/alacritty/blob/master/alacritty_terminal/src/tty/unix.rs).

**WARNING**: as of 2024-05-06 there's a [bug in Bun](https://github.com/oven-sh/bun/issues/9907) which prevents us from using `fd` with Bun, and a temporary workaround with `onData` handler was introduced in `v2.0.1`. Check out Linux tests for usage.

## Publishing

Following ["Publish It" section from `napi-rs` docs](https://napi.rs/docs/introduction/simple-package#publish-it):

- `npm version [major|minor|patch]`
- `git push --follow-tags`

Github Action should take care of publishing after that.
1. Create a new branch
2. `npm version [major|minor|patch]`
3. `git push --follow-tags`
4. Merge the branch with commit message consisting **only** of `x.y.z` - this is how the CI decides to publish to `npm`!

`NPM_TOKEN` is part of the repo secrets, generated [like this](https://httptoolkit.com/blog/automatic-npm-publish-gha/).

0 comments on commit dd3c831

Please sign in to comment.