Skip to content

Commit 5984285

Browse files
update the version to 0.6.0
1 parent 2a710db commit 5984285

File tree

8 files changed

+109
-110
lines changed

8 files changed

+109
-110
lines changed

.mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ markdown_extensions:
2020
- pymdownx.superfences
2121
- pymdownx.tasklist:
2222
custom_checkbox: true
23+
- pymdownx.tabbed:
24+
alternate_style: true
25+
combine_header_slug: true
2326
- pymdownx.tilde
2427
plugins:
2528
- search

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
2020

2121
### Changed
2222

23-
- Updated TagSpecs to v0.5.0 format with hierarchical `[[tagspecs.libraries]]` structure
23+
- Updated TagSpecs to v0.6.0 format with hierarchical `[[tagspecs.libraries]]` structure
2424

2525
### Deprecated
2626

crates/djls-conf/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub struct Settings {
7878
}
7979

8080
// DEPRECATION: Remove in v5.2.7
81-
// Custom deserializer that supports both v0.5.0 (new) and v0.4.0 (legacy) formats
81+
// Custom deserializer that supports both v0.6.0 (new) and v0.4.0 (legacy) formats
8282
fn deserialize_tagspecs<'de, D>(deserializer: D) -> Result<TagSpecDef, D::Error>
8383
where
8484
D: Deserializer<'de>,
@@ -88,15 +88,15 @@ where
8888

8989
let value = Value::deserialize(deserializer)?;
9090

91-
// Try new v0.5.0 format first (hierarchical with libraries)
91+
// Try new v0.6.0 format first (hierarchical with libraries)
9292
if let Ok(new_format) = TagSpecDef::deserialize(&value) {
9393
return Ok(new_format);
9494
}
9595

9696
// Fall back to legacy v0.4.0 format (flat array of tags)
9797
if let Ok(legacy) = Vec::<tagspecs::legacy::LegacyTagSpecDef>::deserialize(&value) {
9898
tracing::warn!(
99-
"DEPRECATED: TagSpecs v0.4.0 format detected. Please migrate to v0.5.0 format. \
99+
"DEPRECATED: TagSpecs v0.4.0 format detected. Please migrate to v0.6.0 format. \
100100
The old format will be removed in v5.2.7. \
101101
See migration guide: https://github.com/joshuadavidthomas/django-language-server/blob/main/crates/djls-conf/TAGSPECS.md#migration-from-v040"
102102
);
@@ -105,7 +105,7 @@ where
105105

106106
// Neither format worked, return default
107107
Err(D::Error::custom(
108-
"Invalid tagspecs format. Expected v0.5.0 hierarchical format or legacy v0.4.0 array format",
108+
"Invalid tagspecs format. Expected v0.6.0 hierarchical format or legacy v0.4.0 array format",
109109
))
110110
}
111111

