From 530c82dd54aaaff1cb4f16e8f5bf195951fb51ee Mon Sep 17 00:00:00 2001 From: Kevin Ness <46825870+nekevss@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:55:49 -0600 Subject: [PATCH] Bump temporal_rs --- Cargo.lock | 354 +++++++++++++----- Cargo.toml | 2 +- .../src/builtins/temporal/instant/mod.rs | 2 +- .../src/builtins/temporal/plain_date/mod.rs | 4 +- 4 files changed, 264 insertions(+), 98 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c0ae990ac4..23ee5a10aca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -379,7 +379,7 @@ dependencies = [ "float-cmp", "futures-lite 2.5.0", "hashbrown 0.15.2", - "icu_calendar", + "icu_calendar 1.5.2", "icu_casemap", "icu_collator", "icu_datetime", @@ -389,7 +389,7 @@ dependencies = [ "icu_locid_transform", "icu_normalizer", "icu_plurals", - "icu_provider", + "icu_provider 1.5.0", "icu_segmenter", "indexmap", "indoc", @@ -419,9 +419,9 @@ dependencies = [ "thin-vec", "thiserror", "time", - "tinystr", + "tinystr 0.7.6", "web-time", - "writeable", + "writeable 0.5.5", "yoke", "zerofrom", ] @@ -466,7 +466,7 @@ dependencies = [ "icu_locid_transform", "icu_normalizer", "icu_plurals", - "icu_provider", + "icu_provider 1.5.0", "icu_provider_adapters", "icu_provider_blob", "icu_segmenter", @@ -1297,7 +1297,7 @@ dependencies = [ "displaydoc", "ryu", "smallvec", - "writeable", + "writeable 0.5.5", ] [[package]] @@ -1543,10 +1543,10 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dff5e3018d703f168b00dcefa540a65f1bbc50754ae32f3f5f0e43fe5ee51502" dependencies = [ - "icu_calendar", + "icu_calendar 1.5.2", "icu_casemap", "icu_collator", - "icu_collections", + "icu_collections 1.5.0", "icu_datetime", "icu_decimal", "icu_experimental", @@ -1556,7 +1556,7 @@ dependencies = [ "icu_normalizer", "icu_plurals", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "icu_segmenter", "icu_timezone", ] @@ -1570,21 +1570,39 @@ dependencies = [ "calendrical_calculations", "databake", "displaydoc", - "icu_calendar_data", "icu_locid", - "icu_locid_transform", - "icu_provider", + "icu_provider 1.5.0", "serde", - "tinystr", - "writeable", - "zerovec", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_calendar" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3689f3f720936703584298dce9711d8c68b7aecef258d0e1e2677ec3d9567ff6" +dependencies = [ + "calendrical_calculations", + "displaydoc", + "icu_calendar_data", + "icu_locale_core", + "icu_provider 2.0.0-beta1", + "tinystr 0.8.0", + "writeable 0.6.0", + "zerovec 0.11.0", ] [[package]] name = "icu_calendar_data" -version = "1.5.0" +version = "2.0.0-beta1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e009b7f0151ee6fb28c40b1283594397e0b7183820793e9ace3dcd13db126d0" +checksum = "a113bfe4a5f0a4f9ab2f4ec5baac9f5cfab7c5ada910abf4b9ed4cfd066881cd" +dependencies = [ + "icu_locale", + "icu_provider_baked", +] [[package]] name = "icu_casemap" @@ -1594,13 +1612,13 @@ checksum = "9ff0c8ae9f8d31b12e27fc385ff9ab1f3cd9b17417c665c49e4ec958c37da75f" dependencies = [ "databake", "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_locid", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "serde", - "writeable", - "zerovec", + "writeable 0.5.5", + "zerovec 0.10.4", ] [[package]] @@ -1609,10 +1627,10 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41aa8d27817174c88860a3227fa5cc50cf2d915367f626d56f5711dd8a2e22a" dependencies = [ - "icu_collections", + "icu_collections 1.5.0", "toml 0.5.11", "wasmi", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1623,15 +1641,15 @@ checksum = "d370371887d31d56f361c3eaa15743e54f13bc677059c9191c77e099ed6966b2" dependencies = [ "databake", "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_normalizer", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "serde", "smallvec", "utf16_iter", "utf8_iter", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1645,7 +1663,20 @@ dependencies = [ "serde", "yoke", "zerofrom", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_collections" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "547ceba155a760830b848d9ae28183bc6bddf1b714ffc27bee1c7144f07229db" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec 0.11.0", ] [[package]] @@ -1659,11 +1690,11 @@ dependencies = [ "either", "elsa", "icu", - "icu_calendar", + "icu_calendar 1.5.2", "icu_casemap", "icu_codepointtrie_builder", "icu_collator", - "icu_collections", + "icu_collections 1.5.0", "icu_datetime", "icu_decimal", "icu_experimental", @@ -1674,7 +1705,7 @@ dependencies = [ "icu_pattern", "icu_plurals", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "icu_provider_adapters", "icu_provider_blob", "icu_segmenter", @@ -1692,13 +1723,13 @@ dependencies = [ "serde", "serde-aux", "serde_json", - "tinystr", + "tinystr 0.7.6", "toml 0.5.11", "twox-hash", "ureq", - "writeable", - "zerotrie", - "zerovec", + "writeable 0.5.5", + "zerotrie 0.1.3", + "zerovec 0.10.4", "zip", ] @@ -1712,18 +1743,18 @@ dependencies = [ "displaydoc", "either", "fixed_decimal", - "icu_calendar", + "icu_calendar 1.5.2", "icu_decimal", "icu_locid", "icu_plurals", - "icu_provider", + "icu_provider 1.5.0", "icu_timezone", "litemap", "serde", "smallvec", - "tinystr", - "writeable", - "zerovec", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", ] [[package]] @@ -1735,9 +1766,9 @@ dependencies = [ "databake", "displaydoc", "fixed_decimal", - "icu_provider", + "icu_provider 1.5.0", "serde", - "writeable", + "writeable 0.5.5", ] [[package]] @@ -1749,7 +1780,7 @@ dependencies = [ "databake", "displaydoc", "fixed_decimal", - "icu_collections", + "icu_collections 1.5.0", "icu_decimal", "icu_locid", "icu_locid_transform", @@ -1757,7 +1788,7 @@ dependencies = [ "icu_pattern", "icu_plurals", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "litemap", "log", "num-bigint", @@ -1765,11 +1796,11 @@ dependencies = [ "num-traits", "serde", "smallvec", - "tinystr", - "writeable", + "tinystr 0.7.6", + "writeable 0.5.5", "zerofrom", - "zerotrie", - "zerovec", + "zerotrie 0.1.3", + "zerovec 0.10.4", ] [[package]] @@ -1781,10 +1812,48 @@ dependencies = [ "databake", "deduplicating_array", "displaydoc", - "icu_provider", + "icu_provider 1.5.0", "regex-automata 0.2.0", "serde", - "writeable", + "writeable 0.5.5", +] + +[[package]] +name = "icu_locale" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f49d3c7f2dae0cd50d8b681a258e761eb714c9924f8222b7042118c0fb410649" +dependencies = [ + "displaydoc", + "icu_collections 2.0.0-beta1", + "icu_locale_core", + "icu_locale_data", + "icu_provider 2.0.0-beta1", + "potential_utf", + "tinystr 0.8.0", + "zerovec 0.11.0", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36332a8c93574b07598351bb479425282022341528ff521238fd4a48d143162" +dependencies = [ + "displaydoc", + "litemap", + "tinystr 0.8.0", + "writeable 0.6.0", + "zerovec 0.11.0", +] + +[[package]] +name = "icu_locale_data" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222f29513408cc4572fce10bcadd05505c61ca1e30412416661e2fd464821c80" +dependencies = [ + "icu_provider_baked", ] [[package]] @@ -1797,9 +1866,9 @@ dependencies = [ "displaydoc", "litemap", "serde", - "tinystr", - "writeable", - "zerovec", + "tinystr 0.7.6", + "writeable 0.5.5", + "zerovec 0.10.4", ] [[package]] @@ -1812,10 +1881,10 @@ dependencies = [ "displaydoc", "icu_locid", "icu_locid_transform_data", - "icu_provider", + "icu_provider 1.5.0", "serde", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] @@ -1832,16 +1901,16 @@ checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ "databake", "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_normalizer_data", "icu_properties", - "icu_provider", + "icu_provider 1.5.0", "serde", "smallvec", "utf16_iter", "utf8_iter", "write16", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1860,7 +1929,7 @@ dependencies = [ "displaydoc", "either", "serde", - "writeable", + "writeable 0.5.5", "yoke", "zerofrom", ] @@ -1874,9 +1943,9 @@ dependencies = [ "databake", "displaydoc", "fixed_decimal", - "icu_provider", + "icu_provider 1.5.0", "serde", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1887,13 +1956,13 @@ checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ "databake", "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_locid_transform", "icu_properties_data", - "icu_provider", + "icu_provider 1.5.0", "serde", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", ] [[package]] @@ -1912,16 +1981,33 @@ dependencies = [ "displaydoc", "erased-serde", "icu_locid", - "icu_provider_macros", + "icu_provider_macros 1.5.0", "log", "postcard", "serde", "stable_deref_trait", - "tinystr", - "writeable", + "tinystr 0.7.6", + "writeable 0.5.5", "yoke", "zerofrom", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "201d2b3bc0bd9a7ad78a00af62374365dd53ee6916942c645cd9e28778c238a5" +dependencies = [ + "displaydoc", + "icu_locale_core", + "icu_provider_macros 2.0.0-beta1", + "stable_deref_trait", + "tinystr 0.8.0", + "writeable 0.6.0", + "yoke", + "zerofrom", + "zerovec 0.11.0", ] [[package]] @@ -1932,10 +2018,21 @@ checksum = "d6324dfd08348a8e0374a447ebd334044d766b1839bb8d5ccf2482a99a77c0bc" dependencies = [ "icu_locid", "icu_locid_transform", - "icu_provider", + "icu_provider 1.5.0", "serde", - "tinystr", - "zerovec", + "tinystr 0.7.6", + "zerovec 0.10.4", +] + +[[package]] +name = "icu_provider_baked" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c6494d25b75593ad56dcd9bde1040ef7e22e9c70b24c1de8920d9a919118893" +dependencies = [ + "icu_provider 2.0.0-beta1", + "writeable 0.6.0", + "zerotrie 0.2.0", ] [[package]] @@ -1944,13 +2041,13 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c24b98d1365f55d78186c205817631a4acf08d7a45bdf5dc9dcf9c5d54dccf51" dependencies = [ - "icu_provider", + "icu_provider 1.5.0", "log", "postcard", "serde", - "writeable", - "zerotrie", - "zerovec", + "writeable 0.5.5", + "zerotrie 0.1.3", + "zerovec 0.10.4", ] [[package]] @@ -1964,6 +2061,17 @@ dependencies = [ "syn", ] +[[package]] +name = "icu_provider_macros" +version = "2.0.0-beta1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba0c1a4c9cca68c00053013b9ad7dc7d2e69aefed59dd9e38cb63347c28299b0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "icu_segmenter" version = "1.5.0" @@ -1973,12 +2081,12 @@ dependencies = [ "core_maths", "databake", "displaydoc", - "icu_collections", + "icu_collections 1.5.0", "icu_locid", - "icu_provider", + "icu_provider 1.5.0", "serde", "utf8_iter", - "zerovec", + "zerovec 0.10.4", ] [[package]] @@ -1989,12 +2097,12 @@ checksum = "aa91ba6a585939a020c787235daa8aee856d9bceebd6355e283c0c310bc6de96" dependencies = [ "databake", "displaydoc", - "icu_calendar", - "icu_provider", + "icu_calendar 1.5.2", + "icu_provider 1.5.0", "serde", - "tinystr", - "zerotrie", - "zerovec", + "tinystr 0.7.6", + "zerotrie 0.1.3", + "zerovec 0.10.4", ] [[package]] @@ -2134,11 +2242,12 @@ checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "ixdtf" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2123305f927452a9502fc05c33800280d90127c95c50eb45ec6b3c50346afbf3" +checksum = "fb6cd1080e64f68b07c577e3c687f4a894b3d1bd6093cb36b55c7bd07675aa3a" dependencies = [ "displaydoc", + "utf8_iter", ] [[package]] @@ -2730,6 +2839,16 @@ dependencies = [ "serde", ] +[[package]] +name = "potential_utf" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2a1d6d1132e166768a82805efecd7c326eb8dc70ad4a586da697836b44eb970" +dependencies = [ + "serde", + "zerovec 0.11.0", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3348,17 +3467,17 @@ checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" [[package]] name = "temporal_rs" version = "0.0.4" -source = "git+https://github.com/boa-dev/temporal.git?rev=016bc31d2ce5484973b71ccdb0faeb33c00a9ae6#016bc31d2ce5484973b71ccdb0faeb33c00a9ae6" +source = "git+https://github.com/boa-dev/temporal.git?rev=c25c4475810b7549febb7a5fe4404f17581e8010#c25c4475810b7549febb7a5fe4404f17581e8010" dependencies = [ "bitflags 2.6.0", "combine", "iana-time-zone", - "icu_calendar", + "icu_calendar 2.0.0-beta1", "ixdtf", "jiff-tzdb", "num-traits", "rustc-hash 2.1.0", - "tinystr", + "tinystr 0.8.0", "tzif", "web-time", ] @@ -3501,7 +3620,17 @@ dependencies = [ "databake", "displaydoc", "serde", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "tinystr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b56a820bb70060f096338fcc02edb78cb3f8fb21c5078503f48588cfcaf494" +dependencies = [ + "displaydoc", + "zerovec 0.11.0", ] [[package]] @@ -3649,9 +3778,9 @@ dependencies = [ [[package]] name = "tzif" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b8eb18929606c6f3eea7ef096a91dd5c26dbbde2a20a343c4a409b851666fd" +checksum = "5cecffbab91858408738280e7bb6aac788f59a522dda961cd6b15542f0c08559" dependencies = [ "combine", ] @@ -4158,6 +4287,12 @@ dependencies = [ "either", ] +[[package]] +name = "writeable" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b3b5b7c6114bf7253093603034e102d479ecc8501deca33b6c1c816418b6d2" + [[package]] name = "yoke" version = "0.7.5" @@ -4242,7 +4377,16 @@ dependencies = [ "serde", "yoke", "zerofrom", - "zerovec", + "zerovec 0.10.4", +] + +[[package]] +name = "zerotrie" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa766b97d68da210d29cc0bc8d072d87de9359cb998e4bc30ab4982a1c795d47" +dependencies = [ + "displaydoc", ] [[package]] @@ -4255,7 +4399,18 @@ dependencies = [ "serde", "yoke", "zerofrom", - "zerovec-derive", + "zerovec-derive 0.10.3", +] + +[[package]] +name = "zerovec" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b622856b789971a6fe0442b69f3a2d7ac949005c4c8586b2c4ef09cc5182f2b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive 0.11.0", ] [[package]] @@ -4269,6 +4424,17 @@ dependencies = [ "syn", ] +[[package]] +name = "zerovec-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "996c67268f00e216986ac140d8de9f47968c330b96aeefcae9ed296f23934448" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zip" version = "0.6.6" diff --git a/Cargo.toml b/Cargo.toml index 501abf7ef34..2a878c2f5f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,7 +112,7 @@ intrusive-collections = "0.9.7" cfg-if = "1.0.0" either = "1.13.0" sys-locale = "0.3.2" -temporal_rs = { git = "https://github.com/boa-dev/temporal.git", rev = "016bc31d2ce5484973b71ccdb0faeb33c00a9ae6", features = ["tzdb", "now"] } +temporal_rs = { git = "https://github.com/boa-dev/temporal.git", rev = "c25c4475810b7549febb7a5fe4404f17581e8010", features = ["tzdb", "now"] } web-time = "1.1.0" criterion = "0.5.1" float-cmp = "0.10.0" diff --git a/core/engine/src/builtins/temporal/instant/mod.rs b/core/engine/src/builtins/temporal/instant/mod.rs index 1103adc5d5a..4014c5d7882 100644 --- a/core/engine/src/builtins/temporal/instant/mod.rs +++ b/core/engine/src/builtins/temporal/instant/mod.rs @@ -31,7 +31,7 @@ use temporal_rs::{ use super::options::get_difference_settings; /// The `Temporal.Instant` object. -#[derive(Debug, Clone, Trace, Finalize, JsData)] +#[derive(Debug, Clone, Copy, Trace, Finalize, JsData)] // SAFETY: Instant does not contain any traceable values. #[boa_gc(unsafe_empty_trace)] pub struct Instant { diff --git a/core/engine/src/builtins/temporal/plain_date/mod.rs b/core/engine/src/builtins/temporal/plain_date/mod.rs index 87c790cb838..66faf79fba5 100644 --- a/core/engine/src/builtins/temporal/plain_date/mod.rs +++ b/core/engine/src/builtins/temporal/plain_date/mod.rs @@ -917,7 +917,7 @@ pub(crate) fn to_partial_date_record( .into())); }; Some( - TinyAsciiStr::<4>::from_str(&month_code.to_std_string_escaped()) + TinyAsciiStr::<4>::try_from_str(&month_code.to_std_string_escaped()) .map_err(|e| JsError::from(JsNativeError::typ().with_message(e.to_string()))), ) }) @@ -947,7 +947,7 @@ pub(crate) fn to_partial_date_record( }; // TODO: double check if an invalid monthCode is a range or type error. Some( - TinyAsciiStr::<19>::from_str(&era.to_std_string_escaped()) + TinyAsciiStr::<19>::try_from_str(&era.to_std_string_escaped()) .map_err(|e| JsError::from(JsNativeError::range().with_message(e.to_string()))), ) })