Releases: tmlmt/cooklang-parser
Releases · tmlmt/cooklang-parser
v3.0.0-alpha.15
⚠️ Breaking Changes
- New type structure for shopping list ingredients (AddedIngredient), aligned with that of recipe ingredients (Ingredient)
🚀 Enhancements
- Add pantry inventory management with recipe integration (#98)
🩹 Fixes
- flattenPlainUnitGroup: Do not mix standalone quantities and quantities from OR group (#101)
💅 Refactors
- shoppingList:
⚠️ Harmonize ingredients quantities between Ingredient and AddedIngredient (#99)
🏡 Chore
- alternatives: Remove useless variable expansion (#100)
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.14
🚀 Enhancements
- metadata: Support yaml block scalar values for 'introduction' and 'description' (8b12e60)
- parser: Support for selected markdown elements in notes and steps (9d3fe4f)
🩹 Fixes
- playground: Update renderer after flattening of IngredientItem's itemQuantity (0ac3f53)
🏡 Chore
- index: Add missing exports (063afa3)
- playground: Add a multiline description field in the example recipe for demo purposes (1ff847f)
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.13
⚠️ Breaking Changes
- Metadata interface restructured.
Source attribution:
- metadata["source.name"] → metadata.source?.name (when source is object)
- metadata["source.url"] → metadata.source?.url (when source is object)
- metadata["source.author"] → metadata.source?.author (when source is object)
Simple string source remains: metadata.source (when string)
Time information:
- metadata["prep time"] / metadata["time.prep"] → metadata.time?.prep
- metadata["cook time"] / metadata["time.cook"] → metadata.time?.cook
- ShoppingList public API renamed to camelCase.
Migrate by updating method calls:
.add_recipe() → .addRecipe()
.remove_recipe() → .removeRecipe()
.set_category_config() → .setCategoryConfig()
.category_config → .categoryConfig
🚀 Enhancements
- Allow custom metadata fields (bd40101)
🩹 Fixes
- convertTo: Keep old primary quantity when an equivalent was used to convert, in 'replace' mode (c1be26e)
💅 Refactors
⚠️ Harmonize method naming to camelCase (327a2c2)⚠️ Restructure Metadata interface with nested source and time objects (1b239e7)
🏡 Chore
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.12
⚠️ Breaking Changes
The IngredientAlternative type (cf IngredientItem.alternatives: IngredientAlternative[]) no longer has an
itemQuantity property. The quantity, unit, scalable, and equivalents
fields are now directly on the IngredientAlternative object.
Before:
- alternative.itemQuantity?.quantity
- alternative.itemQuantity?.unit
- alternative.itemQuantity?.scalable
- alternative.itemQuantity?.equivalents
After:
- alternative.quantity
- alternative.unit
- alternative.scalable
- alternative.equivalents
When an alternative has no quantity, these fields are undefined/absent
rather than itemQuantity being undefined.
💅 Refactors
- types:
⚠️ Flatten IngredientItemQuantity into IngredientAlternative (2ff869d)
📖 Documentation
- reference-units: Correct values in units configuration table (55c2914)
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.11
⚠️ Breaking Changes
- units:
⚠️ When added or scaled, the best unit is found and applied to the all resulting quantities, potentially taking into account a user-defined unit system in the recipe frontmatter. Previously, the original unit was maintained or compatible units where possibly merging into metric units.
🚀 Enhancements
- Enhance handling of unit systems and cover metric, UK, US and JP units (487cdcd)
- units:
⚠️ Improve unit system and quantity additions (#95) - Full-recipe unit conversion (#97)
🏡 Chore
- vitest: Do not run coverage by default (fcd2302)
- gitignore: Ignore copilot instructions file (8d73c9e)
- package: Update test:ui script to include coverage (333c902)
- playground: Remove passing of invalid prop in IngredientItem (#96)
- docs: Move eslint-disable-next-line to the new right place (288c1e9)
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.9
⚠️ Breaking Changes
- types:
⚠️ Flatten And & Or groups by directly using and/or as property name (ec80478)
Before:
{
type: "or", // or "and"
entries: [ ... ]
}
After:
{
or: [ ... ] // or and: [ ... ]
}
🚀 Enhancements
- Recipe: New universal
getIngredientQuantitiesmethod to filter by section, step and/or user choices (04e61f6) - ShoppingList: Enhance ingredient handling with AND groups and ensure choices are provided for recipes with alternatives (f5ef123)
- Helpers: Add isAlternativeSelected function to determine selected ingredient alternatives (2c5af2a)
📖 Documentation
- Recipe: Fix description of
choicesproperty (b9169ac) - playground: Dynamically render user choices for alternatives ingredients (2eea3c0)
🎨 Styles
- types:
⚠️ Flatten And & Or groups by directly using and/or as property name (ec80478)
❤️ Contributors
- Thomas Lamant (@tmlmt)
v3.0.0-alpha.10
🚀 Enhancements
-
Add multiple type-guard and render helper functions (05584f5)
List of functions introduced:
- isAlternativeSelected
- isGroupedItem
- formatNumericValue
- formatSingleValue
- formatQuantity
- formatUnit
- formatQuantityWithUnit
- formatExtendedQuantity
- formatItemQuantity
- isAndGroup
- isSimpleGroup
- hasAlternatives
🩹 Fixes
- isAlternativeSelected: Return true for first alternative when selected index is 0 (4e9b1dd)
- docs, v3: Link to playground in top menubar (361a676)
🏡 Chore
- CHANGELOG: Fix missing end of code block (00f27b3)
🎨 Styles
- types: Remove unnecessary ComputedIngredient type (f35f2f0)
- types: Make IngredientQuantityAndGroup extend AndGroup (6647039)
❤️ Contributors
- Thomas Lamant (@tmlmt)