1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-26 03:32:36 +00:00

chore: update v0.45.0 removal notice (#1687)

* chore: update deprecation notice

* Add deprecation page to sidebar

* Replace the use of "deprected" with "removed"
This commit is contained in:
Matan Kushner 2020-09-29 12:35:11 -04:00 committed by GitHub
parent cb4d7d1908
commit 59f939e25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 39 deletions

View File

@ -94,7 +94,8 @@ module.exports = {
["/config/", "Configuration"],
["/advanced-config/", "Advanced Configuration"],
["/faq/", "Frequently Asked Questions"],
["/presets/", "Presets"]
["/presets/", "Presets"],
["/migrating-to-0.45.0/", "Migrating to v0.45.0"]
]
},
"/de-DE/": {

View File

@ -83,7 +83,7 @@ format = "took [$duration]($style)"
#### Character
| Deprecated Property | Replacement |
| Removed Property | Replacement |
| ----------------------- | ---------------- |
| `symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` |
@ -116,9 +116,9 @@ error_symbol = "[✖](bold red) "
#### Command Duration
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
@ -130,9 +130,9 @@ error_symbol = "[✖](bold red) "
#### Directory
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
**Changes to the Default Configuration**
@ -144,10 +144,10 @@ error_symbol = "[✖](bold red) "
#### Environment Variable
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
@ -160,10 +160,10 @@ error_symbol = "[✖](bold red) "
#### Git Commit
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
@ -176,11 +176,11 @@ error_symbol = "[✖](bold red) "
#### Git Status
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| `show_sync_count` | `format` |
| Removed Property | Replacement |
| ----------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| `show_sync_count` | `format` |
**Changes to the Default Configuration**
@ -209,10 +209,10 @@ behind = "⇣${count}"
#### Hostname
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
@ -225,11 +225,11 @@ behind = "⇣${count}"
#### Singularity
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `label` | `format` |
| `prefix` | `format` |
| `suffix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `label` | `format` |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**
@ -242,9 +242,9 @@ behind = "⇣${count}"
#### Time
| Deprecated Property | Replacement |
| ------------------- | ------------- |
| `format` | `time_format` |
| Removed Property | Replacement |
| ---------------- | ------------- |
| `format` | `time_format` |
**Changes to the Default Configuration**
@ -257,10 +257,10 @@ behind = "⇣${count}"
#### Custom Commands
| Deprecated Property | Replacement |
| ------------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
| Removed Property | Replacement |
| ---------------- | ----------- |
| `prefix` | `format` |
| `suffix` | `format` |
**Changes to the Default Configuration**

View File

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

View File

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