feat(nodejs): disable if bun project files detected (#6346)

This commit is contained in:
Alex Grover
2025-03-09 14:31:40 -04:00
committed by GitHub
parent 2357c955ed
commit 00ce7057ef
3 changed files with 19 additions and 13 deletions
+3 -10
View File
@@ -646,7 +646,7 @@ By default the module will be shown if any of the following conditions are met:
*: This variable can only be used as a part of a style string
### Examples
### Example
#### Customize the format
@@ -657,15 +657,6 @@ By default the module will be shown if any of the following conditions are met:
format = 'via [🍔 $version](bold green) '
```
#### Replace Node.js
You can override the `detect_files` property of [the nodejs module](#nodejs) in your config so as to only show the bun runtime:
```toml
[nodejs]
detect_files = ['package.json', '.node-version', '!bunfig.toml', '!bun.lockb']
```
## C
The `c` module shows some information about your C compiler. By default
@@ -3141,6 +3132,8 @@ By default the module will be shown if any of the following conditions are met:
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
- The current directory contains a file with the `.ts`, `.mts` or `.cts` extension
Additionally, the module will be hidden by default if the directory contains a `bunfig.toml`, `bun.lock`, or `bun.lockb` file, overriding the above conditions.
### Options
| Option | Default | Description |