Skip to content

Commit

Permalink
stop building for node 12
Browse files Browse the repository at this point in the history
- lint some
  • Loading branch information
paed01 committed Aug 17, 2022
1 parent 216c767 commit 0bb2e61
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 112 deletions.
216 changes: 123 additions & 93 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,110 +5,140 @@
"ecmaVersion": 2018
},
"env": {
"browser": true,
"es6": true,
"node": false
"shared-node-browser": true
},
"extends": "eslint:recommended",
"rules": {
"brace-style": [2, "1tbs", {
"allowSingleLine": false
}],
"camelcase": [
"arrow-parens": "error",
"arrow-spacing": "error",
"brace-style": [
"error",
{
"properties": "never"
}
"1tbs",
{ "allowSingleLine": false }
],
"comma-dangle": [
"warn",
"error",
{
"arrays": "never",
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "ignore",
"exports": "ignore",
"functions": "ignore"
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"comma-spacing": "error",
"curly": [
"error",
"multi-line"
],
"dot-notation": [
"error",
{ "allowKeywords": true }
],
"eol-last": "error",
"eqeqeq": "error",
"handle-callback-err": "error",
"indent": [ "error", 2, { "SwitchCase": 1 } ],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true
}
],
"comma-spacing": 2,
"consistent-return": 0,
"curly": [2, "multi-line"],
"dot-notation": [2, {
"allowKeywords": true
}],
"eol-last": 2,
"eqeqeq": 2,
"handle-callback-err": 2,
"indent": [2, 2, {
"SwitchCase": 1
}],
"key-spacing": [2, {
"beforeColon": false,
"afterColon": true
}],
"keyword-spacing": 2,
"max-len": 0,
"new-cap": 0,
"new-parens": 2,
"no-alert": 2,
"no-array-constructor": 2,
"no-caller": 2,
"no-catch-shadow": 2,
"no-console": 1,
"no-labels": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-parens": [2, "functions"],
"keyword-spacing": "error",
"linebreak-style": [ "error", "unix" ],
"new-parens": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-caller": "error",
"no-catch-shadow": "error",
"no-console": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-parens": [
"error",
"functions"
],
"no-fallthrough": 0,
"no-implied-eval": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 0,
"no-new": 0,
"no-new-func": 2,
"no-new-object": 2,
"no-new-wrappers": 2,
"no-octal-escape": 2,
"no-path-concat": 2,
"no-process-exit": 2,
"no-proto": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"no-undef-init": 2,
"no-underscore-dangle": 0,
"no-unused-expressions": 2,
"no-use-before-define": 0,
"no-var": 2,
"no-with": 2,
"prefer-arrow-callback": 2,
"prefer-const": ["error", {"destructuring": "all"}],
"quotes": [2, "single"],
"semi": [2, "always"],
"semi-spacing": [2, {
"before": false,
"after": true
}],
"space-infix-ops": 2,
"space-unary-ops": [2, {
"words": true,
"nonwords": false
}],
"space-before-blocks": 2,
"space-before-function-paren": [2, {
"anonymous": "never",
"named": "never"
}],
"strict": [2, "global"],
"yoda": [2, "never"]
"no-implied-eval": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": [ "error", {
"max": 1,
"maxEOF": 0,
"maxBOF": 0
} ],
"no-native-reassign": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-path-concat": "error",
"no-process-exit": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-script-url": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unused-expressions": "error",
"no-use-before-define": [
"error",
"nofunc"
],
"no-var": "error",
"no-useless-concat": "error",
"no-whitespace-before-property": "error",
"object-shorthand": [ "error", "properties" ],
"switch-colon-spacing": "error",
"prefer-arrow-callback": "error",
"prefer-const": [
"error",
{ "destructuring": "all" }
],
"quote-props": [ "error", "as-needed" ],
"quotes": [
"error",
"single",
{ "avoidEscape": true }
],
"semi": [ "error", "always" ],
"semi-spacing": [
"error",
{
"before": false,
"after": true
}
],
"space-before-blocks": "error",
"space-before-function-paren": [ "error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
} ],
"space-infix-ops": "error",
"space-unary-ops": [
"error",
{
"words": true,
"nonwords": false
}
],
"space-in-parens": [ "error", "never" ],
"spaced-comment": "error",
"strict": [ "error", "global" ],
"template-curly-spacing": [ "error", "never" ],
"yoda": ["error", "never"]
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
14
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- '12'
- '14'
- '16'
before_script:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

