bpmn-moddle
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -9,2 +9,8 @@ # Changelog | ||
## 5.0.0 | ||
### Breaking Changes | ||
* `FEAT`: migrate to ES modules. Use `esm` or a ES module aware transpiler to consume this library. | ||
## 4.0.0 | ||
@@ -11,0 +17,0 @@ |
@@ -1,1 +0,3 @@ | ||
module.exports = require('./lib/simple'); | ||
export { | ||
default | ||
} from './lib/simple'; |
@@ -1,11 +0,15 @@ | ||
'use strict'; | ||
import { | ||
isString, | ||
isFunction, | ||
assign | ||
} from 'min-dash'; | ||
var isString = require('min-dash').isString, | ||
isFunction = require('min-dash').isFunction, | ||
assign = require('min-dash').assign; | ||
import Moddle from 'moddle'; | ||
var Moddle = require('moddle'), | ||
XmlReader = require('moddle-xml/lib/reader'), | ||
XmlWriter = require('moddle-xml/lib/writer'); | ||
import { | ||
Reader, | ||
Writer | ||
} from 'moddle-xml'; | ||
/** | ||
@@ -20,3 +24,3 @@ * A sub class of {@link Moddle} with support for import and export of BPMN 2.0 xml files. | ||
*/ | ||
function BpmnModdle(packages, options) { | ||
export default function BpmnModdle(packages, options) { | ||
Moddle.call(this, packages, options); | ||
@@ -27,5 +31,3 @@ } | ||
module.exports = BpmnModdle; | ||
/** | ||
@@ -53,3 +55,3 @@ * Instantiates a BPMN model tree from a given xml string. | ||
var reader = new XmlReader(assign({ model: this, lax: true }, options)); | ||
var reader = new Reader(assign({ model: this, lax: true }, options)); | ||
var rootHandler = reader.handler(typeName); | ||
@@ -75,3 +77,3 @@ | ||
var writer = new XmlWriter(options); | ||
var writer = new Writer(options); | ||
@@ -78,0 +80,0 @@ var result; |
@@ -1,17 +0,25 @@ | ||
'use strict'; | ||
import { | ||
assign | ||
} from 'min-dash'; | ||
var assign = require('min-dash').assign; | ||
import BpmnModdle from './bpmn-moddle'; | ||
var BpmnModdle = require('./bpmn-moddle'); | ||
import BpmnPackage from '../resources/bpmn/json/bpmn.json'; | ||
import BpmnDiPackage from '../resources/bpmn/json/bpmndi.json'; | ||
import DcPackage from '../resources/bpmn/json/dc.json'; | ||
import DiPackage from '../resources/bpmn/json/di.json'; | ||
import BiocPackage from '../resources/bpmn-io/json/bioc.json'; | ||
var packages = { | ||
bpmn: require('../resources/bpmn/json/bpmn.json'), | ||
bpmndi: require('../resources/bpmn/json/bpmndi.json'), | ||
dc: require('../resources/bpmn/json/dc.json'), | ||
di: require('../resources/bpmn/json/di.json'), | ||
bioc: require('../resources/bpmn-io/json/bioc.json') | ||
bpmn: BpmnPackage, | ||
bpmndi: BpmnDiPackage, | ||
dc: DcPackage, | ||
di: DiPackage, | ||
bioc: BiocPackage | ||
}; | ||
module.exports = function(additionalPackages, options) { | ||
return new BpmnModdle(assign({}, packages, additionalPackages), options); | ||
}; | ||
export default function(additionalPackages, options) { | ||
var pks = assign({}, packages, additionalPackages); | ||
return new BpmnModdle(pks, options); | ||
} |
{ | ||
"name": "bpmn-moddle", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "A moddle wrapper for BPMN 2.0", | ||
@@ -9,3 +9,3 @@ "scripts": { | ||
"dev": "npm test -- --watch", | ||
"test": "mocha -r ./test/expect --reporter=spec --recursive test" | ||
"test": "mocha -r esm --reporter=spec --recursive test" | ||
}, | ||
@@ -38,2 +38,3 @@ "repository": { | ||
"eslint-plugin-bpmn-io": "^0.4.1", | ||
"esm": "^3.0.15", | ||
"mocha": "^4.0.1", | ||
@@ -44,6 +45,6 @@ "npm-run-all": "^4.1.2", | ||
"dependencies": { | ||
"min-dash": "^2.0.1", | ||
"moddle": "^3.0.0", | ||
"moddle-xml": "^6.0.0" | ||
"min-dash": "^2.4.0", | ||
"moddle": "^4.0.1", | ||
"moddle-xml": "^7.0.0" | ||
} | ||
} |
@@ -12,6 +12,6 @@ # bpmn-moddle | ||
Get the library via [npm package](https://www.npmjs.org/package/bpmn-moddle). Bundle it for the web using [browserify](http://browserify.org) or [webpack](https://webpack.github.io). | ||
As of version `5.0.0` this library exposes ES modules. Use [esm](https://github.com/standard-things/esm) to consume it or a ES module aware transpiler such as Webpack, Rollup or Browserify + babelify to bundle it for the browser. | ||
```javascript | ||
var BpmnModdle = require('bpmn-moddle'); | ||
import BpmnModdle from 'bpmn-moddle'; | ||
@@ -49,4 +49,5 @@ var moddle = new BpmnModdle(); | ||
* [Issues](https://github.com/bpmn-io/bpmn-moddle/issues) | ||
* [Examples](https://github.com/bpmn-io/bpmn-moddle/tree/master/test/spec/xml) | ||
* [Issues](https://github.com/bpmn-io/bpmn-moddle/issues) | ||
* [Examples](https://github.com/bpmn-io/bpmn-moddle/tree/master/test/spec/xml) | ||
* [Changelog](./CHANGELOG.md) | ||
@@ -53,0 +54,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151000
3611
72
8
69462
+ Addedmin-dash@3.8.1(transitive)
+ Addedmoddle@4.1.0(transitive)
+ Addedmoddle-xml@7.5.0(transitive)
+ Addedsaxen@8.1.2(transitive)
- Removedmoddle@3.0.0(transitive)
- Removedmoddle-xml@6.0.0(transitive)
- Removedsaxen@7.0.1(transitive)
- Removedtiny-stack@0.1.0(transitive)
Updatedmin-dash@^2.4.0
Updatedmoddle@^4.0.1
Updatedmoddle-xml@^7.0.0