Skip to content

Commit

Permalink
refactor!: rename the package to bpmn-visualization-addons (#316)
Browse files Browse the repository at this point in the history
Update the package.json attribute to ensure that the package will be
published under its new name.
Update the rest of the code and the documentation accordingly to prepare
the new release.

BREAKING CHANGES: this package renaming requires updating the dependency
declaration and imports in the code.
  • Loading branch information
tbouffard authored Oct 4, 2024
1 parent 1d367f2 commit 4013852
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ updates:
reviewers:
- process-analytics/pa-collaborators
ignore:
# typescript must not be updated in packages/check-ts-support. Its version must remain unchanged to test the minimum version supported by bv-addons
# typescript must not be updated in packages/check-ts-support. Its version must remain unchanged to test the minimum version supported by bpmn-visualization-addons
# For more details, see:
# https://github.com/process-analytics/bpmn-visualization-addons/pull/90
# https://github.com/process-analytics/bpmn-visualization-addons/pull/92
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">bpmn-visualization-addons</h1>
<div align="center">
<p align="center">
<a href="https://npmjs.org/package/@process-analytics/bv-experimental-add-ons">
<img alt="npm package" src="https://img.shields.io/npm/v/@process-analytics/bv-experimental-add-ons.svg?color=orange">
<a href="https://npmjs.org/package/@process-analytics/bpmn-visualization-addons">
<img alt="npm package" src="https://img.shields.io/npm/v/@process-analytics/bpmn-visualization-addons.svg?color=orange">
</a>
<a href="https://github.com/process-analytics/bpmn-visualization-addons/releases">
<img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/process-analytics/bpmn-visualization-addons?label=changelog&include_prereleases">
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions packages/addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,28 @@
## 📌 Usage

Install `bpmn-visualization-addons` and [bpmn-visualization](https://github.com/process-analytics/bpmn-visualization-js/):
```shell script
npm i @process-analytics/bv-experimental-add-ons bpmn-visualization
```shell
npm install @process-analytics/bpmn-visualization-addons bpmn-visualization
```

> [!NOTE]
> Until version 0.7.1, the `bpmn-visualization-addons` package was available under the name `bv-experimental-add-ons`.
If your application was using the package under its former name, proceed as follows 👇:
```shell
# first uninstall the old package
npm uninstall @process-analytics/bv-experimental-add-ons
# then install the new package
npm install @process-analytics/bpmn-visualization-addons
```
Then, update the imports in your application code to use the new package name as follows 👇:
```diff
- import {BpmnVisualization} from "@process-analytics/bv-experimental-add-ons";
+ import {BpmnVisualization} from "@process-analytics/bpmn-visualization-addons";
```

## 📜 TypeScript Support

The `@process-analytics/bv-experimental-add-ons` npm package includes type definitions, so the integration works out of the box in TypeScript projects and applications.
The `@process-analytics/bpmn-visualization-addons` npm package includes type definitions, so the integration works out of the box in TypeScript projects and applications.
`bpmn-visualization-addons` requires **TypeScript 4.5** or greater.


Expand All @@ -24,16 +38,16 @@ The `@process-analytics/bv-experimental-add-ons` npm package includes type defin
The plugins infrastructure provides a way to register extension points.

> [!IMPORTANT]
> To be able to register and use the plugins, you need to import `BpmnVisualization` from the `addons` package, and not from `bpmn-visualization`.
> To be able to register and use the plugins, you need to import `BpmnVisualization` from `bpmn-visualization-addons`, and not from `bpmn-visualization`.
```diff
- import {BpmnVisualization} from "bpmn-visualization";
+ import {BpmnVisualization} from "@process-analytics/bv-experimental-add-ons";
+ import {BpmnVisualization} from "@process-analytics/bpmn-visualization-addons";
```

Example of use:

```ts
import {BpmnVisualization} from "@process-analytics/bv-experimental-add-ons";
import {BpmnVisualization} from "@process-analytics/bpmn-visualization-addons";

const bpmnVisualization = new BpmnVisualization({
container: 'bpmn-container',
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@process-analytics/bv-experimental-add-ons",
"name": "@process-analytics/bpmn-visualization-addons",
"version": "0.7.1",
"private": false,
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/check-ts-support/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import { BpmnElementsIdentifier, PathResolver } from '@process-analytics/bv-experimental-add-ons';
import { BpmnElementsIdentifier, PathResolver } from '@process-analytics/bpmn-visualization-addons';
import { BpmnVisualization } from 'bpmn-visualization';

// bpmn-visualization
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/overlays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import './assets/overlays.css';
import type { FitOptions } from 'bpmn-visualization';

import { BpmnVisualization, OverlaysPlugin } from '@process-analytics/bv-experimental-add-ons';
import { BpmnVisualization, OverlaysPlugin } from '@process-analytics/bpmn-visualization-addons';
import { FitType } from 'bpmn-visualization';

import { fetchDiagram } from './shared/diagrams.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/path-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import './assets/path-resolver.css';
import type { BpmnElement } from 'bpmn-visualization';

import { BpmnVisualization, ElementsPlugin, PathResolver, ShapeUtil, StylePlugin } from '@process-analytics/bv-experimental-add-ons';
import { BpmnVisualization, ElementsPlugin, PathResolver, ShapeUtil, StylePlugin } from '@process-analytics/bpmn-visualization-addons';
import { FitType } from 'bpmn-visualization';

import { fetchDiagram } from './shared/diagrams.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/plugins-by-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import './assets/plugins-by-name.css';

import type { FitOptions, StyleUpdate } from 'bpmn-visualization';

import { BpmnVisualization, StyleByNamePlugin } from '@process-analytics/bv-experimental-add-ons';
import { BpmnVisualization, StyleByNamePlugin } from '@process-analytics/bpmn-visualization-addons';
import { FitType } from 'bpmn-visualization';

import { fetchDiagram } from './shared/diagrams.js';
Expand Down

0 comments on commit 4013852

Please sign in to comment.