From 9dc182c7bcad56f415fe02ba3330b6735ebb1465 Mon Sep 17 00:00:00 2001 From: lucas cordeiro da Silva Date: Sun, 22 Jan 2023 18:17:54 -0300 Subject: [PATCH] chore: adjust export (#36) --- examples/package.json | 2 +- examples/src/stress.ts | 5 ++++- examples/yarn.lock | 8 ++++---- package.json | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/examples/package.json b/examples/package.json index cf6b972..f658983 100644 --- a/examples/package.json +++ b/examples/package.json @@ -11,7 +11,7 @@ "author": "lukascivil", "license": "MIT", "dependencies": { - "json-difference": "^1.6.0" + "json-difference": "^1.9.0" }, "devDependencies": { "@types/node": "^12.12.12", diff --git a/examples/src/stress.ts b/examples/src/stress.ts index ec34565..363bae1 100644 --- a/examples/src/stress.ts +++ b/examples/src/stress.ts @@ -1,13 +1,16 @@ +// Packages import { getDiff } from 'json-difference' import * as fs from 'fs' import * as path from 'path' +import { Delta } from 'json-difference/dist/models/jsondiffer.model' const oldJson = JSON.parse(fs.readFileSync(path.join(__dirname, './assets/oldJson.json'), 'utf8')) const newJson = JSON.parse(fs.readFileSync(path.join(__dirname, './assets/newJson.json'), 'utf8')) const start: any = new Date() -getDiff(oldJson, newJson) +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const delta: Delta = getDiff(oldJson, newJson) const end: any = new Date() const diffTime = end - start diff --git a/examples/yarn.lock b/examples/yarn.lock index 0d16c7c..45f8bec 100644 --- a/examples/yarn.lock +++ b/examples/yarn.lock @@ -136,10 +136,10 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== -json-difference@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/json-difference/-/json-difference-1.6.0.tgz#f265eee6361b73cc93a78e1a771d1f58c2c50c26" - integrity sha512-qqRNgHQEP86NopFiwwkQ55OB+Vs1BjLPMVmk+LMSDGl+bj3de7PP+eLD+ALUUC1aPyV3ukJiIgTJhmYr05PdPw== +json-difference@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/json-difference/-/json-difference-1.9.0.tgz#735d510e8bfcf6654fc74d3c7f84d14792cac5e9" + integrity sha512-HSo5RX/b+dfMWNbUzSnZ8a71tN9So4TinbDOOr6qAK9iCn6NstLhbMrorhMpmYBw7jrGJqrQI94m8LNqvkmO4Q== minimatch@^3.0.3, minimatch@^3.1.1: version "3.1.2" diff --git a/package.json b/package.json index ffd6a06..11c9375 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "json-difference", - "version": "1.9.0", + "version": "1.9.1", "description": "json diff lib", "license": "MIT", - "main": "dist/core", - "types": "dist/core/index.d.ts", + "main": "dist", + "types": "dist/index.d.ts", "engines": { "node": ">=14.x" },