·
11 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
🚀 performance enhancements
... and 🚨 breaking changes for library use only)
- 6577d0e/ 98d76d6 perf!: lazy loads modules (#229) 🚨 BREAKING CHANGE for library use
- d821eb1 refactor!: removes export defaults in favor of explicit exports (#230) 🚨 BREAKING CHANGE for library use
There is NO breaking change for regular state-machine-cat use. Only if you use state-machine-cat as a library ('use the API').
Breaking changes for library ('API') use
- the
renderfunction has become asynchronous - the default export is gone, so in stead
before
// 🪠 only export was a 'default' object to mimic the old commonjs interfface
import smcat from "state-machine-cat";
try {
// 🚽 render was a synchronous function
const lSVGInAString = smcat.render(
`
initial => backlog;
backlog => doing;
doing => test;
`,
{
outputType: "svg",
},
);
console.log(lSVGInAString);
} catch (pError) {
console.error(pError);
}after
// 🪠 import the functions you need, in stead of the whole shebang
import { render } from "state-machine-cat";
try {
// 🚽 render is now async, so it needs e.g. to be awaited
const lSVGInAString = await render(
`
initial => backlog;
backlog => doing;
doing => test;
`,
{
outputType: "svg",
},
);
console.log(lSVGInAString);
} catch (pError) {
console.error(pError);
}👷 maintenance
- 9459c11 chore(npm): updates external devDependencies
- ae0aeb2 tools: removes now unused trackingID (as we don't have any tracking on state-machine-cat.js.org anymore)
- 35da72b chore: removes unused codeclimate config
- 3476e75 fix(site/CSP): allows data: protocol as valid image source
- e19f3ac refactor: moves attributes-parser peggy grammar next to its output
- 4a35a72 refactor(render): defines render function map at load a.o.t. run time