All checks were successful
CI / Build, Test & Publish (pull_request) Successful in 3m13s
4.2 KiB
4.2 KiB
| @gram-lang/kitchen |
|---|
| minor |
Kitchen: Recipes now know when each part of the mise en place should happen:
- Each section reports how long its own preparation takes (new
miseEnPlacefield) - A recipe carries its list of tasks and what each one waits for (new
tasksfield), and a default timeline laid out from it (newschedulefield): the preparation right before each section, the shortest rests - Any other timeline comes from the same list, without compiling again: all the preparation at the start (
upfront), or the preparation of each working day gathered at the start of that day (perSession, for recipes over several days), with the shortest, middle or longest of every rest written as a range (newlayout(), from@gram-lang/scheduler) - A timer is exact:
~_{12h}lasts exactly 12 hours. A rest written as a range (~_{12-24h}) is planned on its shortest figure unless you pick another; an active timer written as a range (~{20-25min}) is always planned on its longest, so dinner is never late - Only an anchor in days (
~{-1d},~{-2d}) opens a working day; an anchor in hours (~{-18h},~{-36h}) is a deadline inside the day the section falls on. A section without an anchor takes the day of the furthest anchor in days after it, and a recipe with no anchor in days is a single session, likeupfront - A new
SESSION_OVERFLOWwarning flags a working day pushed before its 24 hours by a long rest, and suggests anchoring the section further back - Every timeline lists its working days in a new
sessionsfield, and a preparation planned later than the rest of its section's (an intermediate made the same day) is flaggeddeferred - A section without any step carries no preparation time (its share moves to the first section that has steps), so a recipe with no step at all now has a preparation time of 0
- An intermediate (
&dough) is gathered in the section that uses it, whether it is declared on the section title or at the end of a step - An ingredient, a piece of cookware and an alternative (
a|b) that share a name are no longer mixed up when splitting the preparation by section - New
computeMiseEnPlace(sections, registry)gives the same split as themiseEnPlacefield for sections you built yourself, andcalculatePreparationTimecan take its result as an optional third argument - New
MiseEnPlaceMode,MISE_EN_PLACE_MODES,DEFAULT_MISE_EN_PLACE_MODE,isMiseEnPlaceMode,RestChoice,REST_CHOICES,scheduleForandscheduleTimesto choose between the timelines the same way everywhere (the renderer keeps re-exportingMiseEnPlaceMode) - JSON compiled before 1.4.0, which has no
tasks, still gets a total and idle time, read from its oldmetricsfields, in the renderer outputs, the editor hint andgram diff(its Gantt chart has nothing to draw) - The compiled recipe now says which version produced it (new
generatorfield)
Deprecated
- Kitchen:
steps[].timingsandsteps[].backgroundTasks, removed in 2.0.0. Read thestepandpassiveblocks ofschedule.blocksinstead - Kitchen:
metrics.totalTimeandmetrics.idleTime, removed in 2.0.0. Readschedule.totalTimeandschedule.idleTimeinstead (the oldmetrics.totalTimeis the total with every preparation first:layout(tasks, { miseEnPlace: "upfront" })gives the same number unless the recipe has intermediates, which it prepares once they exist) - Kitchen:
metrics.activeTime, removed in 2.0.0. Readschedule.activeTimeinstead (a timer written as a range counts as its average inmetrics.activeTime, and as its longest figure in the schedule) - Kitchen:
metrics.activeBreakdown,metrics.prepBreakdownandmetrics.totalBreakdown, removed in 2.0.0. UsemiseEnPlaceandscheduleinstead - Kitchen: the
breakdownreturned bycalculatePreparationTime, removed in 2.0.0 (the function then returns{ total }, so code readingtotalis unaffected). Read theitemsofcomputeMiseEnPlace()instead - Kitchen: reading the old
metricsfields when compiled JSON has notasks(JSON compiled before 1.4.0), removed in 2.0.0. Compile your recipes again with 1.4.0 or later - Everything above keeps working, with the same values, until 2.0.0. The Deprecated features page shows what to change for each of them: https://gram-lang.org/docs/how-to/deprecations/