Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bpmn-moddle

Package Overview
Dependencies
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmn-moddle - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

6

CHANGELOG.md

@@ -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 @@

4

index.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc