mirror of
https://github.com/starship/starship.git
synced 2025-02-28 16:23:31 +01:00
fix(nodejs): detect bun project files
This commit is contained in:
parent
ddafaa62fc
commit
2e43a71b30
10
.github/config-schema.json
vendored
10
.github/config-schema.json
vendored
@ -1135,7 +1135,10 @@
|
||||
"detect_files": [
|
||||
"package.json",
|
||||
".node-version",
|
||||
".nvmrc"
|
||||
".nvmrc",
|
||||
"!bunfig.toml",
|
||||
"!bun.lock",
|
||||
"!bun.lockb"
|
||||
],
|
||||
"detect_folders": [
|
||||
"node_modules"
|
||||
@ -4737,7 +4740,10 @@
|
||||
"default": [
|
||||
"package.json",
|
||||
".node-version",
|
||||
".nvmrc"
|
||||
".nvmrc",
|
||||
"!bunfig.toml",
|
||||
"!bun.lock",
|
||||
"!bun.lockb"
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -645,7 +645,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
|
||||
|
||||
@ -656,15 +656,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
|
||||
@ -3108,6 +3099,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 |
|
||||
|
@ -29,7 +29,14 @@ impl Default for NodejsConfig<'_> {
|
||||
disabled: false,
|
||||
not_capable_style: "bold red",
|
||||
detect_extensions: vec!["js", "mjs", "cjs", "ts", "mts", "cts"],
|
||||
detect_files: vec!["package.json", ".node-version", ".nvmrc"],
|
||||
detect_files: vec![
|
||||
"package.json",
|
||||
".node-version",
|
||||
".nvmrc",
|
||||
"!bunfig.toml",
|
||||
"!bun.lock",
|
||||
"!bun.lockb",
|
||||
],
|
||||
detect_folders: vec!["node_modules"],
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user