使用 bun outdated
來檢查專案中過時的依賴項。此命令會顯示一個表格,列出有較新版本的依賴項。
bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
@sinclair/typebox
0.34.15
0.34.16
0.34.16
@types/bun (開發依賴項)
1.2.0
1.2.5
1.2.5
eslint (開發依賴項)
8.57.1
8.57.1
9.20.0
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
expect-type (開發依賴項)
0.16.0
0.16.0
1.1.0
prettier (開發依賴項)
3.4.2
3.5.0
3.5.0
tsup (開發依賴項)
8.3.5
8.3.6
8.3.6
typescript (開發依賴項)
5.7.2
5.7.3
5.7.3
輸出表格顯示三個版本欄位
- 目前版本: 目前安裝的版本
- 可更新版本: 符合您的 package.json 版本範圍的最新版本
- 最新版本: 發布到 registry 的最新版本
bun outdated
支援透過套件名稱和 glob 模式搜尋過時的依賴項。
若要檢查特定依賴項是否過時,請將套件名稱作為位置引數傳遞
$bun outdated eslint-plugin-security eslint-plugin-sonarjs bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
您也可以傳遞 glob 模式來檢查過時的套件
bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
eslint (開發依賴項)
8.57.1
8.57.1
9.20.0
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
例如,要檢查過時的 @types/*
套件
bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
@types/bun (開發依賴項)
1.2.0
1.2.5
1.2.5
或者排除所有 @types/*
套件
$bun outdated '!@types/*' bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
@sinclair/typebox
0.34.15
0.34.16
0.34.16
eslint (開發依賴項)
8.57.1
8.57.1
9.20.0
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
expect-type (開發依賴項)
0.16.0
0.16.0
1.1.0
prettier (開發依賴項)
3.4.2
3.5.0
3.5.0
tsup (開發依賴項)
8.3.5
8.3.6
8.3.6
typescript (開發依賴項)
5.7.2
5.7.3
5.7.3
使用 --filter
標記來檢查不同工作區套件中過時的依賴項
$bun outdated --filter='@monorepo/types' bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
tsup (開發依賴項)
8.3.5
8.3.6
8.3.6
typescript (開發依賴項)
5.7.2
5.7.3
5.7.3
您可以傳遞多個 --filter
標記來檢查多個工作區。
$bun outdated --filter @monorepo/types --filter @monorepo/cli bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
eslint (開發依賴項)
8.57.1
8.57.1
9.20.0
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
expect-type (開發依賴項)
0.16.0
0.16.0
1.1.0
tsup (開發依賴項)
8.3.5
8.3.6
8.3.6
typescript (開發依賴項)
5.7.2
5.7.3
5.7.3
您也可以傳遞 glob 模式來依工作區名稱篩選。
$bun outdated --filter='@monorepo/{types,cli}' bun outdated v1.2.5
套件
目前版本
可更新版本
最新版本
eslint (開發依賴項)
8.57.1
8.57.1
9.20.0
eslint-plugin-security (開發依賴項)
2.1.1
2.1.1
3.0.1
eslint-plugin-sonarjs (開發依賴項)
0.23.0
0.23.0
3.0.1
expect-type (開發依賴項)
0.16.0
0.16.0
1.1.0
tsup (開發依賴項)
8.3.5
8.3.6
8.3.6
typescript (開發依賴項)
5.7.2
5.7.3
5.7.3
命令列介面用法
選項
設定
預設使用特定的 registry,覆寫 .npmrc、bunfig.toml 和環境變數。
鎖定檔管理
寫入 yarn.lock 檔案 (yarn v1)
儲存到 package.json (預設為 true)
依賴項管理
總是從 registry 請求最新版本並重新安裝所有依賴項
跳過專案 package.json 中的生命週期腳本 (永遠不會執行依賴項腳本)
新增到專案 package.json 中的 trustedDependencies 並安裝套件
從安裝中排除 'dev'、'optional' 或 'peer' 依賴項
安裝行為
--concurrent-scripts=<val>
生命週期腳本的最大並行任務數 (預設為 5)
--network-concurrency=<val>
最大並行網路請求數 (預設為 48)
安裝依賴項的平台特定最佳化。可能的值:"clonefile" (預設值)、"hardlink"、"symlink"、"copyfile"
範例
顯示目前工作區中過時的依賴項。
bun outdated
使用 --filter 來包含多個工作區。
bun outdated --filter="*"
bun outdated --filter="./app/*"
使用名稱模式篩選依賴項。
bun outdated jquery
bun outdated "is-*"