Skip to content

Commit

Permalink
Merge a0e626e into 6efb35b
Browse files Browse the repository at this point in the history
  • Loading branch information
paed01 committed Dec 30, 2022
2 parents 6efb35b + a0e626e commit 9f4e027
Show file tree
Hide file tree
Showing 24 changed files with 133 additions and 1,153 deletions.
1 change: 0 additions & 1 deletion .eslintignore
@@ -1,4 +1,3 @@
.nyc_output
coverage/
node_modules
tmp/
23 changes: 23 additions & 0 deletions .github/workflows/build.yaml
@@ -0,0 +1,23 @@
name: Build

on: ["push", "pull_request"]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, latest]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm i
- run: npm run test:lcov
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 0 additions & 11 deletions .mocharc.js → .mocharc.cjs
Expand Up @@ -4,19 +4,8 @@ process.env.NODE_ENV = 'test';

global.expect = require('chai').expect;


require('@babel/register')({
include: [
'../index.js',
'../test/**',
'../node_modules/bpmn-moddle-5/**'
],
});

module.exports = {
exit: true,
recursive: true,
reporter: 'spec',
timeout: 1000,
};

9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,11 @@
Changelog
=========

# 3.0.0

- Convert to module
- Remove backward compatibility test for bpmn-moddle@5

# 2.2.0

- Add property `script.type` to added scripts
Expand Down
22 changes: 1 addition & 21 deletions README.md
Expand Up @@ -3,7 +3,7 @@ bpmn-moddle context serializer

Make bpmn-moddle context serializable and mapped to behaviour functions

[![Build Status](https://app.travis-ci.com/paed01/moddle-context-serializer.svg?branch=master)](https://app.travis-ci.com/paed01/moddle-context-serializer)[![Coverage Status](https://coveralls.io/repos/github/paed01/moddle-context-serializer/badge.svg?branch=master)](https://coveralls.io/github/paed01/moddle-context-serializer?branch=master)
[![build](https://github.com/paed01/moddle-context-serializer/actions/workflows/build.yaml/badge.svg)](https://github.com/paed01/moddle-context-serializer/actions/workflows/build.yaml)[![coverage](https://coveralls.io/repos/github/paed01/moddle-context-serializer/badge.svg?branch=master)](https://coveralls.io/github/paed01/moddle-context-serializer?branch=master)

- [API](/API.md)

Expand Down Expand Up @@ -31,23 +31,3 @@ function extender(behaviourMapping) {
behaviourMapping['bpmn:EscalationEventDefinition'] = EscalationEventDefinition;
}
```

## Backward compatibility

In `bpmn-moddle@5` the moddle context is served in the third argument of the callback. It has a sligthly different scheme but is still supported.

Promisified example of how to retrieive the moddle context:
```js
import BpmnModdle from 'bpmn-moddle';

function getModdleContext(source) {
const bpmnModdle = new BpmnModdle();

return new Promise((resolve, reject) => {
bpmnModdle.fromXML(source, (err, definitions, moddleContext) => {
if (err) return reject(err);
resolve(moddleContext);
});
});
}
```
16 changes: 0 additions & 16 deletions babel.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions dist/.eslintrc.json

This file was deleted.

0 comments on commit 9f4e027

Please sign in to comment.