@camunda/linting 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Linter.js CHANGED
@@ -13,6 +13,8 @@ import zeebeModdle from 'zeebe-bpmn-moddle/resources/zeebe.json';
13
13
  import { getErrorMessage } from './utils/error-messages';
14
14
  import { getEntryIds } from './utils/properties-panel';
15
15
 
16
+ import { toSemverMinor } from './utils/version';
17
+
16
18
  const moddle = new BpmnModdle({
17
19
  modeler: modelerModdle,
18
20
  zeebe: zeebeModdle
@@ -133,10 +135,6 @@ function toLowerCase(string) {
133
135
  return string.toLowerCase();
134
136
  }
135
137
 
136
- function toSemverMinor(executionPlatformVersion) {
137
- return executionPlatformVersion.split('.').slice(0, 2).join('.');
138
- }
139
-
140
138
  async function createCache(configName) {
141
139
  let config = require('bpmnlint-plugin-camunda-compat').configs[ configName ];
142
140
 
@@ -9,6 +9,8 @@ import {
9
9
 
10
10
  import { getTypeString } from './types';
11
11
 
12
+ import { toSemverMinor } from './version';
13
+
12
14
  const TIMER_PROPERTIES = [
13
15
  'timeCycle',
14
16
  'timeDate',
@@ -27,7 +29,7 @@ const executionPlatformLabels = {
27
29
 
28
30
  export function getExecutionPlatformLabel(executionPlatform, executionPlatformVersion) {
29
31
  const executionPlatformLabel = executionPlatformLabels[ executionPlatform ]
30
- && executionPlatformLabels[ executionPlatform ][ executionPlatformVersion ];
32
+ && executionPlatformLabels[ executionPlatform ][ toSemverMinor(executionPlatformVersion) ];
31
33
 
32
34
  if (executionPlatformLabel) {
33
35
  return executionPlatformLabel;
@@ -38,7 +40,7 @@ export function getExecutionPlatformLabel(executionPlatform, executionPlatformVe
38
40
  executionPlatform = executionPlatformLabels[ executionPlatform ][ 'default' ];
39
41
  }
40
42
 
41
- return `${ executionPlatform } ${ executionPlatformVersion }`;
43
+ return `${ executionPlatform } ${ toSemverMinor(executionPlatformVersion) }`;
42
44
  }
43
45
 
44
46
  function getIndefiniteArticle(type) {
@@ -0,0 +1,3 @@
1
+ export function toSemverMinor(executionPlatformVersion) {
2
+ return executionPlatformVersion.split('.').slice(0, 2).join('.');
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/linting",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Linting for Camunda Platform",
5
5
  "main": "index.js",
6
6
  "scripts": {