Skip to content

Commit 56e015f

Browse files
committed
feat(node): add bun.lock file support for bun v1.2+
1 parent f3b5687 commit 56e015f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/segments/node.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ func (n *Node) loadContext() {
7777
iconProperty: BunIcon,
7878
defaultIcon: "\ue76f",
7979
},
80+
{
81+
fileName: "bun.lock",
82+
name: "bun",
83+
iconProperty: BunIcon,
84+
defaultIcon: "\ue76f",
85+
},
8086
{
8187
fileName: "package-lock.json",
8288
name: "npm",

src/segments/node_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func TestNodeInContext(t *testing.T) {
8484
env.On("HasFiles", "package-lock.json").Return(tc.hasNPM)
8585
env.On("HasFiles", "package.json").Return(tc.hasDefault)
8686
env.On("HasFiles", "bun.lockb").Return(tc.hasBun)
87+
env.On("HasFiles", "bun.lock").Return(tc.hasBun)
8788

8889
props := properties.Map{
8990
PnpmIcon: "pnpm",

0 commit comments

Comments
 (0)