moddle-xml
Advanced tools
Comparing version 6.0.0 to 7.0.0
@@ -9,2 +9,8 @@ # Changelog | ||
## 7.0.0 | ||
### Breaking Changes | ||
* `FEAT`: migrate to ES modules. Use `esm` or a ES module aware transpiler to consume this library. | ||
## 6.0.0 | ||
@@ -11,0 +17,0 @@ |
11
index.js
@@ -1,4 +0,7 @@ | ||
module.exports = { | ||
Reader: require('./lib/reader'), | ||
Writer: require('./lib/writer') | ||
}; | ||
export { | ||
Reader | ||
} from './lib/read'; | ||
export { | ||
Writer | ||
} from './lib/write'; |
@@ -1,15 +0,10 @@ | ||
'use strict'; | ||
function hasLowerCaseAlias(pkg) { | ||
export function hasLowerCaseAlias(pkg) { | ||
return pkg.xml && pkg.xml.tagAlias === 'lowerCase'; | ||
} | ||
module.exports.hasLowerCaseAlias = hasLowerCaseAlias; | ||
module.exports.DEFAULT_NS_MAP = { | ||
export var DEFAULT_NS_MAP = { | ||
'xsi': 'http://www.w3.org/2001/XMLSchema-instance' | ||
}; | ||
var XSI_TYPE = module.exports.XSI_TYPE = 'xsi:type'; | ||
export var XSI_TYPE = 'xsi:type'; | ||
@@ -20,8 +15,8 @@ function serializeFormat(element) { | ||
module.exports.serializeAsType = function(element) { | ||
export function serializeAsType(element) { | ||
return serializeFormat(element) === XSI_TYPE; | ||
}; | ||
} | ||
module.exports.serializeAsProperty = function(element) { | ||
export function serializeAsProperty(element) { | ||
return serializeFormat(element) === 'property'; | ||
}; | ||
} |
{ | ||
"name": "moddle-xml", | ||
"version": "6.0.0", | ||
"version": "7.0.0", | ||
"description": "XML import/export for documents described with moddle", | ||
"directories": { | ||
"lib": "lib" | ||
}, | ||
"scripts": { | ||
@@ -12,3 +9,3 @@ "all": "run-s lint test", | ||
"dev": "npm test -- --watch", | ||
"test": "mocha -r ./test/expect --reporter=spec test/**/*.js" | ||
"test": "mocha -r esm --reporter=spec test/**/*.js" | ||
}, | ||
@@ -39,2 +36,3 @@ "repository": { | ||
"license": "MIT", | ||
"sideEffects": false, | ||
"devDependencies": { | ||
@@ -44,2 +42,3 @@ "chai": "^4.1.2", | ||
"eslint-plugin-bpmn-io": "^0.4.1", | ||
"esm": "^3.0.15", | ||
"mocha": "^4.0.1", | ||
@@ -49,7 +48,7 @@ "npm-run-all": "^4.1.1" | ||
"dependencies": { | ||
"min-dash": "^2.0.1", | ||
"moddle": "^3.0.0", | ||
"min-dash": "^2.4.0", | ||
"moddle": "^4.0.1", | ||
"saxen": "^7.0.1", | ||
"tiny-stack": "^0.1.0" | ||
"tiny-stack": "^1.0.0" | ||
} | ||
} |
@@ -22,4 +22,7 @@ # moddle-xml | ||
``` | ||
var Moddle = require('moddle'), | ||
ModdleXML = require('moddle-xml'); | ||
import Moddle from 'moddle'; | ||
import { | ||
Reader, | ||
Writer | ||
} from 'moddle-xml'; | ||
@@ -88,3 +91,3 @@ var model = new Moddle([ myPackage ]); | ||
var options = { format: false, preamble: false }; | ||
var writer = new ModdleXML.Writer(options); | ||
var writer = new Writer(options); | ||
@@ -96,5 +99,7 @@ var xml = writer.toXML(bar); | ||
> __Note:__ As of version `7.0.0` this library exposes ES modules. Use [esm](https://github.com/standard-things/esm) or a ES module aware transpiler such as Webpack, Rollup or Browserify + babelify to consume it. | ||
## License | ||
MIT |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
1304
103
43049
6
1
+ Addedmin-dash@3.8.1(transitive)
+ Addedmoddle@4.1.0(transitive)
+ Addedtiny-stack@1.1.0(transitive)
- Removedmoddle@3.0.0(transitive)
- Removedtiny-stack@0.1.0(transitive)
Updatedmin-dash@^2.4.0
Updatedmoddle@^4.0.1
Updatedtiny-stack@^1.0.0