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"], ["/config/", "Configuration"],
["/advanced-config/", "Advanced Configuration"], ["/advanced-config/", "Advanced Configuration"],
["/faq/", "Frequently Asked Questions"], ["/faq/", "Frequently Asked Questions"],
["/presets/", "Presets"] ["/presets/", "Presets"],
["/migrating-to-0.45.0/", "Migrating to v0.45.0"]
] ]
}, },
"/de-DE/": { "/de-DE/": {

View File

@ -83,7 +83,7 @@ format = "took [$duration]($style)"
#### Character #### Character
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ----------------------- | ---------------- | | ----------------------- | ---------------- |
| `symbol` | `success_symbol` | | `symbol` | `success_symbol` |
| `use_symbol_for_status` | `error_symbol` | | `use_symbol_for_status` | `error_symbol` |
@ -116,9 +116,9 @@ error_symbol = "[✖](bold red) "
#### Command Duration #### Command Duration
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -130,9 +130,9 @@ error_symbol = "[✖](bold red) "
#### Directory #### Directory
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -144,10 +144,10 @@ error_symbol = "[✖](bold red) "
#### Environment Variable #### Environment Variable
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -160,10 +160,10 @@ error_symbol = "[✖](bold red) "
#### Git Commit #### Git Commit
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -176,11 +176,11 @@ error_symbol = "[✖](bold red) "
#### Git Status #### Git Status
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ----------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
| `show_sync_count` | `format` | | `show_sync_count` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -209,10 +209,10 @@ behind = "⇣${count}"
#### Hostname #### Hostname
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -225,11 +225,11 @@ behind = "⇣${count}"
#### Singularity #### Singularity
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `label` | `format` | | `label` | `format` |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -242,9 +242,9 @@ behind = "⇣${count}"
#### Time #### Time
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ------------- | | ---------------- | ------------- |
| `format` | `time_format` | | `format` | `time_format` |
**Changes to the Default Configuration** **Changes to the Default Configuration**
@ -257,10 +257,10 @@ behind = "⇣${count}"
#### Custom Commands #### Custom Commands
| Deprecated Property | Replacement | | Removed Property | Replacement |
| ------------------- | ----------- | | ---------------- | ----------- |
| `prefix` | `format` | | `prefix` | `format` |
| `suffix` | `format` | | `suffix` | `format` |
**Changes to the Default Configuration** **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 /// Load root module config from given Value and fill unset variables with default
/// values. /// values.
fn load(config: &'a Value) -> Self { 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) 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 { fn load_config(&self, config: &'a toml::Value) -> Self {
let mut new_module_config = self.clone(); let mut new_module_config = self.clone();
if let toml::Value::Table(config) = config { if let toml::Value::Table(config) = config {
if config.get("prefix").is_some() || config.get("suffix").is_some() { if config.get("prefix").is_some() {
log::warn!("You're using the outdated config format! Migrate your config here: https://starship.rs/migrating-to-0.45.0/") 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 #load_tokens
} }