Skip to content

Commit 3f0cd52

Browse files
committed
feat: pantry config
1 parent 83d197f commit 3f0cd52

File tree

9 files changed

+1437
-35
lines changed

9 files changed

+1437
-35
lines changed

CHANGELOG.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
## Unreleased - ReleaseDate
44

5-
## 0.16.3 - 2025/08/11
5+
## 0.17.0
6+
- Softens YAML frontmatter parsing by @dubadub in https://github.com/cooklang/cooklang-rs/pull/57
7+
- Adds pantry config
68

7-
- Remove generics from `Recipe`. Now recipes are scalable multiple times.
8-
- Remove `Recipe::default_scale`.
9-
- Scaling is now infallible, text values are ignored. Removed `ScaleOutcome`, if
10-
this functionality was needed, it can easily be replaced by checking if the
11-
quatity is text or not scalable.
9+
## 0.16.6 - 2025/08/11
10+
11+
- (breaking) Remove generics from `Recipe`. Now recipes are scalable multiple times.
12+
- (breaking) Remove `Recipe::default_scale`.
13+
- (breaking) Scaling is now infallible, text values are ignored. Removed
14+
`ScaleOutcome`, if this functionality was needed, it can easily
15+
be replaced by checking if the quatity is text or not scalable.
1216
- Cookware now can have full quantities with units, not just values.
1317
- Servings value in metadata now isn't a vector
1418

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cooklang"
3-
version = "0.16.6"
3+
version = "0.17.0"
44
edition = "2021"
55
authors = ["Zheoni <zheoni@outlook.es>"]
66
description = "Cooklang parser with opt-in extensions"
@@ -26,6 +26,7 @@ smallvec = { version = "1" }
2626
unicase = "2.7.0"
2727
yansi = "1.0.1"
2828
serde_yaml = "0.9.34"
29+
toml = { version = "0.8", optional = true }
2930
tsify = { version = "0.5", optional = true }
3031
wasm-bindgen = { version = "0.2", optional = true }
3132

@@ -47,6 +48,7 @@ proc-macro2 = { version = "1", optional = true }
4748
default = ["aisle", "bundled_units"]
4849
bundled_units = ["toml", "prettyplease", "quote", "syn", "proc-macro2"]
4950
aisle = []
51+
pantry = ["toml"]
5052
ts = ["wasm-bindgen", "tsify"]
5153

5254
[[bench]]

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ var package = Package(
2525
path: "swift/Tests/CooklangParserTests"),
2626
.binaryTarget(
2727
name: "CooklangParserFFI",
28-
url: "https://github.com/cooklang/cooklang-rs/releases/download/v0.16.4/CooklangParserFFI.xcframework.zip",
29-
checksum: "5475d5b25c90e8c97c143fd6aa96a5f3b26e2fd1f919a696442c6d4ba87f57ae"),
28+
url: "https://github.com/cooklang/cooklang-rs/releases/download/v0.17.0/CooklangParserFFI.xcframework.zip",
29+
checksum: "5e27a10329c189fd3305a1fe78fb562894e4993a15af954793416161ff5919cd"),
3030
]
3131
)
3232

bindings/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cooklang-bindings"
3-
version = "0.16.6"
3+
version = "0.17.0"
44
edition = "2021"
55
authors = ["dubadub <dubovskoy.a@gmail.com>"]
66
description = "Cooklang Uniffi bindings"

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,22 @@ pub mod _extensions {
5656

5757
#[cfg(doc)]
5858
pub mod _features {
59-
//! This lib has 2 features, both enabled by default:
59+
//! This lib has 3 features, 2 enabled by default:
6060
//! - `bundled_units`. Includes a units file with the most common units for
6161
//! recipes in English. These units are available to load when you want
6262
//! without the need to read a file. The default
6363
//! [`Converter`](crate::convert::Converter) use them if this feature is
6464
//! enabled. [This is the bundled file](https://github.com/cooklang/cooklang-rs/blob/main/units.toml)
6565
//!
6666
//! - `aisle`. Enables the [`aisle`](crate::aisle) module.
67+
//!
68+
//! - `pantry`. Enables the [`pantry`](crate::pantry) module.
6769
}
6870

6971
#[cfg(feature = "aisle")]
7072
pub mod aisle;
73+
#[cfg(feature = "pantry")]
74+
pub mod pantry;
7175
pub mod analysis;
7276
pub mod ast;
7377
pub mod convert;

0 commit comments

Comments
 (0)