bpmn-io / bpmnlint

Validate BPMN diagrams based on configurable lint rules.
MIT License
119 stars 36 forks source link

Fix compilation on Windows #114

Closed nikku closed 12 months ago

nikku commented 12 months ago

This fixes https://github.com/bpmn-io/bpmnlint/issues/112, which turned out to be a :window: only issue.

As it stands we need to properly convert paths between :window: and :penguin: before we normalize or join, as these node utilities do a bad (to no) job of converting.

nikku commented 12 months ago

This fixes compilation of custom configs on :window:.

@philippfromme if you want to you could add a unit test along the lines of https://github.com/bpmn-io/bpmnlint/pull/113.

nikku commented 12 months ago

Verified to work for bpmnlint-loader, too, via https://github.com/nikku/bpmnlint-loader/actions/runs/5615535015/job/15216002842.

philippfromme commented 12 months ago

One of the issues I fixed on my branch is that the paths are absolute:

import rule_0 from 'C:/workspace/camunda/bpmnlint-plugin-camunda-compat/rules/camunda-cloud/element-type';

I'm not sure if this is only happening on Windows.

philippfromme commented 12 months ago

This now also make sure rules are imported from modules instead of absolute paths.

philippfromme commented 12 months ago

@nikku I've added my changes. Please have a look.

nikku commented 12 months ago

I've cleaned up the commits. One final remark we could consider: https://github.com/bpmn-io/bpmnlint/pull/114/files#r1270570682.