Skip to content

Commit 59f939e

Browse files
authored
chore: update v0.45.0 removal notice (starship#1687)
* chore: update deprecation notice * Add deprecation page to sidebar * Replace the use of "deprected" with "removed"
1 parent cb4d7d1 commit 59f939e

File tree

4 files changed

+46
-39
lines changed

4 files changed

+46
-39
lines changed

docs/.vuepress/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ module.exports = {
9494
["/config/", "Configuration"],
9595
["/advanced-config/", "Advanced Configuration"],
9696
["/faq/", "Frequently Asked Questions"],
97-
["/presets/", "Presets"]
97+
["/presets/", "Presets"],
98+
["/migrating-to-0.45.0/", "Migrating to v0.45.0"]
9899
]
99100
},
100101
"/de-DE/": {

docs/migrating-to-0.45.0/README.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ format = "took [$duration]($style)"
8383

8484
#### Character
8585

86-
| Deprecated Property | Replacement |
86+
| Removed Property | Replacement |
8787
| ----------------------- | ---------------- |
8888
| `symbol` | `success_symbol` |
8989
| `use_symbol_for_status` | `error_symbol` |
@@ -116,9 +116,9 @@ error_symbol = "[✖](bold red) "
116116

117117
#### Command Duration
118118

119-
| Deprecated Property | Replacement |
120-
| ------------------- | ----------- |
121-
| `prefix` | `format` |
119+
| Removed Property | Replacement |
120+
| ---------------- | ----------- |
121+
| `prefix` | `format` |
122122

123123
**Changes to the Default Configuration**
124124

@@ -130,9 +130,9 @@ error_symbol = "[✖](bold red) "
130130

131131
#### Directory
132132

133-
| Deprecated Property | Replacement |
134-
| ------------------- | ----------- |
135-
| `prefix` | `format` |
133+
| Removed Property | Replacement |
134+
| ---------------- | ----------- |
135+
| `prefix` | `format` |
136136

137137
**Changes to the Default Configuration**
138138

@@ -144,10 +144,10 @@ error_symbol = "[✖](bold red) "
144144

145145
#### Environment Variable
146146

147-
| Deprecated Property | Replacement |
148-
| ------------------- | ----------- |
149-
| `prefix` | `format` |
150-
| `suffix` | `format` |
147+
| Removed Property | Replacement |
148+
| ---------------- | ----------- |
149+
| `prefix` | `format` |
150+
| `suffix` | `format` |
151151

152152
**Changes to the Default Configuration**
153153

@@ -160,10 +160,10 @@ error_symbol = "[✖](bold red) "
160160

161161
#### Git Commit
162162

163-
| Deprecated Property | Replacement |
164-
| ------------------- | ----------- |
165-
| `prefix` | `format` |
166-
| `suffix` | `format` |
163+
| Removed Property | Replacement |
164+
| ---------------- | ----------- |
165+
| `prefix` | `format` |
166+
| `suffix` | `format` |
167167

168168
**Changes to the Default Configuration**
169169

@@ -176,11 +176,11 @@ error_symbol = "[✖](bold red) "
176176

177177
#### Git Status
178178

179-
| Deprecated Property | Replacement |
180-
| ------------------- | ----------- |
181-
| `prefix` | `format` |
182-
| `suffix` | `format` |
183-
| `show_sync_count` | `format` |
179+
| Removed Property | Replacement |
180+
| ----------------- | ----------- |
181+
| `prefix` | `format` |
182+
| `suffix` | `format` |
183+
| `show_sync_count` | `format` |
184184

185185
**Changes to the Default Configuration**
186186

@@ -209,10 +209,10 @@ behind = "⇣${count}"
209209

210210
#### Hostname
211211

212-
| Deprecated Property | Replacement |
213-
| ------------------- | ----------- |
214-
| `prefix` | `format` |
215-
| `suffix` | `format` |
212+
| Removed Property | Replacement |
213+
| ---------------- | ----------- |
214+
| `prefix` | `format` |
215+
| `suffix` | `format` |
216216

217217
**Changes to the Default Configuration**
218218

@@ -225,11 +225,11 @@ behind = "⇣${count}"
225225

226226
#### Singularity
227227

228-
| Deprecated Property | Replacement |
229-
| ------------------- | ----------- |
230-
| `label` | `format` |
231-
| `prefix` | `format` |
232-
| `suffix` | `format` |
228+
| Removed Property | Replacement |
229+
| ---------------- | ----------- |
230+
| `label` | `format` |
231+
| `prefix` | `format` |
232+
| `suffix` | `format` |
233233

234234
**Changes to the Default Configuration**
235235

@@ -242,9 +242,9 @@ behind = "⇣${count}"
242242

243243
#### Time
244244

245-
| Deprecated Property | Replacement |
246-
| ------------------- | ------------- |
247-
| `format` | `time_format` |
245+
| Removed Property | Replacement |
246+
| ---------------- | ------------- |
247+
| `format` | `time_format` |
248248

249249
**Changes to the Default Configuration**
250250

@@ -257,10 +257,10 @@ behind = "⇣${count}"
257257

258258
#### Custom Commands
259259

260-
| Deprecated Property | Replacement |
261-
| ------------------- | ----------- |
262-
| `prefix` | `format` |
263-
| `suffix` | `format` |
260+
| Removed Property | Replacement |
261+
| ---------------- | ----------- |
262+
| `prefix` | `format` |
263+
| `suffix` | `format` |
264264

265265
**Changes to the Default Configuration**
266266

src/config.rs

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ where
2020
/// Load root module config from given Value and fill unset variables with default
2121
/// values.
2222
fn load(config: &'a Value) -> Self {
23+
if config.get("prompt_order").is_some() {
24+
log::warn!("\"prompt_order\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
25+
}
2326
Self::new().load_config(config)
2427
}
2528

starship_module_config_derive/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ fn impl_module_config(dinput: DeriveInput) -> proc_macro::TokenStream {
4747
fn load_config(&self, config: &'a toml::Value) -> Self {
4848
let mut new_module_config = self.clone();
4949
if let toml::Value::Table(config) = config {
50-
if config.get("prefix").is_some() || config.get("suffix").is_some() {
51-
log::warn!("You're using the outdated config format! Migrate your config here: https://starship.rs/migrating-to-0.45.0/")
50+
if config.get("prefix").is_some() {
51+
log::warn!("\"prefix\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
52+
}
53+
if config.get("suffix").is_some() {
54+
log::warn!("\"suffix\" has been removed in favor of \"format\". For more details, see: https://starship.rs/migrating-to-0.45.0/")
5255
}
5356
#load_tokens
5457
}

0 commit comments

Comments
 (0)