diff --git a/.gitattributes b/.gitattributes index 6c0983bc..d9518406 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,3 +6,4 @@ **/*.njk linguist-detectable=false **/*.vto linguist-detectable=false **/*.mustache linguist-detectable=false +**/*.hbs linguist-detectable=false diff --git a/.vscode/settings.json b/.vscode/settings.json index 1c59ca82..b6055b31 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "rust-analyzer.cargo.features": ["config_serde"], - "[html][vue][svelte][markdown]": { + "[html][vue][svelte][markdown][handlebars]": { "editor.formatOnSave": false } } diff --git a/Cargo.lock b/Cargo.lock index b4b7ba9f..24b00408 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,9 +16,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -31,32 +31,35 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anyhow" -version = "1.0.99" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] -name = "arrayvec" -version = "0.7.6" +name = "ar_archive_writer" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +dependencies = [ + "object", +] [[package]] name = "ast_node" -version = "3.0.3" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e2cddd48eafd883890770673b1971faceaf80a185445671abc3ea0c00593ee" +checksum = "2eb025ef00a6da925cf40870b9c8d008526b6004ece399cb0974209720f0b194" dependencies = [ "quote", "swc_macros_common", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "better_scoped_tls" @@ -69,15 +72,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.3" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", @@ -86,13 +89,29 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" dependencies = [ "allocator-api2", ] +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "bytes-str" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c60b5ce37e0b883c37eb89f79a1e26fbe9c1081945d024eee93e8d91a7e18b3" +dependencies = [ + "bytes", + "serde", +] + [[package]] name = "capacity_builder" version = "0.5.0" @@ -110,34 +129,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b4a6cae9efc04cc6cbb8faf338d2c497c165c83e74509cf4dbedea948bbf6e5" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "cc" -version = "1.2.34" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -154,9 +173,9 @@ checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" [[package]] name = "deno_ast" -version = "0.49.0" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24158ccf7def38c00fd253fd1b48c8c6207214078fe499f47168763fa2445bf2" +checksum = "05792fb2b77938767ffeb0853289e86501fddc84b1cdba9e5dc860c52baa2ff7" dependencies = [ "capacity_builder", "deno_error", @@ -168,19 +187,20 @@ dependencies = [ "swc_atoms", "swc_common", "swc_ecma_ast", + "swc_ecma_lexer", "swc_ecma_parser", "swc_eq_ignore_macros", "text_lines", "thiserror", - "unicode-width 0.2.1", + "unicode-width", "url", ] [[package]] name = "deno_error" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde60bd153886964234c5012d3d9caf788287f28d81fb24a884436904101ef10" +checksum = "3007d3f1ea92ea503324ae15883aac0c2de2b8cf6fead62203ff6a67161007ab" dependencies = [ "deno_error_macro", "libc", @@ -188,20 +208,20 @@ dependencies = [ [[package]] name = "deno_error_macro" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409f265785bd946d3006756955aaf40b0e4deb25752eae6a990afe54a31cfd83" +checksum = "9b565e60a9685cdf312c888665b5f8647ac692a7da7e058a5e2268a466da8eaf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "deno_media_type" -version = "0.2.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec0dada9dc5ac4733b4175d36f6a150b7dd68fab46db35cb1ef00dd7366acb" +checksum = "debab24ecd9f4fd64aa42fb18a02dff20a97d5830b2b85b98ce70b509f790763" dependencies = [ "data-url", "serde", @@ -210,9 +230,9 @@ dependencies = [ [[package]] name = "deno_terminal" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f71c27009e0141dedd315f1dfa3ebb0a6ca4acce7c080fac576ea415a465f6" +checksum = "f3ba8041ae7319b3ca6a64c399df4112badcbbe0868b4517637647614bede4be" dependencies = [ "once_cell", "termcolor", @@ -220,13 +240,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -242,7 +262,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "unicode-width 0.2.1", + "unicode-width", ] [[package]] @@ -257,9 +277,9 @@ dependencies = [ [[package]] name = "dprint-plugin-json" -version = "0.20.0" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb59d5e75ae9fb879a8793fdfc72e25ed9f0c91e62f5dc53e4f8ebb72103f100" +checksum = "a2fe735acd073034b25ca9868f49b5265ff01a831dff89a2302dbe70178ca1db" dependencies = [ "anyhow", "dprint-core", @@ -272,9 +292,9 @@ dependencies = [ [[package]] name = "dprint-plugin-typescript" -version = "0.95.10" +version = "0.95.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cbb60779bfcb1f133387838bfa06dc5362576270d67857de225e453b587ae2" +checksum = "82a9955c99ac8e2c0780e14af209c7fff8833b1b58a963f4525c5f3efe3080ed" dependencies = [ "anyhow", "capacity_builder", @@ -289,9 +309,9 @@ dependencies = [ [[package]] name = "dprint-swc-ext" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a09827d6db1a3af25e105553d674ee9019be58fa3d6745c2a2803f8ce8e3eb8" +checksum = "33175ddb7a6d418589cab2966bd14a710b3b1139459d3d5ca9edf783c4833f4c" dependencies = [ "allocator-api2", "bumpalo", @@ -300,13 +320,14 @@ dependencies = [ "swc_atoms", "swc_common", "swc_ecma_ast", + "swc_ecma_lexer", "swc_ecma_parser", "text_lines", ] [[package]] name = "dprint_plugin_markup" -version = "0.24.1+pw.3" +version = "0.27.3+pw.1" dependencies = [ "anyhow", "dprint-core", @@ -322,9 +343,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "encode_unicode" @@ -338,6 +359,28 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + [[package]] name = "foldhash" version = "0.1.5" @@ -355,19 +398,32 @@ dependencies = [ [[package]] name = "from_variant" -version = "2.0.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308530a56b099da144ebc5d8e179f343ad928fa2b3558d1eb3db9af18d6eff43" +checksum = "e5ff35a391aef949120a0340d690269b3d9f63460a6106e99bd07b961f345ea9" dependencies = [ "swc_macros_common", - "syn 2.0.106", + "syn 2.0.117", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", ] [[package]] name = "globset" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -397,6 +453,12 @@ dependencies = [ "foldhash", ] +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + [[package]] name = "heck" version = "0.5.0" @@ -405,25 +467,27 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hstr" -version = "1.1.6" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b85186bc48d3c611ead052cc3f907748e40b63d73a99e4ed34d18063e2baaf1b" +checksum = "c1b94e40256e78ddd4e30490aa931bec17e65e9413a6ad11f64ec67815da9323" dependencies = [ "hashbrown 0.14.5", "new_debug_unreachable", "once_cell", "rustc-hash", + "serde", "triomphe", ] [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -431,9 +495,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -444,11 +508,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -459,42 +522,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -502,6 +561,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "idna" version = "1.1.0" @@ -515,9 +580,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -525,25 +590,27 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.15.5", + "hashbrown 0.17.1", "serde", + "serde_core", ] [[package]] name = "insta" -version = "1.43.1" +version = "1.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "154934ea70c58054b556dd430b99a98c2a7ff5309ac9891597e339b5c28f4371" +checksum = "7b4a6248eb93a4401ed2f37dfe8ea592d3cf05b7cf4f8efa867b6895af7e094e" dependencies = [ "console", "globset", "once_cell", - "similar", + "similar 2.7.0", + "tempfile", "walkdir", ] @@ -556,7 +623,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -570,51 +637,66 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jsonc-parser" -version = "0.26.3" +version = "0.32.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d80e6d70e7911a29f3cf3f44f452df85d06f73572b494ca99a2cad3fcf8f4" +checksum = "840785e1a8b4fdb27be18440a35a81af64820dc185c3973ff8b012d4c6282512" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.175" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "log" -version = "0.4.27" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" [[package]] name = "malva" -version = "0.14.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d4489f0a5fba19d60c9e9b1fb03bfe3a31cc5ef8abd055692226dd006ee02af" +checksum = "7b5322f15714c4c20d0daa53813d648f5ef660556c728fdc10a79b8754bb046d" dependencies = [ "aho-corasick", "itertools", "memchr", "raffia", "serde", - "tiny_pretty", + "tiny_pretty 0.2.1", ] [[package]] name = "markup_fmt" -version = "0.24.1+pw.3" +version = "0.27.3+pw.1" dependencies = [ "aho-corasick", "anyhow", @@ -622,17 +704,18 @@ dependencies = [ "insta", "itertools", "memchr", + "regex", "serde", "similar-asserts", - "tiny_pretty", + "tiny_pretty 0.4.2", "toml", ] [[package]] name = "memchr" -version = "2.7.5" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] name = "new_debug_unreachable" @@ -669,11 +752,20 @@ dependencies = [ "autocfg", ] +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "percent-encoding" @@ -711,7 +803,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -720,56 +812,73 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher 1.0.1", + "siphasher 1.0.3", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.117", +] + [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.26" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" +checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" dependencies = [ + "ar_archive_writer", "cc", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "raffia" -version = "0.11.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835acd953484875b38912e6b9b2813682329f3912992bf5fc3109f7197add098" +checksum = "a589c5611a5f7713bf0c13e949c4c791a359ff517a9f27552475b470e8873229" dependencies = [ "raffia_macro", "serde", @@ -778,20 +887,20 @@ dependencies = [ [[package]] name = "raffia_macro" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fdb50eb5bf734fa5a770680a61876a6ec77b99c1e0e52d1f18ad6ebfa85759f" +checksum = "8ac21f5e4bc6b29ea5d5e691a9aa08b2b9fd8891f48a99157b9f02d8a48e1318" dependencies = [ "heck", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "rand_core", ] @@ -802,11 +911,23 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -815,21 +936,28 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" [[package]] -name = "ryu" -version = "1.0.20" +name = "rustix" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] [[package]] name = "same-file" @@ -846,46 +974,69 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "seq-macro" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" + [[package]] name = "serde" -version = "1.0.219" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "serde_json" -version = "1.0.143" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "indexmap", "itoa", "memchr", - "ryu", "serde", + "serde_core", + "zmij", ] [[package]] name = "serde_spanned" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -899,6 +1050,12 @@ name = "similar" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" + +[[package]] +name = "similar" +version = "3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6505efef05804732ed8a3f2d4f279429eb485bd69d5b0cc6b19cc02005cda16" dependencies = [ "bstr", "unicode-segmentation", @@ -906,12 +1063,12 @@ dependencies = [ [[package]] name = "similar-asserts" -version = "1.7.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b441962c817e33508847a22bd82f03a30cff43642dc2fae8b050566121eb9a" +checksum = "997e6ca38e97437973fc9f7f50a50d1274cacd874341a4960fea90067291038c" dependencies = [ "console", - "similar", + "similar 3.1.1", ] [[package]] @@ -922,9 +1079,9 @@ checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" [[package]] name = "smallvec" @@ -945,21 +1102,21 @@ dependencies = [ [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stacker" -version = "0.1.21" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cddb07e32ddb770749da91081d8d0ac3a16f1a569a18b20348cd371f5dead06b" +checksum = "640c8cdd92b6b12f5bcb1803ca3bbf5ab96e5e6b6b96b9ab77dabe9e880b3190" dependencies = [ "cc", "cfg-if", "libc", "psm", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -976,42 +1133,30 @@ checksum = "ae36a4951ca7bd1cfd991c241584a9824a70f6aff1e7d4f693fb3f2465e4030e" dependencies = [ "quote", "swc_macros_common", - "syn 2.0.106", -] - -[[package]] -name = "swc_allocator" -version = "4.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7eefd2c8b228a8c73056482b2ae4b3a1071fbe07638e3b55ceca8570cc48bb" -dependencies = [ - "allocator-api2", - "bumpalo", - "rustc-hash", + "syn 2.0.117", ] [[package]] name = "swc_atoms" -version = "5.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d7077ba879f95406459bc0c81f3141c529b34580bc64d7ab7bd15e7118a0391" +checksum = "d4ccbe2ecad10ad7432100f878a107b1d972a8aee83ca53184d00c23a078bb8a" dependencies = [ "hstr", "once_cell", - "rustc-hash", "serde", ] [[package]] name = "swc_common" -version = "9.2.0" +version = "17.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56b6f5a8e5affa271b56757a93badee6f44defcd28f3ba106bb2603afe40d3d" +checksum = "259b675d633a26d24efe3802a9d88858c918e6e8f062d3222d3aa02d56a2cf4c" dependencies = [ "anyhow", "ast_node", "better_scoped_tls", - "cfg-if", + "bytes-str", "either", "from_variant", "new_debug_unreachable", @@ -1020,20 +1165,19 @@ dependencies = [ "rustc-hash", "serde", "siphasher 0.3.11", - "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", "tracing", - "unicode-width 0.1.14", + "unicode-width", "url", ] [[package]] name = "swc_ecma_ast" -version = "9.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0613d84468a6bb6d45d13c5a3368b37bd21f3067a089f69adac630dcb462a018" +checksum = "a573a0c72850dec8d4d8085f152d5778af35a2520c3093b242d2d1d50776da7c" dependencies = [ "bitflags", "is-macro", @@ -1041,7 +1185,6 @@ dependencies = [ "once_cell", "phf", "rustc-hash", - "scoped-tls", "serde", "string_enum", "swc_atoms", @@ -1052,18 +1195,15 @@ dependencies = [ [[package]] name = "swc_ecma_lexer" -version = "12.0.0" +version = "26.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d11c8e71901401b9aae2ece4946eeb7674b14b8301a53768afbbeeb0e48b599" +checksum = "5e82f7747e052c6ff6e111fa4adeb14e33b46ee6e94fe5ef717601f651db48fc" dependencies = [ - "arrayvec", "bitflags", "either", - "new_debug_unreachable", "num-bigint", - "num-traits", - "phf", "rustc-hash", + "seq-macro", "serde", "smallvec", "smartstring", @@ -1071,45 +1211,40 @@ dependencies = [ "swc_atoms", "swc_common", "swc_ecma_ast", + "swc_ecma_parser", "tracing", - "typed-arena", ] [[package]] name = "swc_ecma_parser" -version = "12.0.0" +version = "27.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "250786944fbc05f6484eda9213df129ccfe17226ae9ad51b62fce2f72135dbee" +checksum = "7f1a51af1a92cd4904c073b293e491bbc0918400a45d58227b34c961dd6f52d7" dependencies = [ - "arrayvec", "bitflags", "either", - "new_debug_unreachable", "num-bigint", - "num-traits", "phf", "rustc-hash", + "seq-macro", "serde", - "smallvec", "smartstring", "stacker", "swc_atoms", "swc_common", "swc_ecma_ast", - "swc_ecma_lexer", "tracing", - "typed-arena", ] [[package]] name = "swc_eq_ignore_macros" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" +checksum = "c16ce73424a6316e95e09065ba6a207eba7765496fed113702278b7711d4b632" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -1120,7 +1255,7 @@ checksum = "aae1efbaa74943dc5ad2a2fb16cbd78b77d7e4d63188f3c5b4df2b4dcd2faaae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -1146,9 +1281,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -1163,7 +1298,20 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys", ] [[package]] @@ -1186,22 +1334,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] @@ -1209,15 +1357,18 @@ name = "tiny_pretty" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650d82e943da333637be9f1567d33d605e76810a26464edfd7ae74f7ef181e95" -dependencies = [ - "unicode-width 0.2.1", -] + +[[package]] +name = "tiny_pretty" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6f118a569adc26e8a9a377130f181a461770225e588c73a00c8636b8680b6c" [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -1225,12 +1376,12 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.5" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75129e1dc5000bfbaa9fee9d1b21f974f9fbad9daec557a521ee6e080825f6e8" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", - "serde", + "serde_core", "serde_spanned", "toml_datetime", "toml_parser", @@ -1240,33 +1391,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ - "serde", + "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.2" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b551886f449aa90d4fe2bdaa9f4a2577ad2dde302c61ecf262d80b116db95c10" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.2" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -1275,80 +1426,75 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", ] [[package]] name = "triomphe" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" +checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39" dependencies = [ "serde", "stable_deref_trait", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "unicode-id-start" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f322b60f6b9736017344fa0635d64be2f458fbc04eef65f6be22976dd1ffd5b" +checksum = "81b79ad29b5e19de4260020f8919b443b2ef0277d242ce532ec7b7a2cc8b6007" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] -name = "unicode-width" -version = "0.2.1" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "url" -version = "2.5.6" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "137a3c834eaf7139b73688502f3f1141a0337c5d8e4d9b536f9b8c796e26a7c4" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -1374,186 +1520,193 @@ dependencies = [ ] [[package]] -name = "winapi-util" -version = "0.1.10" +name = "wasip2" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "windows-sys 0.60.2", + "wit-bindgen 0.57.1", ] [[package]] -name = "windows-link" -version = "0.1.3" +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "windows-targets 0.52.6", + "wit-bindgen 0.51.0", ] [[package]] -name = "windows-sys" -version = "0.60.2" +name = "wasm-encoder" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" dependencies = [ - "windows-targets 0.53.3", + "leb128fmt", + "wasmparser", ] [[package]] -name = "windows-targets" -version = "0.52.6" +name = "wasm-metadata" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", ] [[package]] -name = "windows-targets" -version = "0.53.3" +name = "wasmparser" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" +name = "winapi-util" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys", +] [[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] -name = "windows_i686_msvc" -version = "0.52.6" +name = "windows-sys" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] [[package]] -name = "windows_i686_msvc" -version = "0.53.0" +name = "winnow" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" [[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" +name = "wit-bindgen" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] [[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" +name = "wit-bindgen" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" +name = "wit-bindgen-core" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] [[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" +name = "wit-bindgen-rust" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "wit-bindgen-rust-macro" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" +name = "wit-component" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] [[package]] -name = "winnow" -version = "0.7.12" +name = "wit-parser" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -1561,62 +1714,62 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.26" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.26" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", "synstructure", ] [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -1625,9 +1778,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -1636,11 +1789,17 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.117", ] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index b49bd03b..2865e397 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,9 @@ resolver = "3" [workspace.dependencies] anyhow = "1.0" -insta = { version = "1.43", features = ["glob"] } -similar-asserts = "1.7" -toml = "0.9" +insta = { version = "1.47", features = ["glob"] } +similar-asserts = "2.0" +toml = "1.1" [profile.release] lto = true diff --git a/README.md b/README.md index 40c91976..ead67247 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

markup_fmt

-markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache and XML formatter. +markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML formatter.

## Notes for Vue and Svelte Users @@ -20,7 +20,7 @@ This will make ESLint faster because less rules will be executed. We've provided [dprint](https://dprint.dev/) integration. -This plugin only formats HTML syntax of your HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache and XML files. +This plugin only formats HTML syntax of your HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML files. You also need other dprint plugins to format the code in ` diff --git a/dprint_plugin/tests/integration/dprint_ts/basic.astro.snap b/dprint_plugin/tests/integration/dprint_ts/basic.astro.snap index 22b8e991..068e06ed 100644 --- a/dprint_plugin/tests/integration/dprint_ts/basic.astro.snap +++ b/dprint_plugin/tests/integration/dprint_ts/basic.astro.snap @@ -69,3 +69,5 @@ document.getElementById("button").addEventListener("click", handleClick); {/* */} {/* https://example.com */} + +
diff --git a/dprint_plugin/tests/integration/dprint_ts/basic.svelte.snap b/dprint_plugin/tests/integration/dprint_ts/basic.svelte.snap index b0dc3a7f..5c7e43a7 100644 --- a/dprint_plugin/tests/integration/dprint_ts/basic.svelte.snap +++ b/dprint_plugin/tests/integration/dprint_ts/basic.svelte.snap @@ -55,3 +55,18 @@ function generateHtml(data: unknown) {
+ +
+ +
+ {#if input} + {@render input({ + value: ref.query, + oninput: handleInput, + onkeydown: handleKeydown, + placeholder, + })} + {:else} + + {/if} +
diff --git a/dprint_plugin/tests/integration/dprint_ts/basic.vto.snap b/dprint_plugin/tests/integration/dprint_ts/basic.vto.snap index eb9a94f4..4d98c30b 100644 --- a/dprint_plugin/tests/integration/dprint_ts/basic.vto.snap +++ b/dprint_plugin/tests/integration/dprint_ts/basic.vto.snap @@ -27,3 +27,12 @@ body { background-color: {{ colors.white }}; } + + + diff --git a/dprint_plugin/tests/integration/dprint_ts/event.html.snap b/dprint_plugin/tests/integration/dprint_ts/event.html.snap new file mode 100644 index 00000000..a612f29f --- /dev/null +++ b/dprint_plugin/tests/integration/dprint_ts/event.html.snap @@ -0,0 +1,5 @@ +--- +source: dprint_plugin/tests/integration.rs +--- + + diff --git a/dprint_plugin/tests/integration/dprint_ts/json.html.snap b/dprint_plugin/tests/integration/dprint_ts/json.html.snap index 89dc9560..27d7895c 100644 --- a/dprint_plugin/tests/integration/dprint_ts/json.html.snap +++ b/dprint_plugin/tests/integration/dprint_ts/json.html.snap @@ -11,6 +11,17 @@ source: dprint_plugin/tests/integration.rs } } + diff --git a/dprint_plugin/tests/integration/dprint_ts/v-for-destructuring.vue.snap b/dprint_plugin/tests/integration/dprint_ts/v-for-destructuring.vue.snap new file mode 100644 index 00000000..30788f39 --- /dev/null +++ b/dprint_plugin/tests/integration/dprint_ts/v-for-destructuring.vue.snap @@ -0,0 +1,17 @@ +--- +source: dprint_plugin/tests/integration.rs +--- + diff --git a/dprint_plugin/tests/integration/event.html b/dprint_plugin/tests/integration/event.html new file mode 100644 index 00000000..2ae63174 --- /dev/null +++ b/dprint_plugin/tests/integration/event.html @@ -0,0 +1,2 @@ + + diff --git a/dprint_plugin/tests/integration/json.html b/dprint_plugin/tests/integration/json.html index 6705b91f..0863f21e 100644 --- a/dprint_plugin/tests/integration/json.html +++ b/dprint_plugin/tests/integration/json.html @@ -3,6 +3,9 @@ + diff --git a/dprint_plugin/tests/integration/v-for-destructuring.vue b/dprint_plugin/tests/integration/v-for-destructuring.vue new file mode 100644 index 00000000..d8e3aa4f --- /dev/null +++ b/dprint_plugin/tests/integration/v-for-destructuring.vue @@ -0,0 +1,8 @@ + diff --git a/markup_fmt/Cargo.toml b/markup_fmt/Cargo.toml index 636a3b2e..c6144feb 100644 --- a/markup_fmt/Cargo.toml +++ b/markup_fmt/Cargo.toml @@ -1,20 +1,22 @@ [package] name = "markup_fmt" -version = "0.24.1+pw.3" +version = "0.27.3+pw.1" edition = "2024" authors = ["Pig Fang "] -description = "Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache and XML formatter." +description = "Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML formatter." repository = "https://github.com/pickware/markup_fmt" license = "MIT" exclude = ["/tests"] [dependencies] aho-corasick = "1.1" +anyhow = "1.0" css_dataset = { version = "0.4", default-features = false, features = ["tags"] } itertools = "0.14" -memchr = "2.7" +memchr = "2.8" +regex = "1.12" serde = { version = "1.0", optional = true } -tiny_pretty = { version = "0.2", features = ["unicode-width"] } +tiny_pretty = "0.4" [dev-dependencies] anyhow.workspace = true diff --git a/markup_fmt/README.md b/markup_fmt/README.md index e74f72f0..1a432160 100644 --- a/markup_fmt/README.md +++ b/markup_fmt/README.md @@ -1,4 +1,4 @@ -markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache and XML formatter. +markup_fmt is a configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, Vento, Mustache, Handlebars and XML formatter. ## Basic Usage @@ -12,7 +12,7 @@ assert_eq!("
\n", &format_text( "
", Language::Html, &options, - |code, _| Ok::<_, std::convert::Infallible>(code.into()), + |code, _| Ok(code.into()), ).unwrap()); ``` @@ -30,27 +30,26 @@ assert!(matches!( "
", Language::Html, &options, - |code, _| Ok::<_, std::convert::Infallible>(code.into()), + |code, _| Ok(code.into()), ).unwrap_err(), FormatError::Syntax(SyntaxError { .. }) )); ``` -External formatter can return [`Err`] as well. +External formatter can return `anyhow::Error`. This error will be aggregated and returned in [`FormatError::External`]: ```rust +use anyhow::Error; use markup_fmt::{config::FormatOptions, format_text, FormatError, Language}; -struct ExternalFormatterError; - let options = FormatOptions::default(); assert!(matches!( format_text( "", Language::Html, &options, - |_, _| Err(ExternalFormatterError), + |_, _| Err(Error::msg("external formatter error")), ).unwrap_err(), FormatError::External(errors) if !errors.is_empty() )); diff --git a/markup_fmt/examples/fmt.rs b/markup_fmt/examples/fmt.rs index a3dd4e7b..1d18a4c1 100644 --- a/markup_fmt/examples/fmt.rs +++ b/markup_fmt/examples/fmt.rs @@ -1,5 +1,5 @@ use markup_fmt::{config::FormatOptions, detect_language, format_text}; -use std::{convert::Infallible, env, fs, io}; +use std::{env, fs, io}; fn main() -> anyhow::Result<()> { let file_path = env::args().nth(1).unwrap(); @@ -16,9 +16,7 @@ fn main() -> anyhow::Result<()> { } }; - let formatted = format_text(&code, language, &options, |code, _| { - Ok::<_, Infallible>(code.into()) - })?; + let formatted = format_text(&code, language, &options, |code, _| Ok(code.into()))?; print!("{formatted}"); Ok(()) } diff --git a/markup_fmt/src/ast.rs b/markup_fmt/src/ast.rs index 0e98a11c..8f4c7e0a 100644 --- a/markup_fmt/src/ast.rs +++ b/markup_fmt/src/ast.rs @@ -33,6 +33,13 @@ pub struct AngularElseIf<'s> { pub children: Vec>, } +#[derive(Debug)] +pub struct AngularGenericBlock<'s> { + pub keyword: &'s str, + pub header: Option<&'s str>, + pub children: Vec>, +} + #[derive(Debug)] /// Angular interpolation: `{{ expression }}`. /// @@ -102,6 +109,7 @@ pub enum Attribute<'s> { JinjaBlock(JinjaBlock<'s, Attribute<'s>>), JinjaComment(JinjaComment<'s>), JinjaTag(JinjaTag<'s>), + JsComment(JsComment<'s>), Native(NativeAttribute<'s>), Svelte(SvelteAttribute<'s>), SvelteAttachment(SvelteAttachment<'s>), @@ -179,6 +187,8 @@ pub struct JinjaComment<'s> { pub struct JinjaInterpolation<'s> { pub expr: &'s str, pub start: usize, + pub trim_prev: bool, + pub trim_next: bool, } #[derive(Debug)] @@ -196,14 +206,28 @@ pub enum JinjaTagOrChildren<'s, T> { Children(Vec), } +#[derive(Debug)] +pub struct JsComment<'s> { + pub block: bool, + pub raw: &'s str, +} + #[derive(Debug)] /// Mustache block: `{{#variable}}{{/variable}}`. /// /// See https://mustache.github.io/mustache.5.html pub struct MustacheBlock<'s> { + pub controls: Vec>, + pub children: Vec>>, +} + +#[derive(Debug)] +pub struct MustacheBlockControl<'s> { + pub name: &'s str, pub prefix: &'s str, - pub content: &'s str, - pub children: Vec>, + pub content: Option<&'s str>, + pub wc_before: bool, + pub wc_after: bool, } #[derive(Debug)] @@ -233,6 +257,7 @@ pub struct Node<'s> { #[derive(Debug)] pub enum NodeKind<'s> { AngularFor(AngularFor<'s>), + AngularGenericBlocks(Vec>), AngularIf(AngularIf<'s>), AngularInterpolation(AngularInterpolation<'s>), AngularLet(AngularLet<'s>), @@ -421,6 +446,8 @@ pub struct VentoEval<'s> { pub struct VentoInterpolation<'s> { pub expr: &'s str, pub start: usize, + pub trim_prev: bool, + pub trim_next: bool, } #[derive(Debug)] diff --git a/markup_fmt/src/config.rs b/markup_fmt/src/config.rs index 4d41149e..09d983fa 100644 --- a/markup_fmt/src/config.rs +++ b/markup_fmt/src/config.rs @@ -50,7 +50,7 @@ impl Default for LayoutOptions { } } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum LineBreak { @@ -299,7 +299,7 @@ impl Default for LanguageOptions { } } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum Quotes { @@ -308,7 +308,7 @@ pub enum Quotes { Single, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum ClosingTagLineBreakForEmpty { @@ -318,7 +318,7 @@ pub enum ClosingTagLineBreakForEmpty { Never, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum WhitespaceSensitivity { @@ -328,7 +328,7 @@ pub enum WhitespaceSensitivity { Ignore, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum DoctypeKeywordCase { @@ -338,7 +338,7 @@ pub enum DoctypeKeywordCase { Lower, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum VBindStyle { @@ -347,7 +347,7 @@ pub enum VBindStyle { Long, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum VOnStyle { @@ -356,7 +356,7 @@ pub enum VOnStyle { Long, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum VForDelimiterStyle { @@ -365,7 +365,7 @@ pub enum VForDelimiterStyle { Of, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum VSlotStyle { @@ -376,7 +376,7 @@ pub enum VSlotStyle { VSlot, } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Copy, Debug, Default)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum VueComponentCase { @@ -391,7 +391,7 @@ pub enum VueComponentCase { KebabCase, } -#[derive(Clone, Debug)] +#[derive(Clone, Copy, Debug)] #[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "config_serde", serde(rename_all = "kebab-case"))] pub enum ScriptFormatter { diff --git a/markup_fmt/src/ctx.rs b/markup_fmt/src/ctx.rs index 85d6ab69..44824e01 100644 --- a/markup_fmt/src/ctx.rs +++ b/markup_fmt/src/ctx.rs @@ -4,14 +4,20 @@ use crate::{ helpers, state::State, }; +use anyhow::Error; use memchr::memchr; -use std::borrow::Cow; +use regex::{Captures, Regex}; +use std::{borrow::Cow, sync::LazyLock}; const QUOTES: [&str; 3] = ["\"", "\"", "'"]; -pub(crate) struct Ctx<'b, E, F> +static RE_LINE_COLUMN: LazyLock = LazyLock::new(|| { + Regex::new(r"(?:[Ll]ine\s*(\d+),?\s*[Cc]ol(?:umn)?\s*(\d+))|:(\d+):(\d+)").unwrap() +}); + +pub(crate) struct Ctx<'b, F> where - F: for<'a> FnMut(&'a str, Hints<'b>) -> Result, E>, + F: for<'a> FnMut(&'a str, Hints<'b>) -> Result, Error>, { pub(crate) source: &'b str, pub(crate) language: Language, @@ -19,12 +25,12 @@ where pub(crate) print_width: usize, pub(crate) options: &'b LanguageOptions, pub(crate) external_formatter: F, - pub(crate) external_formatter_errors: Vec, + pub(crate) external_formatter_errors: Vec, } -impl<'b, E, F> Ctx<'b, E, F> +impl<'b, F> Ctx<'b, F> where - F: for<'a> FnMut(&'a str, Hints<'b>) -> Result, E>, + F: for<'a> FnMut(&'a str, Hints<'b>) -> Result, Error>, { pub(crate) fn script_indent(&self) -> bool { match self.language { @@ -86,11 +92,11 @@ where matches!( self.options .component_whitespace_sensitivity - .clone() - .unwrap_or(self.options.whitespace_sensitivity.clone()), + .unwrap_or(self.options.whitespace_sensitivity), WhitespaceSensitivity::Css | WhitespaceSensitivity::Strict ) } + Language::Xml => false, _ => match self.options.whitespace_sensitivity { WhitespaceSensitivity::Css => { helpers::is_whitespace_sensitive_tag(tag_name, self.language) @@ -145,7 +151,7 @@ where code: &str, attr: bool, start: usize, - ) -> Result { + ) -> Result { self.try_format_expr_with_indent(code, attr, start, 0) } @@ -155,27 +161,19 @@ where attr: bool, start: usize, indent_level: u16, - ) -> Result { - if code.trim().is_empty() { + ) -> Result { + let code = code.trim_ascii(); + if code.is_empty() { Ok(String::new()) } else { // Trim original code before sending it to the external formatter. // This makes sure the code will be trimmed // though external formatter isn't available. - let wrapped = if code.trim_start().starts_with('{') { - self.source - .get(0..start.saturating_sub(1)) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + "(" - + code.trim() - + ")" + let will_add_brackets = code.starts_with('{') || code.starts_with("..."); + let wrapped = if will_add_brackets { + &format!("[{code}]") } else { - self.source - .get(0..start) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + code + code }; let formatted = self.try_format_with_external_formatter( wrapped, @@ -185,50 +183,41 @@ where attr, ext: "tsx", }, + start, )?; - let formatted = formatted.trim_matches(|c: char| c.is_ascii_whitespace() || c == ';'); - let formatted = if code.trim_start().chars().take_while(|c| *c == '(').count() - < formatted.chars().take_while(|c| *c == '(').count() - && code - .trim_end() - .chars() - .rev() - .take_while(|c| *c == ')') - .count() - < formatted.chars().rev().take_while(|c| *c == ')').count() - { - formatted - .trim_ascii() - .strip_prefix('(') - .and_then(|s| s.strip_suffix(')')) - .unwrap_or(formatted) - } else { - formatted - }; + let mut formatted = + formatted.trim_matches(|c: char| c.is_ascii_whitespace() || c == ';'); + // Only strip the wrapping brackets we added ourselves. Stripping + // `[` `]` unconditionally would remove array-destructuring brackets + // that the external formatter merely exposed by dropping redundant + // parentheses (e.g. `([a, b])` -> `[a, b]`), which corrupts Vue + // `v-for` bindings into `(a, b)` and changes their semantics. + if will_add_brackets { + formatted = trim_delim(code, formatted, '[', ']'); + } + formatted = trim_delim(code, formatted, '(', ')'); + if will_add_brackets { + formatted = formatted.trim_ascii_end().trim_end_matches(','); + } Ok(formatted.trim_ascii().to_owned()) } } pub(crate) fn format_binding(&mut self, code: &str, start: usize) -> String { - if code.trim().is_empty() { + let code = code.trim_ascii(); + if code.is_empty() { String::new() } else { - let wrapped = self - .source - .get(0..start.saturating_sub(4)) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + "let " - + code.trim() - + " = 0"; + let wrapped = format!("let {code} = 0"); let formatted = self.format_with_external_formatter( - wrapped, + &wrapped, Hints { print_width: self.print_width, indent_level: 0, attr: false, ext: "ts", }, + start, ); let formatted = formatted.trim_matches(|c: char| c.is_ascii_whitespace() || c == ';'); formatted @@ -240,25 +229,20 @@ where } pub(crate) fn format_type_params(&mut self, code: &str, start: usize) -> String { - if code.trim().is_empty() { + let code = code.trim_ascii(); + if code.is_empty() { String::new() } else { - let wrapped = self - .source - .get(0..start.saturating_sub(7)) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + "type T<" - + code.trim() - + "> = 0"; + let wrapped = format!("type T<{code}> = 0"); let formatted = self.format_with_external_formatter( - wrapped, + &wrapped, Hints { print_width: self.print_width, indent_level: 0, attr: true, ext: "ts", }, + start, ); let formatted = formatted.trim_matches(|c: char| c.is_ascii_whitespace() || c == ';'); formatted @@ -272,18 +256,20 @@ where } pub(crate) fn format_stmt_header(&mut self, keyword: &str, code: &str) -> String { - if code.trim().is_empty() { + let code = code.trim_ascii(); + if code.is_empty() { String::new() } else { let wrapped = format!("{keyword} ({code}) {{}}"); let formatted = self.format_with_external_formatter( - wrapped, + &wrapped, Hints { print_width: self.print_width, indent_level: 0, attr: false, ext: "js", }, + 0, ); formatted .strip_prefix(keyword) @@ -304,18 +290,31 @@ where start: usize, state: &State, ) -> Cow<'a, str> { - self.format_with_external_formatter( - self.source - .get(0..start) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + code, + match self.try_format_script(code, lang, start, state) { + Ok(formatted) => formatted, + Err(e) => { + self.external_formatter_errors.push(e); + Cow::from(code) + } + } + } + + pub(crate) fn try_format_script<'a>( + &mut self, + code: &'a str, + lang: &'b str, + start: usize, + state: &State, + ) -> Result, Error> { + self.try_format_with_external_formatter( + code, Hints { print_width: self.print_width, indent_level: state.indent_level, attr: false, ext: lang, }, + start, ) } @@ -327,14 +326,7 @@ where state: &State, ) -> Cow<'a, str> { self.format_with_external_formatter( - "\n".repeat( - self.source - .get(0..start) - .unwrap_or_default() - .lines() - .count() - .saturating_sub(1), - ) + code, + code, Hints { print_width: self .print_width @@ -348,22 +340,20 @@ where attr: false, ext: if lang == "postcss" { "css" } else { lang }, }, + start, ) } pub(crate) fn format_style_attr(&mut self, code: &str, start: usize, state: &State) -> String { self.format_with_external_formatter( - self.source - .get(0..start) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + code, + code, Hints { print_width: u16::MAX as usize, indent_level: state.indent_level, attr: true, ext: "css", }, + start, ) .trim() .to_owned() @@ -376,11 +366,7 @@ where state: &State, ) -> Cow<'a, str> { self.format_with_external_formatter( - self.source - .get(0..start) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + code, + code, Hints { print_width: self .print_width @@ -394,6 +380,7 @@ where attr: false, ext: "json", }, + start, ) } @@ -405,11 +392,7 @@ where state: &State, ) -> String { self.format_with_external_formatter( - self.source - .get(0..start) - .unwrap_or_default() - .replace(|c: char| !c.is_ascii_whitespace(), " ") - + code, + code, Hints { print_width: self .print_width @@ -422,6 +405,7 @@ where "markup-fmt-jinja-stmt" }, }, + start, ) .trim_ascii() .to_owned() @@ -429,12 +413,12 @@ where fn format_with_external_formatter<'a>( &mut self, - code: String, + code: &'a str, hints: Hints<'b>, + start: usize, ) -> Cow<'a, str> { - match (self.external_formatter)(&code, hints) { - Ok(Cow::Owned(formatted)) => Cow::from(formatted), - Ok(Cow::Borrowed(..)) => Cow::from(code), + match self.try_format_with_external_formatter(code, hints, start) { + Ok(formatted) => formatted, Err(e) => { self.external_formatter_errors.push(e); code.into() @@ -444,13 +428,45 @@ where fn try_format_with_external_formatter<'a>( &mut self, - code: String, + code: &'a str, hints: Hints<'b>, - ) -> Result, E> { - match (self.external_formatter)(&code, hints) { + start: usize, + ) -> Result, Error> { + match (self.external_formatter)(code, hints) { Ok(Cow::Owned(formatted)) => Ok(Cow::from(formatted)), Ok(Cow::Borrowed(..)) => Ok(Cow::from(code)), - Err(e) => Err(e), + Err(e) => { + let msg = e.to_string(); + let (start_line, start_col) = helpers::pos_to_line_col(self.source, start); + let msg = RE_LINE_COLUMN + .replace_all(&msg, |captures: &Captures| { + captures + .get(1) + .or_else(|| captures.get(3)) + .zip(captures.get(2).or_else(|| captures.get(4))) + .and_then(|(line, col)| { + Some(( + msg.get(..line.start())?, + msg.get(line.range()) + .and_then(|line| line.parse::().ok())?, + msg.get(line.end()..col.start())?, + msg.get(col.range()) + .and_then(|col| col.parse::().ok())?, + msg.get(col.end()..)?, + )) + }) + .map(|(prefix, line, mid, col, suffix)| { + format!( + "{prefix}{}{mid}{}{suffix}", + (start_line + line).saturating_sub(1), + start_col + col + ) + }) + .unwrap_or_else(|| msg.clone()) + }) + .to_string(); + Err(Error::msg(msg)) + } } } } @@ -465,3 +481,28 @@ pub struct Hints<'s> { /// Fake file extension. pub ext: &'s str, } + +fn trim_delim<'a>(user_input: &str, formatted: &'a str, start: char, end: char) -> &'a str { + if user_input + .trim_start() + .chars() + .take_while(|c| *c == start) + .count() + < formatted.chars().take_while(|c| *c == start).count() + && user_input + .trim_end() + .chars() + .rev() + .take_while(|c| *c == end) + .count() + < formatted.chars().rev().take_while(|c| *c == end).count() + { + formatted + .trim_ascii() + .strip_prefix(start) + .and_then(|s| s.strip_suffix(end)) + .unwrap_or(formatted) + } else { + formatted + } +} diff --git a/markup_fmt/src/error.rs b/markup_fmt/src/error.rs index f7af6cb6..9cdecc56 100644 --- a/markup_fmt/src/error.rs +++ b/markup_fmt/src/error.rs @@ -1,4 +1,5 @@ -use std::{borrow::Cow, error::Error, fmt}; +use anyhow::Error; +use std::{borrow::Cow, fmt}; #[derive(Clone, Debug)] /// Syntax error when parsing tags, not ` + > @@ -46,7 +45,10 @@ source: markup_fmt/tests/fmt.rs window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date; ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview') - + diff --git a/markup_fmt/tests/fmt/html/case/case.snap b/markup_fmt/tests/fmt/html/case/case.snap index 3c5f0b16..f655d301 100644 --- a/markup_fmt/tests/fmt/html/case/case.snap +++ b/markup_fmt/tests/fmt/html/case/case.snap @@ -14,7 +14,10 @@ source: markup_fmt/tests/fmt.rs window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date; ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview') - + diff --git a/markup_fmt/tests/fmt/html/comments/surrounding-empty-line.strict-whitespace.snap b/markup_fmt/tests/fmt/html/comments/surrounding-empty-line.strict-whitespace.snap index 4f8c9df1..16ff0d8b 100644 --- a/markup_fmt/tests/fmt/html/comments/surrounding-empty-line.strict-whitespace.snap +++ b/markup_fmt/tests/fmt/html/comments/surrounding-empty-line.strict-whitespace.snap @@ -5,8 +5,7 @@ source: markup_fmt/tests/fmt.rs -->
  • First
  • Second
  • Second
  • Second
  • Second
  • diff --git a/markup_fmt/tests/fmt/html/format-comments/unterminated.html b/markup_fmt/tests/fmt/html/format-comments/unterminated.html new file mode 100644 index 00000000..f63eda6c --- /dev/null +++ b/markup_fmt/tests/fmt/html/format-comments/unterminated.html @@ -0,0 +1 @@ + diff --git a/markup_fmt/tests/fmt/jinja/attributes/accept.jinja b/markup_fmt/tests/fmt/jinja/attributes/accept.jinja new file mode 100644 index 00000000..7144df17 --- /dev/null +++ b/markup_fmt/tests/fmt/jinja/attributes/accept.jinja @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/markup_fmt/tests/fmt/jinja/attributes/accept.snap b/markup_fmt/tests/fmt/jinja/attributes/accept.snap new file mode 100644 index 00000000..219622d3 --- /dev/null +++ b/markup_fmt/tests/fmt/jinja/attributes/accept.snap @@ -0,0 +1,22 @@ +--- +source: markup_fmt/tests/fmt.rs +--- + + + + + + + + + + + + + + + + diff --git a/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.double.snap b/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.double.snap index e93f9f5f..96817975 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.double.snap +++ b/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.double.snap @@ -4,7 +4,7 @@ source: markup_fmt/tests/fmt.rs
    -
    +
    @@ -15,12 +15,12 @@ source: markup_fmt/tests/fmt.rs -
    - - - +
    + + + {% for row in [1,2] %} -
  • {{ row }}
  • +
  • {{ row }}
  • {% endfor %} diff --git a/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.single.snap b/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.single.snap index 03a00d85..96817975 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.single.snap +++ b/markup_fmt/tests/fmt/jinja/attributes/mixed-quotes/mixed-quotes.single.snap @@ -5,7 +5,7 @@ source: markup_fmt/tests/fmt.rs
    -
    +
    @@ -25,10 +25,10 @@ source: markup_fmt/tests/fmt.rs -
    - - - +
    + + + {% for row in [1,2] %} -
  • {{ row }}
  • +
  • {{ row }}
  • {% endfor %} diff --git a/markup_fmt/tests/fmt/jinja/attributes/single-attr.jinja b/markup_fmt/tests/fmt/jinja/attributes/single-attr.jinja index b5f1e053..887a29ce 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/single-attr.jinja +++ b/markup_fmt/tests/fmt/jinja/attributes/single-attr.jinja @@ -20,4 +20,49 @@ {% if field.field.causes_red_card %}data-red-card{% elif field.field.causes_yellow_card %}data-yellow-card{% endif %} ->
    \ No newline at end of file +> + +
    +
    + +
    +
    + +# regression test for https://github.com/g-plane/markup_fmt/issues/199 +
    +
    + +# regression test for https://github.com/g-plane/markup_fmt/issues/198 +
    +
    diff --git a/markup_fmt/tests/fmt/jinja/attributes/single-attr.snap b/markup_fmt/tests/fmt/jinja/attributes/single-attr.snap index 18a36f44..2f49386a 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/single-attr.snap +++ b/markup_fmt/tests/fmt/jinja/attributes/single-attr.snap @@ -37,3 +37,48 @@ source: markup_fmt/tests/fmt.rs {% endif %} > + +
    +
    + +
    +
    + +# regression test for https://github.com/g-plane/markup_fmt/issues/199 +
    +
    + +# regression test for https://github.com/g-plane/markup_fmt/issues/198 +
    +
    diff --git a/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-as-attr.snap b/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-as-attr.snap index 91985b57..9c72335e 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-as-attr.snap +++ b/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-as-attr.snap @@ -76,7 +76,7 @@ source: markup_fmt/tests/fmt.rs {% else %} data-start="08:30:00" data-end="20:30:00" - data-start_day="{% now "Y-m-d" %}" + data-start_day='{% now "Y-m-d" %}' data-saturday_start="08:30:00" data-saturday_end="20:30:00" {% endif %} diff --git a/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-in-attr-value.snap b/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-in-attr-value.snap index 0c470ec1..5796d6b2 100644 --- a/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-in-attr-value.snap +++ b/markup_fmt/tests/fmt/jinja/attributes/tag-or-block-in-attr-value.snap @@ -1,11 +1,11 @@ --- source: markup_fmt/tests/fmt.rs --- -
    + {{ whatever }}
    Subscribe to the newsletter!