From 79e98c30b0c14da4b4bcea8f90134aa77622cc3b Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Wed, 21 May 2025 23:31:54 +0300 Subject: [PATCH 1/6] chore(fluent-syntax): Fix typos in fixtures (also fixed upstream) --- fluent-syntax/tests/fixtures/call_expressions.ftl | 4 ++-- fluent-syntax/tests/fixtures/call_expressions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fluent-syntax/tests/fixtures/call_expressions.ftl b/fluent-syntax/tests/fixtures/call_expressions.ftl index 77c2188a..03f3a613 100644 --- a/fluent-syntax/tests/fixtures/call_expressions.ftl +++ b/fluent-syntax/tests/fixtures/call_expressions.ftl @@ -80,11 +80,11 @@ unindented-closing-paren = {FUN( one-argument = {FUN(1,)} many-arguments = {FUN(1, 2, 3,)} inline-sparse-args = {FUN( 1, 2, 3, )} -mulitline-args = {FUN( +multiline-args = {FUN( 1, 2, )} -mulitline-sparse-args = {FUN( +multiline-sparse-args = {FUN( 1 , diff --git a/fluent-syntax/tests/fixtures/call_expressions.json b/fluent-syntax/tests/fixtures/call_expressions.json index 62671172..1e85992e 100644 --- a/fluent-syntax/tests/fixtures/call_expressions.json +++ b/fluent-syntax/tests/fixtures/call_expressions.json @@ -1022,7 +1022,7 @@ "type": "Message", "id": { "type": "Identifier", - "name": "mulitline-args" + "name": "multiline-args" }, "value": { "type": "Pattern", @@ -1060,7 +1060,7 @@ "type": "Message", "id": { "type": "Identifier", - "name": "mulitline-sparse-args" + "name": "multiline-sparse-args" }, "value": { "type": "Pattern", From 66f7ea4ae72f56020326cffc7988e42ad3f473cf Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 22 May 2025 14:59:00 +0300 Subject: [PATCH 2/6] deps: Specify tested minor version of rustc-hash dependency --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 677ceed5..7452dc7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ futures = "0.3" iai = "0.1" intl_pluralrules = "7.0" once_cell = "1.21" -rustc-hash = "2" +rustc-hash = "2.1" serde = "1.0" serde_json = "1.0" thiserror = "2.0" From 6cc3699d9eb26814715aa77704fa89492fdbd7f1 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 22 May 2025 16:04:04 +0300 Subject: [PATCH 3/6] chore: Setup cargo-deny --- deny.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 deny.toml diff --git a/deny.toml b/deny.toml new file mode 100644 index 00000000..15b6de22 --- /dev/null +++ b/deny.toml @@ -0,0 +1,7 @@ +[graph] +all-features = true +exclude-dev = true + +# Not exhaustive, just whitelist the current dependency tree +[licenses] +allow = ["Apache-2.0", "MIT", "Unicode-3.0"] From 08c46e2915e5df771e08b24ab91b253ab7e9ace2 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 22 May 2025 16:10:57 +0300 Subject: [PATCH 4/6] chore: Normalize TOML formatting with `taplo` --- Cargo.toml | 8 +++----- fluent-cli/Cargo.toml | 2 +- fluent-pseudo/Cargo.toml | 2 +- fluent-syntax/Cargo.toml | 2 +- fluent-testing/Cargo.toml | 9 +++++++-- fluent/Cargo.toml | 2 +- intl-memoizer/Cargo.toml | 2 +- 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7452dc7e..05f35296 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,7 @@ members = [ "intl-memoizer", ] -exclude = [ - "fluent-cli", -] +exclude = ["fluent-cli"] [workspace.package] homepage = "https://www.projectfluent.org" @@ -57,8 +55,8 @@ extend-ignore-re = [ ] [workspace.metadata.typos.default.extend-words] -travelled = "travelled" # sadly part of a public API and fixing would be a breaking change -nd = "nd" # appears frequently in inline test messages +travelled = "travelled" # sadly part of a public API and fixing would be a breaking change +nd = "nd" # appears frequently in inline test messages [workspace.metadata.typos.files] ignore-hidden = false diff --git a/fluent-cli/Cargo.toml b/fluent-cli/Cargo.toml index 1201fe68..c807c6eb 100644 --- a/fluent-cli/Cargo.toml +++ b/fluent-cli/Cargo.toml @@ -26,7 +26,7 @@ path = "src/main.rs" [dependencies] fluent-bundle.workspace = true fluent-syntax.workspace = true -serde = { workspace = true, features = ["derive"]} +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true annotate-snippets = { version = "0.6", features = ["color"] } clap = "2.33" diff --git a/fluent-pseudo/Cargo.toml b/fluent-pseudo/Cargo.toml index 9ed8e479..e06e5699 100644 --- a/fluent-pseudo/Cargo.toml +++ b/fluent-pseudo/Cargo.toml @@ -20,7 +20,7 @@ include = [ "Cargo.toml", "README.md", "LICENSE-APACHE", - "LICENSE-MIT" + "LICENSE-MIT", ] [dependencies] diff --git a/fluent-syntax/Cargo.toml b/fluent-syntax/Cargo.toml index b8cf539a..72f74eb4 100644 --- a/fluent-syntax/Cargo.toml +++ b/fluent-syntax/Cargo.toml @@ -20,7 +20,7 @@ include = [ "Cargo.toml", "README.md", "LICENSE-APACHE", - "LICENSE-MIT" + "LICENSE-MIT", ] [dependencies] diff --git a/fluent-testing/Cargo.toml b/fluent-testing/Cargo.toml index d5b7f9ac..261c21b9 100644 --- a/fluent-testing/Cargo.toml +++ b/fluent-testing/Cargo.toml @@ -20,13 +20,18 @@ include = [ "Cargo.toml", "README.md", "LICENSE-APACHE", - "LICENSE-MIT" + "LICENSE-MIT", ] [dependencies] fluent-bundle.workspace = true fluent-fallback.workspace = true -tokio = { workspace = true, optional = true, features = ["fs", "rt-multi-thread", "macros", "io-util"] } +tokio = { workspace = true, optional = true, features = [ + "fs", + "rt-multi-thread", + "macros", + "io-util", +] } [features] default = ["sync"] diff --git a/fluent/Cargo.toml b/fluent/Cargo.toml index e619da1e..460f483f 100644 --- a/fluent/Cargo.toml +++ b/fluent/Cargo.toml @@ -20,7 +20,7 @@ include = [ "Cargo.toml", "README.md", "LICENSE-APACHE", - "LICENSE-MIT" + "LICENSE-MIT", ] [dependencies] diff --git a/intl-memoizer/Cargo.toml b/intl-memoizer/Cargo.toml index a96930cb..69ee7eec 100644 --- a/intl-memoizer/Cargo.toml +++ b/intl-memoizer/Cargo.toml @@ -20,7 +20,7 @@ include = [ "Cargo.toml", "README.md", "LICENSE-APACHE", - "LICENSE-MIT" + "LICENSE-MIT", ] [dependencies] From 56218c71c9eeeefa2462ff65f821711f294c00e8 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 22 May 2025 16:10:57 +0300 Subject: [PATCH 5/6] =?UTF-8?q?chore:=20Correct=20typo,=20travelled?= =?UTF-8?q?=E2=86=92traveled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 3 +-- fluent-bundle/src/resolver/scope.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 05f35296..51b4daf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,8 +55,7 @@ extend-ignore-re = [ ] [workspace.metadata.typos.default.extend-words] -travelled = "travelled" # sadly part of a public API and fixing would be a breaking change -nd = "nd" # appears frequently in inline test messages +nd = "nd" # appears frequently in inline test messages [workspace.metadata.typos.files] ignore-hidden = false diff --git a/fluent-bundle/src/resolver/scope.rs b/fluent-bundle/src/resolver/scope.rs index 1ddff1a4..7ac983a9 100644 --- a/fluent-bundle/src/resolver/scope.rs +++ b/fluent-bundle/src/resolver/scope.rs @@ -19,7 +19,7 @@ pub struct Scope<'bundle, 'ast, 'args, 'errors, R, M> { /// Laughs and Quadratic Blowup attacks. pub(super) placeables: u8, /// Tracks hashes to prevent infinite recursion. - travelled: smallvec::SmallVec<[&'ast ast::Pattern<&'bundle str>; 2]>, + traveled: smallvec::SmallVec<[&'ast ast::Pattern<&'bundle str>; 2]>, /// Track errors accumulated during resolving. pub errors: Option<&'errors mut Vec>, /// Makes the resolver bail. @@ -37,7 +37,7 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R args, local_args: None, placeables: 0, - travelled: Default::default(), + traveled: Default::default(), errors, dirty: false, } @@ -65,8 +65,8 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R W: fmt::Write, M: MemoizerKind, { - if self.travelled.is_empty() { - self.travelled.push(pattern); + if self.traveled.is_empty() { + self.traveled.push(pattern); } exp.write(w, self)?; if self.dirty { @@ -89,15 +89,15 @@ impl<'bundle, 'ast, 'args, 'errors, R, M> Scope<'bundle, 'ast, 'args, 'errors, R W: fmt::Write, M: MemoizerKind, { - if self.travelled.contains(&pattern) { + if self.traveled.contains(&pattern) { self.add_error(ResolverError::Cyclic); w.write_char('{')?; exp.write_error(w)?; w.write_char('}') } else { - self.travelled.push(pattern); + self.traveled.push(pattern); let result = pattern.write(w, self); - self.travelled.pop(); + self.traveled.pop(); result } } From 7a350969688e654ebc7f5178d29571822089a44a Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Tue, 20 May 2025 16:44:26 +0300 Subject: [PATCH 6/6] chore: Bump versions across workspace --- Cargo.toml | 10 +++++----- fluent-bundle/CHANGELOG.md | 2 ++ fluent-bundle/Cargo.toml | 2 +- fluent-fallback/CHANGELOG.md | 2 ++ fluent-fallback/Cargo.toml | 2 +- fluent-pseudo/CHANGELOG.md | 2 ++ fluent-pseudo/Cargo.toml | 2 +- fluent-resmgr/CHANGELOG.md | 2 ++ fluent-resmgr/Cargo.toml | 2 +- fluent-syntax/CHANGELOG.md | 2 ++ fluent-syntax/Cargo.toml | 2 +- fluent-testing/CHANGELOG.md | 2 ++ fluent-testing/Cargo.toml | 2 +- fluent/CHANGELOG.md | 2 ++ fluent/Cargo.toml | 2 +- intl-memoizer/CHANGELOG.md | 2 ++ intl-memoizer/Cargo.toml | 2 +- 17 files changed, 29 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 51b4daf4..25c8bbfb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ thiserror = "2.0" tokio = "1.38" unic-langid = "0.9" -fluent-bundle = { version = "0.15.3", path = "fluent-bundle" } -fluent-fallback = { version = "0.7.1", path = "fluent-fallback" } -fluent-pseudo = { version = "0.3.2", path = "fluent-pseudo" } -fluent-syntax = { version = "0.11.1", path = "fluent-syntax" } -intl-memoizer = { version = "0.5.2", path = "intl-memoizer" } +fluent-bundle = { version = "0.16.0", path = "fluent-bundle" } +fluent-fallback = { version = "0.7.2", path = "fluent-fallback" } +fluent-pseudo = { version = "0.3.3", path = "fluent-pseudo" } +fluent-syntax = { version = "0.12.0", path = "fluent-syntax" } +intl-memoizer = { version = "0.5.3", path = "intl-memoizer" } [workspace.metadata.typos.default] locale = "en-us" diff --git a/fluent-bundle/CHANGELOG.md b/fluent-bundle/CHANGELOG.md index 4e25f1cc..82b83196 100644 --- a/fluent-bundle/CHANGELOG.md +++ b/fluent-bundle/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-bundle 0.16.0 (May 20, 2025) - Implement NUMBER builtin - Improve examples - Refactor to remove unnecessary named lifetimes diff --git a/fluent-bundle/Cargo.toml b/fluent-bundle/Cargo.toml index 75fcaef5..6687fc90 100644 --- a/fluent-bundle/Cargo.toml +++ b/fluent-bundle/Cargo.toml @@ -4,7 +4,7 @@ description = """ A low-level implementation of a collection of localization messages for a single locale for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.15.3" +version = "0.16.0" edition.workspace = true rust-version.workspace = true homepage.workspace = true diff --git a/fluent-fallback/CHANGELOG.md b/fluent-fallback/CHANGELOG.md index cc567fb8..92a2892a 100644 --- a/fluent-fallback/CHANGELOG.md +++ b/fluent-fallback/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-fallback 0.7.2 (May 20, 2025) - Refactor to remove unnecessary named lifetimes - Cleanup docs - Satiate Clippy diff --git a/fluent-fallback/Cargo.toml b/fluent-fallback/Cargo.toml index fc60c0f7..feec3aa6 100644 --- a/fluent-fallback/Cargo.toml +++ b/fluent-fallback/Cargo.toml @@ -4,7 +4,7 @@ description = """ A high-level implementation of a collection of locale bundles including fallback between locales for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.7.1" +version = "0.7.2" edition.workspace = true rust-version.workspace = true homepage.workspace = true diff --git a/fluent-pseudo/CHANGELOG.md b/fluent-pseudo/CHANGELOG.md index 97a05677..7556a2e9 100644 --- a/fluent-pseudo/CHANGELOG.md +++ b/fluent-pseudo/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-pseudo 0.3.3 (May 20, 2025) - Eliminate unsafe block using `once_cell` instead of undefined behavior of mutable reference to mutable static - Cleanup docs - Satiate Clippy diff --git a/fluent-pseudo/Cargo.toml b/fluent-pseudo/Cargo.toml index e06e5699..8309e13b 100644 --- a/fluent-pseudo/Cargo.toml +++ b/fluent-pseudo/Cargo.toml @@ -4,7 +4,7 @@ description = """ A pseudolocalization and transformation API for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.3.2" +version = "0.3.3" edition.workspace = true rust-version = "1.65.0" homepage.workspace = true diff --git a/fluent-resmgr/CHANGELOG.md b/fluent-resmgr/CHANGELOG.md index 32b3dc2f..4d0de534 100644 --- a/fluent-resmgr/CHANGELOG.md +++ b/fluent-resmgr/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-resmgr 0.0.8 (May 20, 2025) - Cleanup docs - Satiate Clippy - Bump `elsa` to 1.10 diff --git a/fluent-resmgr/Cargo.toml b/fluent-resmgr/Cargo.toml index 8d679c75..a594ae7c 100644 --- a/fluent-resmgr/Cargo.toml +++ b/fluent-resmgr/Cargo.toml @@ -4,7 +4,7 @@ description = """ A standalone solution for managing resource files and returning locale bundles for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.0.7" +version = "0.0.8" edition.workspace = true rust-version.workspace = true homepage.workspace = true diff --git a/fluent-syntax/CHANGELOG.md b/fluent-syntax/CHANGELOG.md index 435fb448..8aa0bc75 100644 --- a/fluent-syntax/CHANGELOG.md +++ b/fluent-syntax/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-syntax 0.12.0 (May 20, 2025) - Add module `serializer` - De-ambiguate dependencies vs. features - Cleanup docs diff --git a/fluent-syntax/Cargo.toml b/fluent-syntax/Cargo.toml index 72f74eb4..8c41e101 100644 --- a/fluent-syntax/Cargo.toml +++ b/fluent-syntax/Cargo.toml @@ -4,7 +4,7 @@ description = """ A low-level parser, AST, and serializer API for the syntax used by Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.11.1" +version = "0.12.0" edition.workspace = true rust-version = "1.64.0" homepage.workspace = true diff --git a/fluent-testing/CHANGELOG.md b/fluent-testing/CHANGELOG.md index d4ed5788..09e259ac 100644 --- a/fluent-testing/CHANGELOG.md +++ b/fluent-testing/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent-testing 0.0.5 (May 20, 2025) - Cleanup docs ## fluent-testing 0.0.4 (March 16, 2024) diff --git a/fluent-testing/Cargo.toml b/fluent-testing/Cargo.toml index 261c21b9..b5d2f2bc 100644 --- a/fluent-testing/Cargo.toml +++ b/fluent-testing/Cargo.toml @@ -4,7 +4,7 @@ description = """ A collection of mock scenarios for testing components of Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.0.4" +version = "0.0.5" edition.workspace = true rust-version.workspace = true homepage.workspace = true diff --git a/fluent/CHANGELOG.md b/fluent/CHANGELOG.md index 02eb36bd..ed0958b0 100644 --- a/fluent/CHANGELOG.md +++ b/fluent/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## fluent 0.16.2 (May 20, 2025) - Cleanup docs ## fluent 0.16.1 (March 16, 2024) diff --git a/fluent/Cargo.toml b/fluent/Cargo.toml index 460f483f..7ee744c6 100644 --- a/fluent/Cargo.toml +++ b/fluent/Cargo.toml @@ -4,7 +4,7 @@ description = """ An umbrella crate exposing the combined features of fluent-rs crates with additional convenience macros for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.16.1" +version = "0.16.2" edition.workspace = true rust-version.workspace = true homepage.workspace = true diff --git a/intl-memoizer/CHANGELOG.md b/intl-memoizer/CHANGELOG.md index 3314a61e..13bd70ce 100644 --- a/intl-memoizer/CHANGELOG.md +++ b/intl-memoizer/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## Unreleased + +## intl-memoizer 0.5.3 (May 20, 2025) - Cleanup docs ## intl-memoizer 0.5.2 (March 16, 2024) diff --git a/intl-memoizer/Cargo.toml b/intl-memoizer/Cargo.toml index 69ee7eec..fdaf68b6 100644 --- a/intl-memoizer/Cargo.toml +++ b/intl-memoizer/Cargo.toml @@ -4,7 +4,7 @@ description = """ A memoizer specifically tailored for storing lazy-initialized intl formatters for Project Fluent, a localization system designed to unleash the entire expressive power of natural language translations. """ -version = "0.5.2" +version = "0.5.3" edition.workspace = true rust-version.workspace = true homepage.workspace = true