Skip to content

0.4.0

Compare
Choose a tag to compare
@tbouffard tbouffard released this 05 Sep 09:55
· 178 commits to main since this release

⚡ This new version improves the plugin mechanism and the robustness of BPMN element utilities. ⚡

List of issues: milestone 0.4.0

Breaking changes

Minimal version of bpmn-visualization

You must now use bpmn-visualization 0.39.0 or higher with bv-experimental-add-ons. Previous versions required bpmn-visualization 0.37.0 or higher.

TypeScript usage of BpmnVisualization.getPlugin

The method now returns an instance of Plugin. In previous versions, it returned unknown.

Highlights

Simplified plugin usage for TypeScript users

Previously, you had to cast the returned value with the as keyword or with <>:

const myPlugin1 = bpmnVisualization.getPlugin('my-plugin-1') as MyCustomPlugin1;
const myPlugin2 = <MyCustomPlugin2>bpmnVisualization.getPlugin('my-plugin-2');

In the new version, you can still use the previous way, but we suggest you use the new features which provide better guidance:

const myPlugin = bpmnVisualization.getPlugin<MyPlugin>('my-plugin');

ℹ️ If you want more details, please see #106

What's Changed

🎉 New Features

  • feat: prevent multiple plugins with the same ID from loading by @tbouffard in #103
  • feat!: use generic type when getting a plugin by @csouchet in #106
  • feat: improve the robustness of BPMN elements utilities by @tbouffard in #115

📝 Documentation

  • docs: improve the release how-to by @tbouffard in #83
  • docs: improve how-to create the GH releases content by @tbouffard in #94
  • docs: describe the security policy by @tbouffard in #93
  • docs(release): mention requirement changes for bpmn-visualization by @tbouffard in #105

📦 Dependency updates

  • chore: configure Jest to let write tests in Typescript by @csouchet in #104

⚙️ Other Changes

  • chore: configure eslint and fix lint errors by @tbouffard in #84
  • chore: order npm scripts alphabetically in package.json by @tbouffard in #85
  • refactor: fix Code Smells detected by SonarCloud by @tbouffard in #86
  • chore: add dependabot configuration by @tbouffard in #87
  • chore(dev-deps): restore usage of typescript 4.5.2 in check-ts-support by @tbouffard in #90
  • chore(dependabot): do not update typescript by @tbouffard in #98
  • chore: move project to ESM by @tbouffard in #99
  • chore: add infrastructure to write JavaScript tests with jest by @tbouffard in #100
  • refactor(demo): add rel="noopener" to external links by @tbouffard in #101
  • test: add more tests for the plugins support by @tbouffard in #102
  • chore: use bpmn-visualization 0.39.0 as the minimum version required by @tbouffard in #109
  • refactor(demo): move assets to a dedicated sub-folder by @tbouffard in #110
  • test: add tests to OverlaysPlugin by @tbouffard in #107
  • test: move test files to a dedicated sub-folder by @tbouffard in #112

New Contributors

Full Changelog: v0.3.0...v0.4.0