Skip to content

Moddle 7 #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/bpmn-moddle.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
* @param {Object} [options] additional options to pass over
*/
export default function BpmnModdle(packages, options) {
Moddle.call(this, packages, options);
Moddle.call(this, packages, options || { strict: true });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should ensure strict defaults to true, unless set?

}

BpmnModdle.prototype = Object.create(Moddle.prototype);
Expand Down
40 changes: 18 additions & 22 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
},
"dependencies": {
"min-dash": "^4.2.1",
"moddle": "^7.0.0",
"moddle-xml": "^11.0.0"
"moddle": "^7.0.0-exp.1",
"moddle-xml": "^11.0.0-exp.0"
},
"files": [
"dist",
Expand Down
2 changes: 1 addition & 1 deletion test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ export function readFile(filename) {
}

export function createModdle(additionalPackages, options) {
return new BpmnModdle(additionalPackages, options);
return new BpmnModdle(additionalPackages, options || { strict: true });
}
4 changes: 3 additions & 1 deletion test/integration/camunda/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ describe('bpmn-moddle - integration', function() {
it('ServiceTaskLike', async function() {

// given
var serviceTask = moddle.create('bpmn:ServiceTask', { javaDelegate: 'FOO' });
var serviceTask = moddle.create('bpmn:ServiceTask', {
'camunda:javaDelegate': 'FOO'
});

// assume
expect(serviceTask.$instanceOf('camunda:ServiceTaskLike')).to.be.true;
Expand Down
8 changes: 4 additions & 4 deletions test/spec/xml/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ describe('bpmn-moddle - write', function() {

// given
var bpmnShape = moddle.create('bpmndi:BPMNShape', {
fill: '#ff0000',
stroke: '#00ff00'
'bioc:fill': '#ff0000',
'bioc:stroke': '#00ff00'
});

var expectedXML =
Expand All @@ -713,8 +713,8 @@ describe('bpmn-moddle - write', function() {

// given
var bpmnEdge = moddle.create('bpmndi:BPMNEdge', {
fill: '#ff0000',
stroke: '#00ff00'
'bioc:fill': '#ff0000',
'bioc:stroke': '#00ff00'
});

var expectedXML =
Expand Down