object-diagram-js-differ 1.0.1 → 1.0.3

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.
@@ -0,0 +1 @@
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).odDiff=e()}(this,(function(){"use strict";const t=Object.prototype.toString,e=Object.prototype.hasOwnProperty;function i(e){return"[object Array]"===t.call(e)}function n(t,i){return!(null==t)&&e.call(t,i)}function r(t,e){let r,l;if(void 0===t)return;const c=i(t)?o:s;for(let i in t)if(n(t,i)&&(r=t[i],l=e(r,c(i)),!1===l))return r}function s(t){return t}function o(t){return Number(t)}function l(t){if("object"!=typeof t)return t;if(null===t)return null;if(Array.isArray(t))return t.map(l);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return function(t){var e;const i=/^\/(.*)\/([gimyu]*)$/.exec(t.toString());if(!i)throw new Error("Invalid RegExp");return new RegExp(null!==(e=i[1])&&void 0!==e?e:"",i[2])}(t);const e={};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=l(t[i]));return e}class c{setResult(t){return this.result=t,this.hasResult=!0,this}exit(){return this.exiting=!0,this}push(t,e){var i;return t.parent=this,void 0!==e&&(t.childName=e),t.root=this.root||this,t.options=t.options||this.options,this.children?(!function(t,e){if(0===t.length)throw new Error("Expected a non-empty array")}(this.children),(i=this.children,i[i.length-1]).next=t,this.children.push(t)):(this.children=[t],this.nextAfterChildren=this.next||null,this.next=t),t.next=this,this}}class f extends c{constructor(t,e){super(),this.left=t,this.right=e,this.pipe="diff"}prepareDeltaResult(t){var e,i,n,r;if("object"==typeof t&&((null===(e=this.options)||void 0===e?void 0:e.omitRemovedValues)&&Array.isArray(t)&&t.length>1&&(2===t.length||0===t[2]||3===t[2])&&(t[0]=0),null===(i=this.options)||void 0===i?void 0:i.cloneDiffValues)){const e="function"==typeof(null===(n=this.options)||void 0===n?void 0:n.cloneDiffValues)?null===(r=this.options)||void 0===r?void 0:r.cloneDiffValues:l;"object"==typeof t[0]&&(t[0]=e(t[0])),"object"==typeof t[1]&&(t[1]=e(t[1]))}return t}setResult(t){return this.prepareDeltaResult(t),super.setResult(t)}}class u extends c{constructor(t,e){super(),this.left=t,this.delta=e,this.pipe="patch"}}class h extends c{constructor(t){super(),this.delta=t,this.pipe="reverse"}}class a{constructor(t){this.name=t,this.filters=[]}process(t){if(!this.processor)throw new Error("add this pipe to a processor before using it");const e=this.debug,i=this.filters.length,n=t;for(let t=0;t<i;t++){const i=this.filters[t];if(i&&(e&&this.log(`filter: ${i.filterName}`),i(n),"object"==typeof n&&n.exiting)){n.exiting=!1;break}}!n.next&&this.resultCheck&&this.resultCheck(n)}log(t){console.log(`[jsondiffpatch] ${this.name} pipe, ${t}`)}append(...t){return this.filters.push(...t),this}prepend(...t){return this.filters.unshift(...t),this}indexOf(t){if(!t)throw new Error("a filter name is required");for(let e=0;e<this.filters.length;e++){const i=this.filters[e];if((null==i?void 0:i.filterName)===t)return e}throw new Error(`filter not found: ${t}`)}list(){return this.filters.map((t=>t.filterName))}after(t,...e){const i=this.indexOf(t);return this.filters.splice(i+1,0,...e),this}before(t,...e){const i=this.indexOf(t);return this.filters.splice(i,0,...e),this}replace(t,...e){const i=this.indexOf(t);return this.filters.splice(i,1,...e),this}remove(t){const e=this.indexOf(t);return this.filters.splice(e,1),this}clear(){return this.filters.length=0,this}shouldHaveResult(t){return!1===t?(this.resultCheck=null,this):(this.resultCheck||(this.resultCheck=t=>{if(!t.hasResult){console.log(t);const e=new Error(`${this.name} failed`);throw e.noResult=!0,e}}),this)}}class d{constructor(t){this.selfOptions=t||{},this.pipes={}}options(t){return t&&(this.selfOptions=t),this.selfOptions}pipe(t,e){let i=e;if("string"==typeof t){if(void 0===i)return this.pipes[t];this.pipes[t]=i}if(t&&t.name){if(i=t,i.processor===this)return i;this.pipes[i.name]=i}if(!i)throw new Error(`pipe is not defined: ${t}`);return i.processor=this,i}process(t,e){let i=t;i.options=this.options();let n,r=e||t.pipe||"default";for(;r;)void 0!==i.nextAfterChildren&&(i.next=i.nextAfterChildren,i.nextAfterChildren=null),"string"==typeof r&&(r=this.pipe(r)),r.process(i),n=r,r=null,i&&i.next&&(i=i.next,r=i.pipe||n);return i.hasResult?i.result:void 0}}const p=(t,e,i,n)=>t[i]===e[n];var v=(t,e,i,n)=>{const r=n||{},s=((t,e,i,n)=>{var r,s,o;const l=t.length,c=e.length;let f,u;const h=new Array(l+1);for(f=0;f<l+1;f++){const t=new Array(c+1);for(u=0;u<c+1;u++)t[u]=0;h[f]=t}for(h.match=i,f=1;f<l+1;f++){const l=h[f];if(void 0===l)throw new Error("LCS matrix row is undefined");const a=h[f-1];if(void 0===a)throw new Error("LCS matrix row is undefined");for(u=1;u<c+1;u++)i(t,e,f-1,u-1,n)?l[u]=(null!==(r=a[u-1])&&void 0!==r?r:0)+1:l[u]=Math.max(null!==(s=a[u])&&void 0!==s?s:0,null!==(o=l[u-1])&&void 0!==o?o:0)}return h})(t,e,i||p,r);return((t,e,i,n)=>{let r=e.length,s=i.length;const o={sequence:[],indices1:[],indices2:[]};for(;0!==r&&0!==s;){if(void 0===t.match)throw new Error("LCS matrix match function is undefined");if(t.match(e,i,r-1,s-1,n))o.sequence.unshift(e[r-1]),o.indices1.unshift(r-1),o.indices2.unshift(s-1),--r,--s;else{const e=t[r];if(void 0===e)throw new Error("LCS matrix row is undefined");const i=e[s-1];if(void 0===i)throw new Error("LCS matrix value is undefined");const n=t[r-1];if(void 0===n)throw new Error("LCS matrix row is undefined");const o=n[s];if(void 0===o)throw new Error("LCS matrix value is undefined");i>o?--s:--r}}return o})(s,t,e,r)};function y(t,e,i,n,r){const s=t[i],o=e[n];if(s===o)return!0;if("object"!=typeof s||"object"!=typeof o)return!1;const l=r.objectHash;if(!l)return r.matchByPosition&&i===n;r.hashCache1=r.hashCache1||[];let c=r.hashCache1[i];if(void 0===c&&(r.hashCache1[i]=c=l(s,i)),void 0===c)return!1;r.hashCache2=r.hashCache2||[];let f=r.hashCache2[n];return void 0===f&&(r.hashCache2[n]=f=l(o,n)),void 0!==f&&c===f}const g=function(t){var e,i,n,r,s;if(!t.leftIsArray)return;const o={objectHash:null===(e=t.options)||void 0===e?void 0:e.objectHash,matchByPosition:null===(i=t.options)||void 0===i?void 0:i.matchByPosition};let l,c,u,h=0,a=0;const d=t.left,p=t.right,g=d.length,m=p.length;let x,w;for(g>0&&m>0&&!o.objectHash&&"boolean"!=typeof o.matchByPosition&&(o.matchByPosition=!function(t,e,i,n){for(let r=0;r<i;r++){const i=t[r];for(let t=0;t<n;t++){const n=e[t];if(r!==t&&i===n)return!0}}return!1}(d,p,g,m));h<g&&h<m&&y(d,p,h,h,o);)l=h,x=new f(d[l],p[l]),t.push(x,l),h++;for(;a+h<g&&a+h<m&&y(d,p,g-1-a,m-1-a,o);)c=g-1-a,u=m-1-a,x=new f(d[c],p[u]),t.push(x,u),a++;if(h+a===g){if(g===m)return void t.setResult(void 0).exit();for(w=w||{_t:"a"},l=h;l<m-a;l++)w[l]=[p[l]],t.prepareDeltaResult(w[l]);return void t.setResult(w).exit()}if(h+a===m){for(w=w||{_t:"a"},l=h;l<g-a;l++){const e=`_${l}`;w[e]=[d[l],0,0],t.prepareDeltaResult(w[e])}return void t.setResult(w).exit()}o.hashCache1=void 0,o.hashCache2=void 0;const R=d.slice(h,g-a),b=p.slice(h,m-a),_=v(R,b,y,o),N=[];for(w=w||{_t:"a"},l=h;l<g-a;l++)if(_.indices1.indexOf(l-h)<0){const e=`_${l}`;w[e]=[d[l],0,0],t.prepareDeltaResult(w[e]),N.push(l)}let C=!0;(null===(n=t.options)||void 0===n?void 0:n.arrays)&&!1===t.options.arrays.detectMove&&(C=!1);let A=!1;(null===(s=null===(r=t.options)||void 0===r?void 0:r.arrays)||void 0===s?void 0:s.includeValueOnMove)&&(A=!0);const E=N.length;for(l=h;l<m-a;l++){const e=_.indices2.indexOf(l-h);if(e<0){let e=!1;if(C&&E>0)for(let i=0;i<E;i++){c=N[i];const n=void 0===c?void 0:w[`_${c}`];if(void 0!==c&&n&&y(R,b,c-h,l-h,o)){n.splice(1,2,l,3),n.splice(1,2,l,3),A||(n[0]=""),u=l,x=new f(d[c],p[u]),t.push(x,u),N.splice(i,1),e=!0;break}}e||(w[l]=[p[l]],t.prepareDeltaResult(w[l]))}else{if(void 0===_.indices1[e])throw new Error(`Invalid indexOnArray2: ${e}, seq.indices1: ${_.indices1}`);if(c=_.indices1[e]+h,void 0===_.indices2[e])throw new Error(`Invalid indexOnArray2: ${e}, seq.indices2: ${_.indices2}`);u=_.indices2[e]+h,x=new f(d[c],p[u]),t.push(x,u)}}t.setResult(w).exit()};g.filterName="arrays";const m={numerically:(t,e)=>t-e,numericallyBy:t=>(e,i)=>e[t]-i[t]},x=function(t){var e;if(!t.nested)return;const i=t.delta;if("a"!==i._t)return;let n,r;const s=i,o=t.left;let l=[],c=[];const f=[];for(n in s)if("_t"!==n)if("_"===n[0]){const t=n;if(void 0===s[t]||0!==s[t][2]&&3!==s[t][2])throw new Error(`only removal or move can be applied at original array indices, invalid diff type: ${null===(e=s[t])||void 0===e?void 0:e[2]}`);l.push(Number.parseInt(n.slice(1),10))}else{const t=n;1===s[t].length?c.push({index:Number.parseInt(t,10),value:s[t][0]}):f.push({index:Number.parseInt(t,10),delta:s[t]})}for(l=l.sort(m.numerically),n=l.length-1;n>=0;n--){if(r=l[n],void 0===r)continue;const t=s[`_${r}`],e=o.splice(r,1)[0];3===(null==t?void 0:t[2])&&c.push({index:t[1],value:e})}c=c.sort(m.numericallyBy("index"));const h=c.length;for(n=0;n<h;n++){const t=c[n];void 0!==t&&o.splice(t.index,0,t.value)}const a=f.length;if(a>0)for(n=0;n<a;n++){const e=f[n];if(void 0===e)continue;const i=new u(o[e.index],e.delta);t.push(i,e.index)}t.children?t.exit():t.setResult(o).exit()};x.filterName="arrays";const w=function(t){if(!t||!t.children)return;if("a"!==t.delta._t)return;const e=t.left,i=t.children.length;for(let n=0;n<i;n++){const i=t.children[n];if(void 0===i)continue;e[i.childName]=i.result}t.setResult(e).exit()};w.filterName="arraysCollectChildren";const R=function(t){if(!t.nested){const e=t.delta;if(3===e[2]){const i=e;t.newName=`_${i[1]}`,t.setResult([i[0],Number.parseInt(t.childName.substring(1),10),3]).exit()}return}const e=t.delta;if("a"!==e._t)return;const i=e;for(const e in i){if("_t"===e)continue;const n=new h(i[e]);t.push(n,e)}t.exit()};R.filterName="arrays";const b=(t,e,i)=>{if("string"==typeof e&&"_"===e[0])return Number.parseInt(e.substring(1),10);if(Array.isArray(i)&&0===i[2])return`_${e}`;let n=+e;for(const i in t){const r=t[i];if(Array.isArray(r))if(3===r[2]){const t=Number.parseInt(i.substring(1),10),s=r[1];if(s===+e)return t;t<=n&&s>n?n++:t>=n&&s<n&&n--}else if(0===r[2]){Number.parseInt(i.substring(1),10)<=n&&n++}else 1===r.length&&Number.parseInt(i,10)<=n&&n--}return n},_=t=>{if(!t||!t.children)return;const e=t.delta;if("a"!==e._t)return;const i=e,n=t.children.length,r={_t:"a"};for(let e=0;e<n;e++){const n=t.children[e];if(void 0===n)continue;let s=n.newName;if(void 0===s){if(void 0===n.childName)throw new Error("child.childName is undefined");s=b(i,n.childName,n.result)}r[s]!==n.result&&(r[s]=n.result)}t.setResult(r).exit()};_.filterName="arraysCollectChildren";const N=function(t){t.left instanceof Date?(t.right instanceof Date?t.left.getTime()!==t.right.getTime()?t.setResult([t.left,t.right]):t.setResult(void 0):t.setResult([t.left,t.right]),t.exit()):t.right instanceof Date&&t.setResult([t.left,t.right]).exit()};N.filterName="dates";const C=t=>{if(!t||!t.children)return;const e=t.children.length;let i=t.result;for(let n=0;n<e;n++){const e=t.children[n];if(void 0!==e&&void 0!==e.result){if(i=i||{},void 0===e.childName)throw new Error("diff child.childName is undefined");i[e.childName]=e.result}}i&&t.leftIsArray&&(i._t="a"),t.setResult(i).exit()};C.filterName="collectChildren";const A=t=>{var e;if(t.leftIsArray||"object"!==t.leftType)return;const i=t.left,n=t.right,r=null===(e=t.options)||void 0===e?void 0:e.propertyFilter;for(const e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;if(r&&!r(e,t))continue;const s=new f(i[e],n[e]);t.push(s,e)}for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&(!r||r(e,t))&&void 0===i[e]){const i=new f(void 0,n[e]);t.push(i,e)}t.children&&0!==t.children.length?t.exit():t.setResult(void 0).exit()};A.filterName="objects";const E=function(t){if(!t.nested)return;const e=t.delta;if(e._t)return;const i=e;for(const e in i){const n=new u(t.left[e],i[e]);t.push(n,e)}t.exit()};E.filterName="objects";const j=function(t){if(!t||!t.children)return;if(t.delta._t)return;const e=t.left,i=t.children.length;for(let n=0;n<i;n++){const i=t.children[n];if(void 0===i)continue;const r=i.childName;Object.prototype.hasOwnProperty.call(t.left,r)&&void 0===i.result?delete e[r]:e[r]!==i.result&&(e[r]=i.result)}t.setResult(e).exit()};j.filterName="collectChildren";const O=function(t){if(!t.nested)return;if(t.delta._t)return;const e=t.delta;for(const i in e){const n=new h(e[i]);t.push(n,i)}t.exit()};O.filterName="objects";const $=t=>{if(!t||!t.children)return;if(t.delta._t)return;const e=t.children.length,i={};for(let n=0;n<e;n++){const e=t.children[n];if(void 0===e)continue;const r=e.childName;i[r]!==e.result&&(i[r]=e.result)}t.setResult(i).exit()};$.filterName="collectChildren";let D=null;function I(t,e){var i;if(!D){let n;if(!(null===(i=null==t?void 0:t.textDiff)||void 0===i?void 0:i.diffMatchPatch)){if(!e)return null;const t=new Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");throw t.diff_match_patch_not_found=!0,t}n=new t.textDiff.diffMatchPatch,D={diff:(t,e)=>n.patch_toText(n.patch_make(t,e)),patch:(t,e)=>{const i=n.patch_apply(n.patch_fromText(e),t);for(const t of i[1])if(!t){const t=new Error("text patch failed");throw t.textPatchFailed=!0,t}return i[0]}}}return D}const T=function(t){var e,i;if("string"!==t.leftType)return;const n=t.left,r=t.right,s=(null===(i=null===(e=t.options)||void 0===e?void 0:e.textDiff)||void 0===i?void 0:i.minLength)||60;if(n.length<s||r.length<s)return void t.setResult([n,r]).exit();const o=I(t.options);if(!o)return void t.setResult([n,r]).exit();const l=o.diff;t.setResult([l(n,r),0,2]).exit()};T.filterName="texts";const P=function(t){if(t.nested)return;const e=t.delta;if(2!==e[2])return;const i=e,n=I(t.options,!0).patch;t.setResult(n(t.left,i[0])).exit()};P.filterName="texts";const S=t=>{var e,i,n;const r=/^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/,s=t.split("\n");for(let t=0;t<s.length;t++){const o=s[t];if(void 0===o)continue;const l=o.slice(0,1);if("@"===l){const e=r.exec(o);if(null!==e){s[t]=`@@ -${e[3]},${e[4]} +${e[1]},${e[2]} @@`}}else if("+"===l){if(s[t]=`-${null===(e=s[t])||void 0===e?void 0:e.slice(1)}`,"+"===(null===(i=s[t-1])||void 0===i?void 0:i.slice(0,1))){const e=s[t];s[t]=s[t-1],s[t-1]=e}}else"-"===l&&(s[t]=`+${null===(n=s[t])||void 0===n?void 0:n.slice(1)}`)}return s.join("\n")},k=function(t){if(t.nested)return;const e=t.delta;if(2!==e[2])return;const i=e;t.setResult([S(i[0]),0,2]).exit()};k.filterName="texts";const H=function(t){if(t.left!==t.right)if(void 0!==t.left)if(void 0!==t.right){if("function"==typeof t.left||"function"==typeof t.right)throw new Error("functions are not supported");t.leftType=null===t.left?"null":typeof t.left,t.rightType=null===t.right?"null":typeof t.right,t.leftType===t.rightType&&"boolean"!==t.leftType&&"number"!==t.leftType?("object"===t.leftType&&(t.leftIsArray=Array.isArray(t.left)),"object"===t.rightType&&(t.rightIsArray=Array.isArray(t.right)),t.leftIsArray===t.rightIsArray?t.left instanceof RegExp&&(t.right instanceof RegExp?t.setResult([t.left.toString(),t.right.toString()]).exit():t.setResult([t.left,t.right]).exit()):t.setResult([t.left,t.right]).exit()):t.setResult([t.left,t.right]).exit()}else t.setResult([t.left,0,0]).exit();else{if("function"==typeof t.right)throw new Error("functions are not supported");t.setResult([t.right]).exit()}else t.setResult(void 0).exit()};H.filterName="trivial";const L=function(t){if(void 0===t.delta)return void t.setResult(t.left).exit();if(t.nested=!Array.isArray(t.delta),t.nested)return;const e=t.delta;if(1!==e.length)if(2!==e.length)3===e.length&&0===e[2]&&t.setResult(void 0).exit();else{if(t.left instanceof RegExp){const i=/^\/(.*)\/([gimyu]+)$/.exec(e[1]);if(null==i?void 0:i[1])return void t.setResult(new RegExp(i[1],i[2])).exit()}t.setResult(e[1]).exit()}else t.setResult(e[0]).exit()};L.filterName="trivial";const B=function(t){if(void 0===t.delta)return void t.setResult(t.delta).exit();if(t.nested=!Array.isArray(t.delta),t.nested)return;const e=t.delta;1!==e.length?2!==e.length?3===e.length&&0===e[2]&&t.setResult([e[0]]).exit():t.setResult([e[1],e[0]]).exit():t.setResult([e[0],0,0]).exit()};B.filterName="trivial";class V{constructor(t){this.processor=new d(t),this.processor.pipe(new a("diff").append(C,H,N,T,A,g).shouldHaveResult()),this.processor.pipe(new a("patch").append(j,w,L,P,E,x).shouldHaveResult()),this.processor.pipe(new a("reverse").append($,_,B,k,O,R).shouldHaveResult())}options(t){return this.processor.options(t)}diff(t,e){return this.processor.process(new f(t,e))}patch(t,e){return this.processor.process(new u(t,e))}reverse(t){return this.processor.process(new h(t))}unpatch(t,e){return this.patch(t,this.reverse(e))}clone(t){return l(t)}}function q(t){const e=function(t,e){return e.some((function(e){return function(t,e){return t.$instanceOf(e)}(t,e)}))}(t,["od:OdBoard","od:Object","od:Link"]);if(e)return{element:t,property:""}}function M(){this._layoutChanged={},this._changed={},this._removed={},this._added={}}function F(){}return M.prototype.removed=function(t,e,i,n){let r;(r=q(i))?this._removed[r.element.id]||(this._removed[r.element.id]=i):(r=q(t))&&this.changed(r.element,r.property+e+"["+n+"]",null,i)},M.prototype.changed=function(t,e,i,n){let r;if(r=q(t)){let s=this._changed[r.element.id];s||(s=this._changed[r.element.id]={model:t,attrs:{}}),void 0===n&&void 0===i||(s.attrs[e]={oldValue:n,newValue:i})}},M.prototype.added=function(t,e,i,n){let r;(r=q(i))?this._added[r.element.id]||(this._added[r.element.id]=i):(r=q(t))&&this.changed(r.element,r.property+e+"["+n+"]",i,null)},M.prototype.moved=function(t,e,i,n){},F.prototype.createDiff=function(t,e){return new V({objectHash:function(t){return t.id||JSON.stringify(t)},propertyFilter:function(t,e){return"$instanceOf"!==t}}).diff(t,e)},F.prototype.diff=function(t,e,n){n=n||new M;return function t(e,s){r(e,(function(e,o){var l,c,f;"a"!==e._t&&i(e)&&i(e[0])&&(l=e[0],c=function(t,i,n){return t[(3===e.length?"_":"")+n]=[i],t},f={_t:"a"},r(l,(function(t,e){f=c(f,t,e)})),e=f),"a"===e._t?r(e,(function(e,r){if("_t"===r)return;const l=/^_/.test(r),c=!l&&i(e),f=l&&""===e[0];r=parseInt(l?r.slice(1):r,10),c||l&&!f?n[l?"removed":"added"](s,o,e[0],r):f?n.moved(s,o,e[1],e[2]):t(e,s[o][r])})):i(e)?n.changed(s,o,e[0],e[1]):(n.changed(s,o),t(e,s[o]))}))}(this.createDiff(t,e),e),n},function(t,e,i){return(new F).diff(t,e,i)}}));
package/package.json CHANGED
@@ -1,23 +1,28 @@
1
1
  {
2
2
  "name": "object-diagram-js-differ",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "A semantic diffing utility for object diagram files",
5
5
  "scripts": {
6
- "all": "run-s lint test",
6
+ "all": "run-s lint test build",
7
7
  "lint": "eslint .",
8
8
  "lintFix": "eslint . --fix",
9
9
  "test": "jasmine",
10
- "build": "rollup -c"
10
+ "build": "rollup -c --bundleConfigAsCjs"
11
11
  },
12
- "type": "module",
13
12
  "repository": {
14
13
  "type": "git",
15
14
  "url": "https://github.com/timKraeuter/object-diagram-js-differ"
16
15
  },
17
16
  "main": "dist/index.cjs",
18
17
  "module": "dist/index.esm.js",
19
- "umd:main": "dist/object-diagram-js-differ.umd.cjs",
20
- "source": "lib/index.js",
18
+ "type": "module",
19
+ "exports": {
20
+ ".": {
21
+ "import": "./dist/index.esm.js",
22
+ "require": "./dist/index.cjs"
23
+ },
24
+ "./package.json": "./package.json"
25
+ },
21
26
  "keywords": [
22
27
  "object diagram",
23
28
  "diff"
@@ -29,25 +34,21 @@
29
34
  "license": "MIT",
30
35
  "sideEffects": false,
31
36
  "devDependencies": {
32
- "object-diagram-moddle": "^1.0.1",
33
- "eslint": "^8.54.0",
37
+ "object-diagram-moddle": "^1.0.2",
38
+ "eslint": "^8.57.0",
34
39
  "eslint-plugin-bpmn-io": "^1.0.0",
35
40
  "npm-run-all": "^4.1.5",
36
- "chai": "^4.3.10",
41
+ "chai": "^5.1.0",
37
42
  "jasmine": "^5.1.0",
38
-
39
- "@babel/eslint-parser": "^7.19.1",
40
- "@babel/plugin-syntax-import-assertions": "^7.18.6",
41
- "@rollup/plugin-commonjs": "^22.0.2",
42
- "@rollup/plugin-json": "^4.1.0",
43
- "@rollup/plugin-node-resolve": "^14.1.0",
44
- "acorn-import-assertions": "^1.8.0",
45
- "rollup": "^2.79.1",
46
- "rollup-plugin-terser": "^7.0.2"
43
+ "@babel/eslint-parser": "^7.24.1",
44
+ "@babel/plugin-syntax-import-assertions": "^7.24.1",
45
+ "rollup": "^4.50.2",
46
+ "@rollup/plugin-node-resolve": "^15.2.3",
47
+ "@rollup/plugin-terser": "^0.4.4"
47
48
  },
48
49
  "dependencies": {
49
- "jsondiffpatch": "^0.5.0",
50
- "min-dash": "^3.0.0"
50
+ "jsondiffpatch": "^0.7.3",
51
+ "min-dash": "^4.2.3"
51
52
  },
52
53
  "files": [
53
54
  "dist"