mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-26 03:27:30 +00:00
feat(nodejs): check for .mts
and .cts
files (#3734)
* feat(nodejs): check for `.mts` and `.cts` files * Hmm * Tests * Update docs * Update table * Align * Remove tests * 🤷 * 🤷🤷
This commit is contained in:
parent
547e55f047
commit
a10e24b205
@ -2289,16 +2289,16 @@ By default the module will be shown if any of the following conditions are met:
|
||||
- The current directory contains a `.nvmrc` file
|
||||
- The current directory contains a `node_modules` directory
|
||||
- The current directory contains a file with the `.js`, `.mjs` or `.cjs` extension
|
||||
- The current directory contains a file with the `.ts` extension
|
||||
- The current directory contains a file with the `.ts`, `.mts` or `.cts` extension
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| ------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||
| `version_format` | `"v${raw}"` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `" "` | A format string representing the symbol of Node.js. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts"]` | Which extensions should trigger this module. |
|
||||
| `detect_extensions` | `["js", "mjs", "cjs", "ts", "mts", "cts"]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `["package.json", ".node-version"]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `["node_modules"]` | Which folders should trigger this module. |
|
||||
| `style` | `"bold green"` | The style for the module. |
|
||||
|
@ -25,7 +25,7 @@ impl<'a> Default for NodejsConfig<'a> {
|
||||
style: "bold green",
|
||||
disabled: false,
|
||||
not_capable_style: "bold red",
|
||||
detect_extensions: vec!["js", "mjs", "cjs", "ts"],
|
||||
detect_extensions: vec!["js", "mjs", "cjs", "ts", "mts", "cts"],
|
||||
detect_files: vec!["package.json", ".node-version", ".nvmrc"],
|
||||
detect_folders: vec!["node_modules"],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user