Upgrading
When a new version of Fudgel is released, you may need to make some changes to your existing components to ensure they continue to work correctly.
From 3.3.x to 3.4.x
- The router now matches on the path alone. A URL carrying a query string or a fragment, such as
/orders?status=open, previously failed to match/ordersand fell through to the catch-all route. Both are still left on the URL; read them withlocation.searchandlocation.hash. See Routing. - Routes may now name query parameters to receive as attributes, using a
queryattribute on the route. See Routing. - The
routeChangeevent detail is now the matched path. It previously carried whatever URL was passed to the History API, query string and all. - The
@Component()decorator no longer returns a value. It defined the custom element and then returned it, which TypeScript rejects because a class decorator may only return the class it decorated. The decorated name has always referred to the controller at runtime; now the types agree. No code changes are required. - Only
distis published. If you were reaching intofudgel/srcorfudgel/docsfrom an installed copy, import from the package instead.
From 3.1.x to 3.2.x
onViewInit()andonParse()are now always asynchronous and their lifecycle stages no longer pass thewasAsyncargument.- Exposed
lifecyclefunction to allow for custom lifecycle stages.
From 3.0.x to 3.1.x
*forwas made faster. No code changes are required.
From 2.x.x to 3.x.x
- Parsing expressions changed.
parse()is nowparse.js()(one of several parsing functions available).parsed[0]now accepts a list of objects to search as opposed to an array.
nextTick()was removed.controllerToElement(),elementToController(), androotElement()has been removed. Usemetadata, as seen on the Utilities page instead.- All hooks have been removed and switched to events.
hookOnGlobal()is removed and mostly replaced withevents.on().componenthook changed to an event and has an additional argument.set:PROP_NAMEandset:hooks removed.changeandupdatefire instead, respectively.
- The
update()utility function no longer allows updating specific properties. - Lifecycle stages now fire events globally, fire events on the controller, and call methods on the controller.
- Created
updateandunlinkevents. parseandviewInithave been updated to potentially be synchronous, with a new argument indicating if this was called synchronously.
- Created
- Documentation reviewed and significant improvements made.
From 1.x.x to 2.x.x
- No changes. The internals changed significantly and additional information was exposed, but the API remained the same.