Skip to content

Update v2.0.0#20

Merged
zth merged 18 commits into2.xfrom
update
Jul 26, 2025
Merged

Update v2.0.0#20
zth merged 18 commits into2.xfrom
update

Conversation

@nojaf
Copy link
Copy Markdown
Collaborator

@nojaf nojaf commented Jul 26, 2025

  • Sync changes of main
  • Update to ReScript 12 beta 3

zth and others added 17 commits October 25, 2024 08:17
* feat: add router to serveOptions

* remove empty line

* change Promise.t to promise in router handler

* add unboxed variant type for static and handler method responses
* changelog

* basic bindings for SQLite

* changelog
* feat: bun redis bindings

* fix: resolve unit test

* fix: resolve playground tests
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@nojaf nojaf requested a review from zth July 26, 2025 07:59
describe("shell", () => {
testAsync("basic commands work", async () => {
let res = await (sh`echo "HELLO"`)
let res = await (sh`echo HELLO`)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change expected?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got

$ bun test test/*.test.js
bun test v1.2.19 (aad3abea)

test/Shell.test.js:
"HELLO"
4 | import * as Buntest from "bun:test";
5 | 
6 | Buntest.describe("shell", () => {
7 |   Buntest.test("basic commands work", async () => {
8 |     let res = await $$Bun.$`echo \"HELLO\"`;
9 |     Buntest.expect(res.stdout.toString()).toBe("HELLO\n");
                                              ^
error: expect(received).toBe(expected)

Expected: "HELLO\n"
Received: "\"HELLO\"\n"

      at <anonymous> (/Users/nojaf/Projects/rescript-bun/test/Shell.test.js:9:43)
✗ shell > basic commands work [1.74ms]

lib/bs/test/Shell.test.js:
"HELLO"
4 | import * as Buntest from "bun:test";
5 | 
6 | Buntest.describe("shell", () => {
7 |   Buntest.test("basic commands work", async () => {
8 |     let res = await $$Bun.$`echo \"HELLO\"`;
9 |     Buntest.expect(res.stdout.toString()).toBe("HELLO\n");
                                              ^
error: expect(received).toBe(expected)

Expected: "HELLO\n"
Received: "\"HELLO\"\n"

      at <anonymous> (/Users/nojaf/Projects/rescript-bun/lib/bs/test/Shell.test.js:9:43)
✗ shell > basic commands work [0.39ms]

 0 pass
 2 fail
 2 expect() calls
Ran 2 tests across 2 files. [13.00ms]
error: script "test" exited with code 1

without this change.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This smells like it might be a problem, that " is escaped in the output... I guess maybe a v12 problem? IIRC there was some change around this a little while back, the escaping of (tagged) template literals.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rescript-lang/rescript#7196 not sure what that means for this, but we can merge this since you reverted the change.

@zth zth merged commit 924d897 into 2.x Jul 26, 2025
@zth zth deleted the update branch July 26, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants