Skip to content

Commit e9087b7

Browse files
authored
ReScript v12 (#32)
* rescript v12 * changeset * cleanup
1 parent 04479c4 commit e9087b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1256
-1302
lines changed

.changeset/clear-lemons-behave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"rescript-bun": patch
3+
---
4+
5+
Move to ReScript v12.

.github/workflows/release-2x.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.github/workflows/release-main.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# Release workflow for the main branch (1.x versions)
2-
# This workflow handles releases for the 1.x version line of rescript-bun.
3-
# It only triggers on pushes to the main branch to ensure 1.x releases are properly managed.
4-
name: Release (1.x)
1+
name: Release
52

63
permissions:
74
contents: write
@@ -46,9 +43,7 @@ jobs:
4643
env:
4744
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4845

49-
# This workflow is specifically for 1.x releases on the main branch
50-
# The changeset action will handle version bumps according to changeset config
51-
- name: Create Release Pull Request or Publish to npm (1.x releases)
46+
- name: Create Release Pull Request or Publish to npm
5247
uses: changesets/action@v1
5348
with:
5449
publish: npm run release

.github/workflows/test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# Test workflow for both main (1.x) and 2.x branches
2-
# This workflow runs tests on both the main branch (1.x development)
3-
# and the 2.x branch (2.x development) to ensure code quality across both version lines.
41
name: Test
52

63
on:
74
push:
8-
branches: [main, 2.x]
5+
branches: [main]
96
pull_request:
10-
branches: [main, 2.x]
7+
branches: [main]
118

129
jobs:
1310
build:

CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
- c6b9a03: Add bindings to `routes` in `Bun.serve`.
2020
- c6b9a03: Add basic SQLite bindings in `BunSqlite`.
2121

22-
_Check out the `2.x` branch for ReScript v12 support._
23-
24-
- Add bindings to `routes` in `Bun.serve`. https://github.com/zth/rescript-bun/pull/11
25-
- Add basic SQLite bindings in `BunSqlite`. https://github.com/zth/rescript-bun/pull/12
26-
2722
# 0.5.0
2823

2924
- Add bindings for `Response.json()`. https://github.com/zth/rescript-bun/pull/5

DUAL_BRANCH_SETUP.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,24 @@
11
# rescript-bun
22

3-
_Check out the `2.x` branch for ReScript v12 support._
4-
5-
## Release Branches
6-
7-
This repository maintains two active release branches:
8-
- **`main` branch**: For 1.x releases (ReScript v11+ support)
9-
- **`2.x` branch**: For 2.x releases (ReScript v12+ support)
10-
11-
Each branch has independent release cycles managed by changesets. See [DUAL_BRANCH_SETUP.md](DUAL_BRANCH_SETUP.md) for detailed information about the dual-branch setup.
12-
133
Use [Bun](https://bun.sh) with ReScript.
144

15-
> **Currently alpha state software**. You're encouraged to start using it, but please report all issues. There will be both bindings missing and some bindings will probably be wrong/suboptimal. We're going to work through the API surface as we go. Report all issues you find!
16-
175
## Getting started
186

197
**Template repo to get up and running quickly: https://github.com/zth/rescript-bun-starter**
208

21-
You need to be on ReScript v11 `>=11.1.0` and Core `>=1.3.0`. This is designed for uncurried mode so you should use that as well (`"uncurried": true` in your bsconfig/`rescript.json`).
9+
You need to be on ReScript v12 `>=12.0.0-alpha.4`.
2210

23-
Install `rescript-bun` and `@rescript/core`:
11+
Install `rescript-bun`:
2412

2513
```bash
26-
npm i rescript-bun @rescript/core
14+
npm i rescript-bun@2
2715
```
2816

2917
Include them in your `rescript.json`:
3018

3119
```json
3220
{
33-
"bs-dependencies": ["@rescript/core", "rescript-bun"]
21+
"dependencies": ["rescript-bun"]
3422
}
3523
```
3624

@@ -40,11 +28,7 @@ Include them in your `rescript.json`:
4028

4129
```json
4230
{
43-
"bsc-flags": [
44-
"-open RescriptCore",
45-
"-open RescriptBun",
46-
"-open RescriptBun.Globals"
47-
]
31+
"bsc-flags": ["-open RescriptBun", "-open RescriptBun.Globals"]
4832
}
4933
```
5034

@@ -218,7 +202,7 @@ Currently, bindings exist for the most common things. There's still a good amoun
218202

219203
## Other things to figure out
220204

221-
- How to reuse/contribute to [`rescript-webapi`](https://github.com/TheSpyder/rescript-webapi) instead of rolling our own bindings. I've intentionally not reused any other existing library because I wanted to start from scratch and follow ReScript v11 idioms as much as possible. But once all of this settles, we need to figure out and share the common denominator with `rescript-webapi` and other similar projects to this.
205+
- How to reuse/contribute to [`rescript-webapi`](https://github.com/TheSpyder/rescript-webapi) instead of rolling our own bindings. I've intentionally not reused any other existing library because I wanted to start from scratch and follow ReScript v11+ idioms as much as possible. But once all of this settles, we need to figure out and share the common denominator with `rescript-webapi` and other similar projects to this.
222206

223207
## Contributing
224208

@@ -230,7 +214,6 @@ If you do want to contribute, _please open an issue saying you're starting work
230214

231215
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.
232216

233-
234217
## Bindings style
235218

236219
_This will be fleshed out in a short while_.

0 commit comments

Comments
 (0)