diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9987f48..b968cc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,4 +34,3 @@ jobs: - name: Github Release uses: softprops/action-gh-release@v2 - diff --git a/CHANGELOG.md b/CHANGELOG.md index 05d77de..9c4bcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ## Version History +### v6.4.0 + +- :rocket: Add ability to ignore `flow` section in diff + ### v6.3.3 - :white_check_mark: Update GH Release action diff --git a/lib/cot.ts b/lib/cot.ts index 2f2f27e..b419af2 100644 --- a/lib/cot.ts +++ b/lib/cot.ts @@ -65,12 +65,10 @@ export default class CoT { */ isDiff( cot: CoT, - opts: { - diffMetadata: boolean; - diffStaleStartTime: boolean; - } = { + opts = { diffMetadata: false, - diffStaleStartTime: false + diffStaleStartTime: false, + diffFlow: false } ): boolean { const a = this.to_geojson(); @@ -84,6 +82,11 @@ export default class CoT { delete b.properties.metadata; } + if (!opts.diffFlow) { + delete a.properties.flow; + delete b.properties.flow; + } + if (!opts.diffStaleStartTime) { delete a.properties.time; delete a.properties.stale;