# 2.1.1

- Stop building node 12
- Lint some

# 2.1.0

Activity data associations
Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = function babelRoot(api) {
targets: {
node: 'current',
},
}
]
},
],
],
};
};
3 changes: 2 additions & 1 deletion dist/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"ecmaVersion": 2018
},
"rules": {
"arrow-parens": 0,
"comma-dangle": 0,
"curly": 0,
"brace-style": 0,
"eol-last": 0,
"comma-dangle": 0,
"indent": 0,
"no-var": 0,
"no-cond-assign": 0,
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,6 @@ Mapper.prototype._getDataStore = function getDataStore(referenceId) {
}
};


Mapper.prototype._prepareDataObjectReferences = function prepareDataObjectReferences(element) {
const objectRefs = this._references.dataObjectRefs.filter((objectRef) => objectRef.id === element.id);

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moddle-context-serializer",
"version": "2.1.0",
"version": "2.1.1",
"description": "Make bpmn-moddle context serializable and mapped to behaviour functions",
"module": "index.js",
"main": "dist/index.js",
Expand Down Expand Up @@ -37,17 +37,17 @@
"bpmn-moddle": ">=5"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.8",
"@babel/preset-env": "^7.16.11",
"@babel/register": "^7.17.7",
"@babel/cli": "^7.18.10",
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/register": "^7.18.9",
"bpmn-moddle": "^7.1.2",
"bpmn-moddle-5": "npm:bpmn-moddle@5",
"bpmn-moddle-6": "npm:bpmn-moddle@6",
"camunda-bpmn-moddle": "^6.1.2",
"chai": "^4.3.6",
"eslint": "^7.32.0",
"mocha": "^9.2.2",
"eslint": "^8.22.0",
"mocha": "^10.0.0",
"nyc": "^15.1.0"
}
}
11 changes: 5 additions & 6 deletions test/helpers/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import path from 'path';
const eventActivities = [
'bpmn:IntermediateCatchEvent',
'bpmn:StartEvent',
'bpmn:EndEvent'
'bpmn:EndEvent',
];

const gateways = [
'bpmn:ExclusiveGateway',
'bpmn:InclusiveGateway'
'bpmn:InclusiveGateway',
];

const activities = [
Expand All @@ -19,7 +19,7 @@ const activities = [
'bpmn:ServiceTask',
'bpmn:UserTask',
'bpmn:SubProcess',
'bpmn:ParallelGateway'
'bpmn:ParallelGateway',
];

const moddle = new BpmnModdle();
Expand Down Expand Up @@ -135,14 +135,14 @@ async function create(activityType) {
const flowElements = [
moddle.create('bpmn:StartEvent', {id: 'start'}),
moddle.create(activityType, { id: 'activity' }),
moddle.create('bpmn:EndEvent', {id: 'end1'})
moddle.create('bpmn:EndEvent', {id: 'end1'}),
];

const [start, activity, end] = flowElements;

const flows = [
moddle.create('bpmn:SequenceFlow', {id: 'flow1', sourceRef: start, targetRef: activity}),
moddle.create('bpmn:SequenceFlow', {id: 'flow2', sourceRef: activity, targetRef: end})
moddle.create('bpmn:SequenceFlow', {id: 'flow2', sourceRef: activity, targetRef: end}),
];
const [, flow2, flow3] = flows;

Expand All @@ -165,7 +165,6 @@ async function create(activityType) {
return toXml(definitions);
}


function fromXML(source) {
return new Promise((resolve, reject) => {
moddle.fromXML(source, (err, definitions, moddleContext) => {
Expand Down

0 comments on commit 0bb2e61

Please sign in to comment.