升級方式
bun upgrade
安裝方式
curl https://bun.dev.org.tw/install | bash
如果您在升級時遇到任何問題
新功能
bun init
快速啟動一個使用 Bun 的全新空專案(類似於 npm init)。bun init
是 bun
中的新子命令。

bun install
現在支援私有 npm 註冊表和作用域(已驗證)套件
感謝 @soneymathew 對此提供的協助。

bun install
現在支援專案層級 package.json 的生命週期鉤子(非依賴項)

它會為您的應用程式的 package.json 執行 postinstall 腳本,但會忽略依賴項生命週期鉤子。這讓您可以使用 husky
、lint-staged
和其他依賴 postinstall 的套件工具
更多新內容
express
已部分支援,感謝 @zhuzilin 和 @evanwashere。還有很多工作要做 - 目前速度還不快,而且在請求時會記錄虛假的錯誤,但總比無法運作好bun create
現在可讓您指定啟動命令,以便您可以說明如何在輸出中執行程式process.revision
具有建置 bun 時使用的 git sha
重大變更
- 如果 lockfile 存在,bun install 將在升級時使其失效。遺憾的是,這是支援私有/作用域套件安裝所必需的
錯誤修正
- 修正 Bun.Transpiler、
bun:ffi
和其他幾個地方在少數情況下發生的幾個崩潰問題,感謝 @sno2 Buffer.isBuffer
不再檢查this
是否為Buffer
建構函式Bun.Transpiler
不再在不應該進行 bun 特定的轉換時進行轉換- 使迭代 JS 物件的內部 API 更可靠 @sno2 在 https://github.com/oven-sh/bun/pull/974
- 修正 u32 jsNumber 轉換,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/964
- 修正 http polyfill 中的匯入錯誤,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/973
- 修正 path.normalize on ...,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/966
- 允許在 Response.redirect 中設定狀態碼,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/985
- 修正在 bun install 步驟中遺失請求標頭中的 bearer token 的問題,由 @soneymathew 在 https://github.com/oven-sh/bun/pull/991
- 修正在執行緒中下載作用域套件時發生的 panic 問題,由 @soneymathew 在 https://github.com/oven-sh/bun/pull/992
- feat(util): 匯出 util.TextDecoder,由 @xHyroM 在 https://github.com/oven-sh/bun/pull/990
- 修復 Bun 的
Buffer
實作中latin1
和binary
編碼中的錯誤
其他:
- fix(makefile) 修正 devcontainer 規則,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/957
- refactor: 建立高階屬性迭代器,由 @sno2 在 https://github.com/oven-sh/bun/pull/972
- fix(makefile): 在編譯 bindings 之前建立 DEBUG_OBJ_DIR,由 @zhuzilin 在 https://github.com/oven-sh/bun/pull/975
- 將登陸頁面轉換為零 JS Next.js 應用程式。由 @leerob 在 https://github.com/oven-sh/bun/pull/945
- benchmarks(sqlite): 無效的 northwind 資料庫 URL,由 @xHyroM 在 https://github.com/oven-sh/bun/pull/989
- 更新 README 以取得開發協助,由 @JL102 在 https://github.com/oven-sh/bun/pull/982
新貢獻者
- @zhuzilin 在 https://github.com/oven-sh/bun/pull/964 中做出了他的首次貢獻
- @leerob 在 https://github.com/oven-sh/bun/pull/945 中做出了他們的首次貢獻