You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To upgrade:
What's new:
You can now
import
from"bun"
in bun.js. You can still use the globalBun
.Before:
After:
This isn't a breaking change – you can still use
Bun
as a global same as before.How it works
Bun's JavaScript printer replaces the
"bun"
import specifier withglobalThis.Bun
.You'll probably want to update types too:
Bug fixes
isFile
andisDirectory
functions tofs.stat()
7cd3d13
!
and unary expressions - 4de7978bun bun
with--platform=bun
set - 43b1866Bug fixes from v0.0.77
Bun.file
is not found and the error handler is not run, the default status code is now 404Bun.file
sent with sendfile and the request aborts or errorsFileBlob
sent via sendfile after the callback completes instead of before.ts
and.tsx
files withtext/javascript
mime type by default instead of MPEG2 VideoThis discussion was created from the release bun v0.0.78.
Beta Was this translation helpful? Give feedback.
All reactions