Bun v0.2.1 #1349
Jarred-Sumner
announced in
Announcements
Bun v0.2.1
#1349
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To upgrade:
To install:
curl https://bun.sh/install | bash
If you have any problems upgrading
Run the install script (you can run it multiple times):
curl https://bun.sh/install | bash
WebSocket server
Bun.serve()
now has builtin support for websockets on the serverFor more information about using websockets with
Bun.serve()
, see the readmeFor a chat room on Linux:
To reproduce this benchmark on your own computer, go here
Bun's server-side websockets are powered by uWebSockets.
RegExp lookbehinds assertions fix
To address #314, Bun now includes a fallback RegExp implementation that uses the Oniguruma regex engine. Thanks to @dylan-conway!
RegExp lookbehind assertions are used by popular npm packages like Discord.js
When a RegExp literal with a lookbehind is used inside Bun's runtime, Bun's transpiler now automatically replaces it with a
Bun.OnigurumaRegExp
. This API isn't intended to be used outside of the transpiler and will be removed once JavaScriptCore lands native support.When run inside Bun's JavaScript runtime, this input:
Transpiles to:
The RegExp polyfill is largely based on JavaScriptCore's own
JSC::RegExp
bindings.More stuff
Date
header in HTTP responsesperformance.timeOrigin
has been implementedprocess.argv
was returning an empty array when bun started without arguments other than the script, likebun foo.js
(thanks to @dylan-conway for the fix)WebSocket
client would sometimes put theWebSocket
in an error state c6fe820WebSocket
client would not keep the process open - Bun automatically exits when open WebSockets still exist. #1335WebSocket
implementation due to adding server-side WebSocketsServerWebSocket
object forpublishText
,publishBinary
,sendText
andsendBinary
functions)Full Changelog: bun-v0.2.0...bun-v0.2.1
This discussion was created from the release Bun v0.2.1.
Beta Was this translation helpful? Give feedback.
All reactions