-
Notifications
You must be signed in to change notification settings - Fork 286
feat: Officially support bun and add it to CI #1129
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ wip | |
| # Node | ||
| **/node_modules | ||
| npm-debug.log | ||
| bun.lock | ||
|
|
||
| # JS build | ||
| **/build | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
| "author": "The Neon Community", | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "install": "cargo-cp-artifact -nc index.node -- cargo build --message-format=json-render-diagnostics", | ||
| "install": "cargo-cp-artifact -ac electron-tests index.node -- cargo build --message-format=json-render-diagnostics", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When we install with |
||
| "start": "electron .", | ||
| "test": "playwright test" | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ describe("Worker / Root Tagging Tests", () => { | |
| describe("Multi-Threaded", () => { | ||
| it("should fail to use `get_and_replace`", (cb) => { | ||
| const worker = new Worker(__filename); | ||
| after(() => worker.terminate()); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are not ever completing and I'm not sure why. |
||
| worker.unref(); | ||
|
|
||
| worker.once("message", (message) => { | ||
| assert.ok(/wrong module/.test(message)); | ||
|
|
@@ -117,7 +117,7 @@ describe("Worker / Root Tagging Tests", () => { | |
|
|
||
| it("should fail to use `get_or_init`", (cb) => { | ||
| const worker = new Worker(__filename); | ||
| after(() => worker.terminate()); | ||
| worker.unref(); | ||
|
|
||
| worker.once("message", (message) => { | ||
| assert.ok(/wrong module/.test(message)); | ||
|
|
@@ -129,7 +129,7 @@ describe("Worker / Root Tagging Tests", () => { | |
|
|
||
| it("should fail to use `get_or_init`", (cb) => { | ||
| const worker = new Worker(__filename); | ||
| after(() => worker.terminate()); | ||
| worker.unref(); | ||
|
|
||
| worker.once("message", (message) => { | ||
| assert.ok(/wrong module/.test(message)); | ||
|
|
@@ -192,7 +192,7 @@ describe("Instance-local storage", () => { | |
| assert(!Number.isNaN(mainThreadId)); | ||
|
|
||
| const worker = new Worker(__filename); | ||
| after(() => worker.terminate()); | ||
| worker.unref(); | ||
|
|
||
| worker.once("message", (message) => { | ||
| assert.strictEqual(typeof message, "number"); | ||
|
|
@@ -206,7 +206,12 @@ describe("Instance-local storage", () => { | |
| worker.postMessage("get_thread_id"); | ||
| }); | ||
|
|
||
| it("should be able to exit a worker without a crash", (cb) => { | ||
| it("should be able to exit a worker without a crash", function (cb) { | ||
| // https://github.com/neon-bindings/neon/issues/1128#terminate | ||
| if (process.versions.bun) { | ||
| return this.skip(); | ||
| } | ||
|
|
||
| const worker = new Worker(__filename, { | ||
| workerData: "notify_when_startup_complete", | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bun install --lockfile-onlycan convert apackage-lock.json. To avoid having two lockfiles that we need to keep in sync, the Node lock file gets converted in CI.