Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/long-mugs-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rescript-bun": patch
---

Use Bun as runtime and package manager
10 changes: 2 additions & 8 deletions .github/workflows/release-2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install

- name: Build project
run: bun run build
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install

- name: Build project
run: bun run build
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,17 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Setup Bun
uses: oven-sh/setup-bun@v1
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: npm ci
run: bun install

- name: Build project
run: bun run build
Expand All @@ -42,7 +33,7 @@ jobs:

- name: Install dependencies
working-directory: ./playground
run: npm ci
run: bun install

- name: Build Playground
working-directory: ./playground
Expand Down
4 changes: 2 additions & 2 deletions DUAL_BRANCH_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ This ensures that changesets work correctly on each branch by comparing against
## Release Process

### For 1.x releases (main branch):
1. Create changeset: `npm run changeset`
1. Create changeset: `bun run changeset`
2. Commit and push to main branch
3. The `release-main.yml` workflow will create a release PR or publish

### For 2.x releases (2.x branch):
1. Switch to 2.x branch: `git checkout 2.x`
2. Create changeset: `npm run changeset`
2. Create changeset: `bun run changeset`
3. Commit and push to 2.x branch
4. The `release-2x.yml` workflow will create a release PR or publish

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You need to be on ReScript v12 `>=12.0.0-alpha.4`.
Install `rescript-bun`:

```bash
npm i rescript-bun@next
bun add rescript-bun@next
```

Include them in your `rescript.json`:
Expand Down Expand Up @@ -224,7 +224,7 @@ If you do want to contribute, _please open an issue saying you're starting work

## Versioning and releasing

This project uses [Changesets](https://github.com/changesets/changesets) to manage versions and changelogs. Run `npm run changeset` to create a changeset describing your changes. When changes are merged to `main`, a GitHub Action opens a release PR and merging that will publish a new version.
This project uses [Changesets](https://github.com/changesets/changesets) to manage versions and changelogs. Run `bun run changeset` to create a changeset describing your changes. When changes are merged to `main`, a GitHub Action opens a release PR and merging that will publish a new version.


## Bindings style
Expand Down
228 changes: 228 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Loading