🔧 support MoonBit 0.10.4

This commit is contained in:
Nanaloveyuki
2026-07-17 19:04:17 +08:00
parent b18dcf972d
commit ea6113354a
10 changed files with 14 additions and 30 deletions
+1 -3
View File
@@ -6,6 +6,4 @@ import {
supported_targets = "+native"
options(
is_main: true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+1 -3
View File
@@ -2,6 +2,4 @@ import {
"Nanaloveyuki/BitLogger/src" @lib,
}
options(
"is-main": true,
)
pkgtype(kind: "executable")
+4 -4
View File
@@ -42,7 +42,7 @@ pub fn TextFormatterConfig::new(
style_markup? : @formatting.StyleMarkupMode = @formatting.StyleMarkupMode::Full,
target_style_markup? : @formatting.StyleMarkupMode = @formatting.StyleMarkupMode::Disabled,
fields_style_markup? : @formatting.StyleMarkupMode = @formatting.StyleMarkupMode::Disabled,
style_tags? : Map[String, @formatting.TextStyle] = {},
style_tags? : Map[String, @formatting.TextStyle] = Map([]),
) -> TextFormatterConfig {
{
show_timestamp,
@@ -380,7 +380,7 @@ fn parse_text_formatter_config(
get_string(obj, "fields_style_markup", default="disabled"),
),
style_tags=match obj.get("style_tags") {
None => {}
None => Map([])
Some(inner) => parse_style_tags_config(inner)
},
)
@@ -407,7 +407,7 @@ fn parse_style_tags_config(
value : @json_parser.JsonValue,
) -> Map[String, @formatting.TextStyle] raise ConfigError {
let obj = expect_object(value, "text_formatter.style_tags")
let style_tags : Map[String, @formatting.TextStyle] = {}
let style_tags : Map[String, @formatting.TextStyle] = Map([])
for name, item in obj {
style_tags[name] = parse_text_style_config(
item,
@@ -584,7 +584,7 @@ fn text_style_config_to_json(
fn style_tags_config_to_json(
style_tags : Map[String, @formatting.TextStyle],
) -> @json_parser.JsonValue {
let obj : Map[String, @json_parser.JsonValue] = {}
let obj : Map[String, @json_parser.JsonValue] = Map([])
for name, style in style_tags {
obj[name] = text_style_config_to_json(style)
}
+2 -2
View File
@@ -55,7 +55,7 @@ fn normalize_style_tag_name(name : String) -> String {
///|
pub fn style_tag_registry() -> StyleTagRegistry {
{ entries: {} }
{ entries: Map([]) }
}
///|
@@ -1015,7 +1015,7 @@ fn level_ansi_code(level : @core.Level) -> String {
///|
fn fields_to_json(fields : Array[@core.Field]) -> Json {
let obj : Map[String, Json] = {}
let obj : Map[String, Json] = Map([])
for item in fields {
obj[item.key] = Json::string(item.value)
}