Skip to content

Conversation

@BrianJVarley
Copy link
Contributor

@BrianJVarley BrianJVarley commented May 6, 2025

Proposed Changes

Related to {I945}

  • This changes includes the Viewer, NavigatedViewer & Modeler as named exports from the dmn-js library.
    Exporting these classes instead of just default has some benefits for consumers. We don't need to use the long import path import Viewer from 'dmn-js/lib/NavigatedViewer' instead import { NavigatedViewer } from 'dmn-js';. It also means you don't need to re-alias the Viewer when importing.

For example with named exports:

export { default } from './Viewer';
export { Viewer } from './Viewer';
export { NavigatedViewer } from './NavigatedViewer';
export { Modeler } from './Modeler';

Steps to reproduce the behavior:

Import NavigatedViewer using named import - import { NavigatedViewer } from 'dmn-js';
Import is undefined, only default import exists with internal path - import Viewer from 'dmn-js/lib/NavigatedViewer

@barmac
Copy link
Member

barmac commented May 9, 2025

Cf. #945 (comment)

@barmac barmac added the backlog Queued in backlog label May 9, 2025
@barmac barmac self-assigned this May 9, 2025
@barmac barmac added the needs discussion Needs further discussion label May 9, 2025
@BrianJVarley
Copy link
Contributor Author

Feel free to close this, as you mentioned it needs a discussion.

@Buckwich Buckwich force-pushed the develop branch 2 times, most recently from 2f03601 to 2f60f02 Compare May 23, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backlog Queued in backlog needs discussion Needs further discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants