mirror of
https://github.com/starship/starship.git
synced 2024-11-22 00:04:05 +01:00
fix(nodejs): detect bun project files
This commit is contained in:
parent
9e72ef0a58
commit
a2aff30c57
8
.github/config-schema.json
vendored
8
.github/config-schema.json
vendored
@ -1131,7 +1131,9 @@
|
||||
"detect_files": [
|
||||
"package.json",
|
||||
".node-version",
|
||||
".nvmrc"
|
||||
".nvmrc",
|
||||
"!bunfig.toml",
|
||||
"!bun.lockb"
|
||||
],
|
||||
"detect_folders": [
|
||||
"node_modules"
|
||||
@ -4720,7 +4722,9 @@
|
||||
"default": [
|
||||
"package.json",
|
||||
".node-version",
|
||||
".nvmrc"
|
||||
".nvmrc",
|
||||
"!bunfig.toml",
|
||||
"!bun.lockb"
|
||||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -644,7 +644,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
|
||||
|
||||
@ -655,15 +655,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
|
||||
@ -3106,6 +3097,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` or `bun.lockb` file, overriding the above conditions.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
|
@ -29,7 +29,13 @@ impl<'a> Default for NodejsConfig<'a> {
|
||||
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.lockb",
|
||||
],
|
||||
detect_folders: vec!["node_modules"],
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user