@@ -549,7 +549,7 @@ T100 = "hint"
549549
let dir = tempdir().unwrap();
550550
let content = r#"
551551
[tagspecs]
552-
version = "0.5.0"
552+
version = "0.6.0"
553553
554554
[[tagspecs.libraries]]
555555
module = "myapp.templatetags.custom"
@@ -615,7 +615,7 @@ kind = "variable"
615615
debug = true
616616
617617
[tool.djls.tagspecs]
618-
version = "0.5.0"
618+
version = "0.6.0"
619619
620620
[[tool.djls.tagspecs.libraries]]
621621
module = "django.templatetags.cache"
@@ -876,7 +876,7 @@ args = [
876876
Settings::new(Utf8Path::from_path(dir.path()).unwrap(), None).unwrap();
877877

878878
// Should be converted to new hierarchical format
879-
assert_eq!(settings.tagspecs().version, "0.5.0");
879+
assert_eq!(settings.tagspecs().version, "0.6.0");
880880
assert_eq!(settings.tagspecs().libraries.len(), 2);
881881

882882
// Find libraries (order not guaranteed)

crates/djls-conf/src/tagspecs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use serde::Deserialize;
55
// DEPRECATION: Remove in v5.2.2 (after v5.2.0 and v5.2.1)
66
pub mod legacy;
77

8-
/// Root `TagSpec` document (v0.5.0)
8+
/// Root `TagSpec` document (v0.6.0)
99
#[derive(Debug, Clone, Deserialize, PartialEq, Default)]
1010
#[serde(default)]
1111
pub struct TagSpecDef {
12-
/// Specification version (defaults to "0.5.0")
12+
/// Specification version (defaults to "0.6.0")
1313
#[serde(default = "default_version")]
1414
pub version: String,
1515
/// Template engine (defaults to "django")
@@ -181,7 +181,7 @@ pub enum ArgKindDef {
181181
}
182182

183183
fn default_version() -> String {
184-
"0.5.0".to_string()
184+
"0.6.0".to_string()
185185
}
186186

187187
fn default_engine() -> String {

crates/djls-conf/src/tagspecs/legacy.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub struct LegacyTagArgDef {
6666
/// Whether the argument is required (default: true)
6767
#[serde(default = "default_true")]
6868
pub required: bool,
69-
/// Argument type (called "kind" in v0.5.0)
69+
/// Argument type (called "kind" in v0.6.0)
7070
#[serde(rename = "type")]
7171
pub arg_type: LegacyArgTypeDef,
7272
}
@@ -97,7 +97,7 @@ fn default_true() -> bool {
9797
true
9898
}
9999

100-
/// Convert a vector of legacy tagspecs to the new v0.5.0 hierarchical format
100+
/// Convert a vector of legacy tagspecs to the new v0.6.0 hierarchical format
101101
///
102102
/// Groups tags by module and creates the appropriate library structure.
103103
#[must_use]
@@ -121,7 +121,7 @@ pub fn convert_legacy_tagspecs(legacy: Vec<LegacyTagSpecDef>) -> TagSpecDef {
121121
.collect();
122122

123123
TagSpecDef {
124-
version: "0.5.0".to_string(),
124+
version: "0.6.0".to_string(),
125125
engine: "django".to_string(),
126126
requires_engine: None,
127127
extends: vec![],
@@ -187,7 +187,7 @@ fn convert_legacy_arg(legacy: LegacyTagArgDef) -> TagArgDef {
187187
(kind, None)
188188
}
189189
LegacyArgTypeDef::Choice { choice } => {
190-
// Store choices in extra metadata as required by v0.5.0 spec
190+
// Store choices in extra metadata as required by v0.6.0 spec
191191
let mut extra = std::collections::HashMap::new();
192192
extra.insert(
193193
"choices".to_string(),
@@ -225,7 +225,7 @@ mod tests {
225225

226226
let converted = convert_legacy_tagspecs(legacy);
227227

228-
assert_eq!(converted.version, "0.5.0");
228+
assert_eq!(converted.version, "0.6.0");
229229
assert_eq!(converted.libraries.len(), 1);
230230
assert_eq!(converted.libraries[0].module, "myapp.tags");
231231
assert_eq!(converted.libraries[0].tags.len(), 1);

crates/djls-semantic/src/templatetags/specs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ mod tests {
877877
let dir = tempfile::TempDir::new().unwrap();
878878
let config_content = r#"
879879
[tagspecs]
880-
version = "0.5.0"
880+
version = "0.6.0"
881881
882882
[[tagspecs.libraries]]
883883
module = "myapp.templatetags.custom"

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ S100 = "off" # Override: S100 is off
166166
Define custom template tag specifications for tags not included in Django's built-in or popular third-party libraries.
167167

168168
> **⚠️ DEPRECATED FORMAT**: The v0.4.0 flat `[[tagspecs]]` format is deprecated and will be removed in v5.2.7.
169-
> Please migrate to the [v0.5.0 hierarchical format](../crates/djls-conf/TAGSPECS.md#migration-from-v040).
169+
> Please migrate to the [v0.6.0 hierarchical format](../crates/djls-conf/TAGSPECS.md#migration-from-v040).
170170
171171
See the [TagSpecs documentation](../crates/djls-conf/TAGSPECS.md) for detailed schema and examples.
172172

0 commit comments

Comments
 (0)