Skip to content

Commit

Permalink
release notes for #656
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Jan 12, 2021
1 parent 590302f commit 47aa9fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

* Calling `stop()` on the JavaScript API is now optional ([#656](https://github.com/evanw/esbuild/pull/656))

The JavaScript implementation of esbuild's API now calls `unref()` internally so node will now exit even if the internal long-lived esbuild process is still running. You should no longer need to explicitly call `stop()` on the service returned by `startService()`, which simplifies service lifetime management. This feature was contributed by [@SalvatorePreviti](https://github.com/SalvatorePreviti).

## 0.8.31

* Fix minification issue from previous release ([#648](https://github.com/evanw/esbuild/issues/648))
Expand Down
6 changes: 3 additions & 3 deletions scripts/node-unref-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function tests() {
assert.strictEqual(t1.code, `1 + 2;\n`)
assert.strictEqual(t2.code, `1 + 3;\n`)
}

async function testServe() {
const server = await esbuild.serve({}, {})
assert.strictEqual(server.host, '127.0.0.1')
Expand Down Expand Up @@ -48,7 +48,7 @@ function runTests() {
function startChildProcess() {
const child = fork(__filename, ['__forked__'], { stdio: 'inherit', env: process.env });

const timeout = setTimeout(()=> {
const timeout = setTimeout(() => {
console.error('❌ node unref test timeout - child_process.unref() broken?')
process.exit(1);
}, 6000);
Expand All @@ -73,4 +73,4 @@ if (process.argv[2] === '__forked__') {
runTests();
} else {
startChildProcess();
}
}

0 comments on commit 47aa9fb

Please sign in to comment.