From f11eb77c14b9c5c7a3d9faa051baa47f5554984e Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 12 Dec 2023 15:09:38 -0600 Subject: [PATCH 1/5] use the deep-equal library instead of the fast-equals library to overcome the principal issue --- package-lock.json | 664 +++++++++++++++++- package.json | 3 +- .../candid/to_src_literal/principal.ts | 3 +- property_tests/arbitraries/canister_arb.ts | 7 +- .../tests/blob/test/generate_tests.ts | 2 +- property_tests/tests/blob/tsconfig.json | 3 +- .../tests/bool/test/generate_tests.ts | 2 +- property_tests/tests/bool/tsconfig.json | 3 +- .../tests/float32/test/generate_tests.ts | 2 +- property_tests/tests/float32/tsconfig.json | 3 +- .../tests/float64/test/generate_tests.ts | 2 +- property_tests/tests/float64/tsconfig.json | 3 +- .../tests/func/test/generate_tests.ts | 2 +- property_tests/tests/func/tsconfig.json | 3 +- .../tests/int/test/generate_tests.ts | 2 +- property_tests/tests/int/tsconfig.json | 3 +- .../tests/int16/test/generate_tests.ts | 2 +- property_tests/tests/int16/tsconfig.json | 3 +- .../tests/int32/test/generate_tests.ts | 2 +- property_tests/tests/int32/tsconfig.json | 3 +- .../tests/int64/test/generate_tests.ts | 2 +- property_tests/tests/int64/tsconfig.json | 3 +- .../tests/int8/test/generate_tests.ts | 2 +- property_tests/tests/int8/tsconfig.json | 3 +- .../tests/nat/test/generate_tests.ts | 2 +- property_tests/tests/nat/tsconfig.json | 3 +- .../tests/nat16/test/generate_tests.ts | 2 +- property_tests/tests/nat16/tsconfig.json | 3 +- .../tests/nat32/test/generate_tests.ts | 2 +- property_tests/tests/nat32/tsconfig.json | 3 +- .../tests/nat64/test/generate_tests.ts | 2 +- property_tests/tests/nat64/tsconfig.json | 3 +- .../tests/nat8/test/generate_tests.ts | 2 +- property_tests/tests/nat8/tsconfig.json | 3 +- .../tests/null/test/generate_tests.ts | 2 +- property_tests/tests/null/tsconfig.json | 3 +- .../tests/opt/test/generate_tests.ts | 2 +- property_tests/tests/opt/tsconfig.json | 3 +- .../tests/principal/test/generate_tests.ts | 2 +- property_tests/tests/principal/tsconfig.json | 3 +- .../query_methods/test/generate_tests.ts | 2 +- .../tests/query_methods/tsconfig.json | 3 +- .../tests/record/test/generate_tests.ts | 2 +- property_tests/tests/record/tsconfig.json | 3 +- property_tests/tests/service/tsconfig.json | 3 +- .../stable_b_tree_map/test/contains_key.ts | 2 +- .../tests/stable_b_tree_map/test/get.ts | 2 +- .../tests/stable_b_tree_map/test/insert.ts | 2 +- .../tests/stable_b_tree_map/test/is_empty.ts | 2 +- .../tests/stable_b_tree_map/test/items.ts | 2 +- .../tests/stable_b_tree_map/test/keys.ts | 2 +- .../tests/stable_b_tree_map/test/len.ts | 2 +- .../tests/stable_b_tree_map/test/remove.ts | 2 +- .../tests/stable_b_tree_map/test/values.ts | 2 +- .../tests/stable_b_tree_map/tsconfig.json | 3 +- .../tests/text/test/generate_tests.ts | 2 +- property_tests/tests/text/tsconfig.json | 3 +- .../tests/tuple/test/generate_tests.ts | 2 +- property_tests/tests/tuple/tsconfig.json | 3 +- .../update_methods/test/generate_tests.ts | 2 +- .../tests/update_methods/tsconfig.json | 3 +- .../tests/variant/test/generate_tests.ts | 2 +- property_tests/tests/variant/tsconfig.json | 3 +- .../tests/vec/test/generate_tests.ts | 2 +- property_tests/tests/vec/tsconfig.json | 3 +- 65 files changed, 746 insertions(+), 80 deletions(-) diff --git a/package-lock.json b/package-lock.json index 201a45609b..436f4e48a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,11 +27,12 @@ }, "devDependencies": { "@dfinity/agent": "^0.19.2", + "@types/deep-equal": "^1.0.4", "@types/fs-extra": "9.0.13", + "deep-equal": "^2.2.3", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", "fast-check": "^3.13.1", - "fast-equals": "5.0.1", "husky": "7.0.4", "lint-staged": "12.3.7", "prettier": "^3.0.3" @@ -698,6 +699,12 @@ "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" }, + "node_modules/@types/deep-equal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/deep-equal/-/deep-equal-1.0.4.tgz", + "integrity": "sha512-tqdiS4otQP4KmY0PR3u6KbZ5EWvhNdUoS/jc93UuK23C220lOZ/9TvjfxdPcKvqwwDVtmtSCrnr0p/2dirAxkA==", + "dev": true + }, "node_modules/@types/fs-extra": { "version": "9.0.13", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", @@ -839,6 +846,19 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -848,6 +868,18 @@ "node": ">=8" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -984,6 +1016,20 @@ "ieee754": "^1.2.1" } }, + "node_modules/call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1121,12 +1167,75 @@ } } }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delimit-stream": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", @@ -1165,6 +1274,26 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/esbuild": { "version": "0.19.4", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", @@ -1442,15 +1571,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, - "node_modules/fast-equals": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", - "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1507,6 +1627,15 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/fs-extra": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", @@ -1526,12 +1655,45 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -1591,11 +1753,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1605,6 +1788,69 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -1707,6 +1953,105 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/internal-slot": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1740,6 +2085,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -1749,6 +2103,58 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1761,6 +2167,79 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2162,6 +2641,49 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2335,6 +2857,23 @@ "node": ">= 6" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -2419,6 +2958,35 @@ } ] }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -2440,6 +3008,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -2480,6 +3062,18 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -2760,6 +3354,56 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dev": true, + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 85581d6e8f..45e7ffdb9b 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,12 @@ }, "devDependencies": { "@dfinity/agent": "^0.19.2", + "@types/deep-equal": "^1.0.4", "@types/fs-extra": "9.0.13", + "deep-equal": "^2.2.3", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", "fast-check": "^3.13.1", - "fast-equals": "5.0.1", "husky": "7.0.4", "lint-staged": "12.3.7", "prettier": "^3.0.3" diff --git a/property_tests/arbitraries/candid/to_src_literal/principal.ts b/property_tests/arbitraries/candid/to_src_literal/principal.ts index d4aa6e47ee..2cc2cc61b4 100644 --- a/property_tests/arbitraries/candid/to_src_literal/principal.ts +++ b/property_tests/arbitraries/candid/to_src_literal/principal.ts @@ -1,6 +1,5 @@ import { Principal } from '@dfinity/principal'; export function principalToSrcLiteral(value: Principal): string { - // TODO solve the underlying principal problem https://github.com/demergent-labs/azle/issues/1443 - return `DfinityPrincipal.fromText('${value.toText()}')`; + return `Principal.fromText('${value.toText()}')`; } diff --git a/property_tests/arbitraries/canister_arb.ts b/property_tests/arbitraries/canister_arb.ts index b3532d3c92..22c4d12ab7 100644 --- a/property_tests/arbitraries/canister_arb.ts +++ b/property_tests/arbitraries/canister_arb.ts @@ -85,12 +85,7 @@ function generateSourceCode( return /*TS*/ ` import { ${imports} } from 'azle'; - import { deepEqual } from 'fast-equals'; - // import * as deepEqual from 'fast-deep-equal'; - // TODO solve the underlying principal problem https://github.com/demergent-labs/azle/issues/1443 - // import { Principal as DfinityPrincipal } from '@dfinity/principal'; - // import { Principal as DfinityPrincipal } from 'azle'; - import { DfinityPrincipal } from 'azle'; + import deepEqual from 'deep-equal'; ${declarations} diff --git a/property_tests/tests/blob/test/generate_tests.ts b/property_tests/tests/blob/test/generate_tests.ts index dbf66c6fcd..1cf676c261 100644 --- a/property_tests/tests/blob/test/generate_tests.ts +++ b/property_tests/tests/blob/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/blob/tsconfig.json b/property_tests/tests/blob/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/blob/tsconfig.json +++ b/property_tests/tests/blob/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/bool/test/generate_tests.ts b/property_tests/tests/bool/test/generate_tests.ts index 84ac5808e5..61fac35f18 100644 --- a/property_tests/tests/bool/test/generate_tests.ts +++ b/property_tests/tests/bool/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/bool/tsconfig.json b/property_tests/tests/bool/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/bool/tsconfig.json +++ b/property_tests/tests/bool/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/float32/test/generate_tests.ts b/property_tests/tests/float32/test/generate_tests.ts index 61495c2ef5..24d7ca49ba 100644 --- a/property_tests/tests/float32/test/generate_tests.ts +++ b/property_tests/tests/float32/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/float32/tsconfig.json b/property_tests/tests/float32/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/float32/tsconfig.json +++ b/property_tests/tests/float32/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/float64/test/generate_tests.ts b/property_tests/tests/float64/test/generate_tests.ts index f2201db6e8..12f1b193e0 100644 --- a/property_tests/tests/float64/test/generate_tests.ts +++ b/property_tests/tests/float64/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/float64/tsconfig.json b/property_tests/tests/float64/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/float64/tsconfig.json +++ b/property_tests/tests/float64/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/func/test/generate_tests.ts b/property_tests/tests/func/test/generate_tests.ts index 220e7b3160..38fd790309 100644 --- a/property_tests/tests/func/test/generate_tests.ts +++ b/property_tests/tests/func/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/func/tsconfig.json b/property_tests/tests/func/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/func/tsconfig.json +++ b/property_tests/tests/func/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/int/test/generate_tests.ts b/property_tests/tests/int/test/generate_tests.ts index 22924c3547..596c897295 100644 --- a/property_tests/tests/int/test/generate_tests.ts +++ b/property_tests/tests/int/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int/tsconfig.json b/property_tests/tests/int/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/int/tsconfig.json +++ b/property_tests/tests/int/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/int16/test/generate_tests.ts b/property_tests/tests/int16/test/generate_tests.ts index 073a7e32dd..8530987669 100644 --- a/property_tests/tests/int16/test/generate_tests.ts +++ b/property_tests/tests/int16/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int16/tsconfig.json b/property_tests/tests/int16/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/int16/tsconfig.json +++ b/property_tests/tests/int16/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/int32/test/generate_tests.ts b/property_tests/tests/int32/test/generate_tests.ts index e428574b06..6374cdbc69 100644 --- a/property_tests/tests/int32/test/generate_tests.ts +++ b/property_tests/tests/int32/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int32/tsconfig.json b/property_tests/tests/int32/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/int32/tsconfig.json +++ b/property_tests/tests/int32/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/int64/test/generate_tests.ts b/property_tests/tests/int64/test/generate_tests.ts index 3a40e1a824..c971cf7859 100644 --- a/property_tests/tests/int64/test/generate_tests.ts +++ b/property_tests/tests/int64/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int64/tsconfig.json b/property_tests/tests/int64/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/int64/tsconfig.json +++ b/property_tests/tests/int64/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/int8/test/generate_tests.ts b/property_tests/tests/int8/test/generate_tests.ts index 983824f945..10388996e5 100644 --- a/property_tests/tests/int8/test/generate_tests.ts +++ b/property_tests/tests/int8/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int8/tsconfig.json b/property_tests/tests/int8/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/int8/tsconfig.json +++ b/property_tests/tests/int8/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/nat/test/generate_tests.ts b/property_tests/tests/nat/test/generate_tests.ts index eea8d21799..ac2c5e902b 100644 --- a/property_tests/tests/nat/test/generate_tests.ts +++ b/property_tests/tests/nat/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat/tsconfig.json b/property_tests/tests/nat/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/nat/tsconfig.json +++ b/property_tests/tests/nat/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/nat16/test/generate_tests.ts b/property_tests/tests/nat16/test/generate_tests.ts index 865580a581..14e2062e67 100644 --- a/property_tests/tests/nat16/test/generate_tests.ts +++ b/property_tests/tests/nat16/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat16/tsconfig.json b/property_tests/tests/nat16/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/nat16/tsconfig.json +++ b/property_tests/tests/nat16/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/nat32/test/generate_tests.ts b/property_tests/tests/nat32/test/generate_tests.ts index 79a01ef816..92aca97d03 100644 --- a/property_tests/tests/nat32/test/generate_tests.ts +++ b/property_tests/tests/nat32/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat32/tsconfig.json b/property_tests/tests/nat32/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/nat32/tsconfig.json +++ b/property_tests/tests/nat32/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/nat64/test/generate_tests.ts b/property_tests/tests/nat64/test/generate_tests.ts index 9619a7371a..c7fc4f305e 100644 --- a/property_tests/tests/nat64/test/generate_tests.ts +++ b/property_tests/tests/nat64/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat64/tsconfig.json b/property_tests/tests/nat64/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/nat64/tsconfig.json +++ b/property_tests/tests/nat64/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/nat8/test/generate_tests.ts b/property_tests/tests/nat8/test/generate_tests.ts index 0ca53456f9..5fcce12c6e 100644 --- a/property_tests/tests/nat8/test/generate_tests.ts +++ b/property_tests/tests/nat8/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat8/tsconfig.json b/property_tests/tests/nat8/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/nat8/tsconfig.json +++ b/property_tests/tests/nat8/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/null/test/generate_tests.ts b/property_tests/tests/null/test/generate_tests.ts index db0de4eb3b..e107d5761d 100644 --- a/property_tests/tests/null/test/generate_tests.ts +++ b/property_tests/tests/null/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/null/tsconfig.json b/property_tests/tests/null/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/null/tsconfig.json +++ b/property_tests/tests/null/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/opt/test/generate_tests.ts b/property_tests/tests/opt/test/generate_tests.ts index 6056258284..b6b46fdaee 100644 --- a/property_tests/tests/opt/test/generate_tests.ts +++ b/property_tests/tests/opt/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/opt/tsconfig.json b/property_tests/tests/opt/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/opt/tsconfig.json +++ b/property_tests/tests/opt/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/principal/test/generate_tests.ts b/property_tests/tests/principal/test/generate_tests.ts index 80c7e259f9..2cd7ffe0b2 100644 --- a/property_tests/tests/principal/test/generate_tests.ts +++ b/property_tests/tests/principal/test/generate_tests.ts @@ -1,5 +1,5 @@ import { Principal } from '@dfinity/principal'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/principal/tsconfig.json b/property_tests/tests/principal/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/principal/tsconfig.json +++ b/property_tests/tests/principal/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/query_methods/test/generate_tests.ts b/property_tests/tests/query_methods/test/generate_tests.ts index dfd9d9de49..aa6525c60d 100644 --- a/property_tests/tests/query_methods/test/generate_tests.ts +++ b/property_tests/tests/query_methods/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CorrespondingJSType } from 'azle/property_tests/arbitraries/candid/corresponding_js_type'; diff --git a/property_tests/tests/query_methods/tsconfig.json b/property_tests/tests/query_methods/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/query_methods/tsconfig.json +++ b/property_tests/tests/query_methods/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/record/test/generate_tests.ts b/property_tests/tests/record/test/generate_tests.ts index bb58af7d8b..423a63bc69 100644 --- a/property_tests/tests/record/test/generate_tests.ts +++ b/property_tests/tests/record/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/record/tsconfig.json b/property_tests/tests/record/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/record/tsconfig.json +++ b/property_tests/tests/record/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/service/tsconfig.json b/property_tests/tests/service/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/service/tsconfig.json +++ b/property_tests/tests/service/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/stable_b_tree_map/test/contains_key.ts b/property_tests/tests/stable_b_tree_map/test/contains_key.ts index d2a7a8c30b..65ac471340 100644 --- a/property_tests/tests/stable_b_tree_map/test/contains_key.ts +++ b/property_tests/tests/stable_b_tree_map/test/contains_key.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor } from 'azle/property_tests'; import { Test } from 'azle/test'; diff --git a/property_tests/tests/stable_b_tree_map/test/get.ts b/property_tests/tests/stable_b_tree_map/test/get.ts index 373977d2f9..27a91cf5e9 100644 --- a/property_tests/tests/stable_b_tree_map/test/get.ts +++ b/property_tests/tests/stable_b_tree_map/test/get.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/insert.ts b/property_tests/tests/stable_b_tree_map/test/insert.ts index d7518ebbde..075fe4d996 100644 --- a/property_tests/tests/stable_b_tree_map/test/insert.ts +++ b/property_tests/tests/stable_b_tree_map/test/insert.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/is_empty.ts b/property_tests/tests/stable_b_tree_map/test/is_empty.ts index 104d0c3bbb..e2e7618712 100644 --- a/property_tests/tests/stable_b_tree_map/test/is_empty.ts +++ b/property_tests/tests/stable_b_tree_map/test/is_empty.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/items.ts b/property_tests/tests/stable_b_tree_map/test/items.ts index e91c5688a0..a60defc68a 100644 --- a/property_tests/tests/stable_b_tree_map/test/items.ts +++ b/property_tests/tests/stable_b_tree_map/test/items.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/keys.ts b/property_tests/tests/stable_b_tree_map/test/keys.ts index a9749d6558..07e47711ca 100644 --- a/property_tests/tests/stable_b_tree_map/test/keys.ts +++ b/property_tests/tests/stable_b_tree_map/test/keys.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/len.ts b/property_tests/tests/stable_b_tree_map/test/len.ts index e2faacb5d1..d5e28ddd6b 100644 --- a/property_tests/tests/stable_b_tree_map/test/len.ts +++ b/property_tests/tests/stable_b_tree_map/test/len.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/remove.ts b/property_tests/tests/stable_b_tree_map/test/remove.ts index 0880257db7..8d3bf53a98 100644 --- a/property_tests/tests/stable_b_tree_map/test/remove.ts +++ b/property_tests/tests/stable_b_tree_map/test/remove.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/values.ts b/property_tests/tests/stable_b_tree_map/test/values.ts index 54b9de3515..f20f2c42da 100644 --- a/property_tests/tests/stable_b_tree_map/test/values.ts +++ b/property_tests/tests/stable_b_tree_map/test/values.ts @@ -1,5 +1,5 @@ import fc from 'fast-check'; -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/tsconfig.json b/property_tests/tests/stable_b_tree_map/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/stable_b_tree_map/tsconfig.json +++ b/property_tests/tests/stable_b_tree_map/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/text/test/generate_tests.ts b/property_tests/tests/text/test/generate_tests.ts index fc1d212406..9c6647b43c 100644 --- a/property_tests/tests/text/test/generate_tests.ts +++ b/property_tests/tests/text/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/text/tsconfig.json b/property_tests/tests/text/tsconfig.json index 1c863e7a5f..17e4bcea23 100644 --- a/property_tests/tests/text/tsconfig.json +++ b/property_tests/tests/text/tsconfig.json @@ -5,6 +5,7 @@ "module": "CommonJS", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/tuple/test/generate_tests.ts b/property_tests/tests/tuple/test/generate_tests.ts index 98aca6793f..2acb80c796 100644 --- a/property_tests/tests/tuple/test/generate_tests.ts +++ b/property_tests/tests/tuple/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/tuple/tsconfig.json b/property_tests/tests/tuple/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/tuple/tsconfig.json +++ b/property_tests/tests/tuple/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/update_methods/test/generate_tests.ts b/property_tests/tests/update_methods/test/generate_tests.ts index 791ac1f732..39eaebe5d4 100644 --- a/property_tests/tests/update_methods/test/generate_tests.ts +++ b/property_tests/tests/update_methods/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { Named, getActor } from 'azle/property_tests'; import { Test } from 'azle/test'; diff --git a/property_tests/tests/update_methods/tsconfig.json b/property_tests/tests/update_methods/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/update_methods/tsconfig.json +++ b/property_tests/tests/update_methods/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/variant/test/generate_tests.ts b/property_tests/tests/variant/test/generate_tests.ts index 3c6a78dabc..7c44d1e800 100644 --- a/property_tests/tests/variant/test/generate_tests.ts +++ b/property_tests/tests/variant/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/variant/tsconfig.json b/property_tests/tests/variant/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/variant/tsconfig.json +++ b/property_tests/tests/variant/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } diff --git a/property_tests/tests/vec/test/generate_tests.ts b/property_tests/tests/vec/test/generate_tests.ts index cb43ee8fd0..2a98c8775a 100644 --- a/property_tests/tests/vec/test/generate_tests.ts +++ b/property_tests/tests/vec/test/generate_tests.ts @@ -1,4 +1,4 @@ -import { deepEqual } from 'fast-equals'; +import deepEqual from 'deep-equal'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/vec/tsconfig.json b/property_tests/tests/vec/tsconfig.json index 2638f0d8bc..d20bea88d9 100644 --- a/property_tests/tests/vec/tsconfig.json +++ b/property_tests/tests/vec/tsconfig.json @@ -4,6 +4,7 @@ "target": "ES2020", "moduleResolution": "node", "allowJs": true, - "outDir": "HACK_BECAUSE_OF_ALLOW_JS" + "outDir": "HACK_BECAUSE_OF_ALLOW_JS", + "esModuleInterop": true } } From b47ac2920735f98a8019595a5588495c66d7863e Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 12 Dec 2023 15:42:50 -0600 Subject: [PATCH 2/5] reverting IDL and Principal imports --- src/lib/candid/candid_type.ts | 2 +- src/lib/candid/did_file/visitor/did_visitor.ts | 2 +- src/lib/candid/did_file/visitor/visit/func.ts | 2 +- src/lib/candid/did_file/visitor/visit/opt.ts | 2 +- src/lib/candid/did_file/visitor/visit/primitive.ts | 2 +- src/lib/candid/did_file/visitor/visit/record.ts | 2 +- src/lib/candid/did_file/visitor/visit/recursive.ts | 2 +- src/lib/candid/did_file/visitor/visit/service.ts | 2 +- src/lib/candid/did_file/visitor/visit/tuple.ts | 2 +- src/lib/candid/did_file/visitor/visit/variant.ts | 2 +- src/lib/candid/did_file/visitor/visit/vec.ts | 2 +- src/lib/candid/recursive.ts | 2 +- src/lib/candid/serde/decode.ts | 2 +- src/lib/candid/serde/encode.ts | 2 +- src/lib/candid/serde/visitors/decode_visitor.ts | 2 +- src/lib/candid/serde/visitors/encode_visitor.ts | 2 +- src/lib/candid/serde/visitors/visit/record.ts | 2 +- src/lib/candid/serde/visitors/visit/recursive.ts | 2 +- src/lib/candid/serde/visitors/visit/tuple.ts | 2 +- src/lib/candid/serde/visitors/visit/variant/azle_result.ts | 2 +- src/lib/candid/serde/visitors/visit/variant/azle_variant.ts | 2 +- src/lib/candid/serde/visitors/visit/variant/index.ts | 2 +- src/lib/candid/serde/visitors/visit/vec.ts | 2 +- src/lib/candid/to_idl.ts | 2 +- src/lib/candid/types/constructed/blob.ts | 2 +- src/lib/candid/types/constructed/opt.ts | 2 +- src/lib/candid/types/constructed/record.ts | 2 +- src/lib/candid/types/constructed/to_idl_map.ts | 2 +- src/lib/candid/types/constructed/tuple.ts | 2 +- src/lib/candid/types/constructed/variant.ts | 2 +- src/lib/candid/types/constructed/vec.ts | 2 +- src/lib/candid/types/primitive/bool.ts | 2 +- src/lib/candid/types/primitive/empty.ts | 2 +- src/lib/candid/types/primitive/floats/float32.ts | 2 +- src/lib/candid/types/primitive/floats/float64.ts | 2 +- src/lib/candid/types/primitive/ints/int.ts | 2 +- src/lib/candid/types/primitive/ints/int16.ts | 2 +- src/lib/candid/types/primitive/ints/int32.ts | 2 +- src/lib/candid/types/primitive/ints/int64.ts | 2 +- src/lib/candid/types/primitive/ints/int8.ts | 2 +- src/lib/candid/types/primitive/nats/nat.ts | 2 +- src/lib/candid/types/primitive/nats/nat16.ts | 2 +- src/lib/candid/types/primitive/nats/nat32.ts | 2 +- src/lib/candid/types/primitive/nats/nat64.ts | 2 +- src/lib/candid/types/primitive/nats/nat8.ts | 2 +- src/lib/candid/types/primitive/null.ts | 2 +- src/lib/candid/types/primitive/reserved.ts | 2 +- src/lib/candid/types/primitive/text.ts | 2 +- src/lib/candid/types/primitive/void.ts | 2 +- src/lib/candid/types/reference/func.ts | 2 +- src/lib/candid/types/reference/principal.ts | 4 ++-- .../candid/types/reference/service/canister_function/index.ts | 2 +- .../reference/service/canister_function/system_methods.ts | 2 +- src/lib/idl_export.ts | 1 - src/lib/index.ts | 3 --- src/lib/principal_export.ts | 1 - src/lib/system_types/result.ts | 2 +- 57 files changed, 55 insertions(+), 60 deletions(-) delete mode 100644 src/lib/idl_export.ts delete mode 100644 src/lib/principal_export.ts diff --git a/src/lib/candid/candid_type.ts b/src/lib/candid/candid_type.ts index 79b88973f7..bfbba94d8f 100644 --- a/src/lib/candid/candid_type.ts +++ b/src/lib/candid/candid_type.ts @@ -1,4 +1,4 @@ -import { IDL } from '../idl_export'; +import { IDL } from '@dfinity/candid'; import { Parent } from './to_idl'; export interface CandidType { diff --git a/src/lib/candid/did_file/visitor/did_visitor.ts b/src/lib/candid/did_file/visitor/did_visitor.ts index 30043171c0..509461b95d 100644 --- a/src/lib/candid/did_file/visitor/did_visitor.ts +++ b/src/lib/candid/did_file/visitor/did_visitor.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { visitService } from './visit/service'; import { visitVariant } from './visit/variant'; import { visitRecord } from './visit/record'; diff --git a/src/lib/candid/did_file/visitor/visit/func.ts b/src/lib/candid/did_file/visitor/visit/func.ts index fedfba395a..328f9e1a5c 100644 --- a/src/lib/candid/did_file/visitor/visit/func.ts +++ b/src/lib/candid/did_file/visitor/visit/func.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { extractCandid } from '../extract_candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; diff --git a/src/lib/candid/did_file/visitor/visit/opt.ts b/src/lib/candid/did_file/visitor/visit/opt.ts index 05a206969c..d00a005de8 100644 --- a/src/lib/candid/did_file/visitor/visit/opt.ts +++ b/src/lib/candid/did_file/visitor/visit/opt.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; export function visitOpt( diff --git a/src/lib/candid/did_file/visitor/visit/primitive.ts b/src/lib/candid/did_file/visitor/visit/primitive.ts index dbfbd01878..f257b9ced2 100644 --- a/src/lib/candid/did_file/visitor/visit/primitive.ts +++ b/src/lib/candid/did_file/visitor/visit/primitive.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { VisitorResult } from '../did_visitor'; export function visitPrimitive(t: IDL.PrimitiveType): VisitorResult { diff --git a/src/lib/candid/did_file/visitor/visit/record.ts b/src/lib/candid/did_file/visitor/visit/record.ts index 1ed4758110..066ab942fe 100644 --- a/src/lib/candid/did_file/visitor/visit/record.ts +++ b/src/lib/candid/did_file/visitor/visit/record.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; import { escapeCandidKeywords } from '../escape_candid_keywords'; import { extractCandid } from '../extract_candid'; diff --git a/src/lib/candid/did_file/visitor/visit/recursive.ts b/src/lib/candid/did_file/visitor/visit/recursive.ts index 9adddc33a8..d28fc1162e 100644 --- a/src/lib/candid/did_file/visitor/visit/recursive.ts +++ b/src/lib/candid/did_file/visitor/visit/recursive.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; export function visitRecursive( diff --git a/src/lib/candid/did_file/visitor/visit/service.ts b/src/lib/candid/did_file/visitor/visit/service.ts index 48bb0eeca5..d1f9fb1a52 100644 --- a/src/lib/candid/did_file/visitor/visit/service.ts +++ b/src/lib/candid/did_file/visitor/visit/service.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { CandidDef, CandidTypesDefs, diff --git a/src/lib/candid/did_file/visitor/visit/tuple.ts b/src/lib/candid/did_file/visitor/visit/tuple.ts index 2e0285fe3c..bcf284f291 100644 --- a/src/lib/candid/did_file/visitor/visit/tuple.ts +++ b/src/lib/candid/did_file/visitor/visit/tuple.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; import { extractCandid } from '../extract_candid'; diff --git a/src/lib/candid/did_file/visitor/visit/variant.ts b/src/lib/candid/did_file/visitor/visit/variant.ts index 4da4e834af..8abb824244 100644 --- a/src/lib/candid/did_file/visitor/visit/variant.ts +++ b/src/lib/candid/did_file/visitor/visit/variant.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; import { escapeCandidKeywords } from '../escape_candid_keywords'; import { extractCandid } from '../extract_candid'; diff --git a/src/lib/candid/did_file/visitor/visit/vec.ts b/src/lib/candid/did_file/visitor/visit/vec.ts index 4727d17948..34b9ef3020 100644 --- a/src/lib/candid/did_file/visitor/visit/vec.ts +++ b/src/lib/candid/did_file/visitor/visit/vec.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { DidVisitor, VisitorData, VisitorResult } from '../did_visitor'; export function visitVec( diff --git a/src/lib/candid/recursive.ts b/src/lib/candid/recursive.ts index 6a3fd15c9c..9e59bee051 100644 --- a/src/lib/candid/recursive.ts +++ b/src/lib/candid/recursive.ts @@ -1,5 +1,5 @@ import { v4 } from 'uuid'; -import { IDL } from '../idl_export'; +import { IDL } from '@dfinity/candid'; import { CandidType, Parent } from './index'; export type _AzleRecursiveFunction = { diff --git a/src/lib/candid/serde/decode.ts b/src/lib/candid/serde/decode.ts index 2ce030b9af..d5496078d2 100644 --- a/src/lib/candid/serde/decode.ts +++ b/src/lib/candid/serde/decode.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../idl_export'; +import { IDL } from '@dfinity/candid'; import { AzleVec, AzleOpt, AzleTuple } from '../types/constructed'; import { DecodeVisitor } from './visitors/decode_visitor'; diff --git a/src/lib/candid/serde/encode.ts b/src/lib/candid/serde/encode.ts index 4427d35b42..3423e5873d 100644 --- a/src/lib/candid/serde/encode.ts +++ b/src/lib/candid/serde/encode.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../idl_export'; +import { IDL } from '@dfinity/candid'; import { AzleVec, AzleOpt, AzleTuple } from '../types/constructed'; import { EncodeVisitor } from './visitors/encode_visitor'; diff --git a/src/lib/candid/serde/visitors/decode_visitor.ts b/src/lib/candid/serde/visitors/decode_visitor.ts index d300d08e6d..9da00466c5 100644 --- a/src/lib/candid/serde/visitors/decode_visitor.ts +++ b/src/lib/candid/serde/visitors/decode_visitor.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { Opt } from '../../types/constructed'; import { VisitorData, VisitorResult } from './types'; import { visitRecord } from './visit/record'; diff --git a/src/lib/candid/serde/visitors/encode_visitor.ts b/src/lib/candid/serde/visitors/encode_visitor.ts index 8856d07e72..70c38dc5a6 100644 --- a/src/lib/candid/serde/visitors/encode_visitor.ts +++ b/src/lib/candid/serde/visitors/encode_visitor.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { VisitorData, VisitorResult } from './types'; import { visitTuple } from './visit/tuple'; import { visitVec } from './visit/vec'; diff --git a/src/lib/candid/serde/visitors/visit/record.ts b/src/lib/candid/serde/visitors/visit/record.ts index 68aaaac764..641d29e05c 100644 --- a/src/lib/candid/serde/visitors/visit/record.ts +++ b/src/lib/candid/serde/visitors/visit/record.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../encode_visitor'; import { DecodeVisitor } from '../decode_visitor'; import { VisitorData, VisitorResult } from '../types'; diff --git a/src/lib/candid/serde/visitors/visit/recursive.ts b/src/lib/candid/serde/visitors/visit/recursive.ts index 71a7eb9a78..bd15bbef7a 100644 --- a/src/lib/candid/serde/visitors/visit/recursive.ts +++ b/src/lib/candid/serde/visitors/visit/recursive.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../encode_visitor'; import { DecodeVisitor } from '../decode_visitor'; import { VisitorData, VisitorResult } from '../types'; diff --git a/src/lib/candid/serde/visitors/visit/tuple.ts b/src/lib/candid/serde/visitors/visit/tuple.ts index 0d8ad538d7..f899a89f8b 100644 --- a/src/lib/candid/serde/visitors/visit/tuple.ts +++ b/src/lib/candid/serde/visitors/visit/tuple.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../encode_visitor'; import { DecodeVisitor } from '../decode_visitor'; import { VisitorData, VisitorResult } from '../types'; diff --git a/src/lib/candid/serde/visitors/visit/variant/azle_result.ts b/src/lib/candid/serde/visitors/visit/variant/azle_result.ts index 23572f16b8..186c94adca 100644 --- a/src/lib/candid/serde/visitors/visit/variant/azle_result.ts +++ b/src/lib/candid/serde/visitors/visit/variant/azle_result.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../../encode_visitor'; import { DecodeVisitor } from '../../decode_visitor'; import { VisitorData } from '../../types'; diff --git a/src/lib/candid/serde/visitors/visit/variant/azle_variant.ts b/src/lib/candid/serde/visitors/visit/variant/azle_variant.ts index dce13932b9..aa4ef196d1 100644 --- a/src/lib/candid/serde/visitors/visit/variant/azle_variant.ts +++ b/src/lib/candid/serde/visitors/visit/variant/azle_variant.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../../encode_visitor'; import { DecodeVisitor } from '../../decode_visitor'; import { VisitorData } from '../../types'; diff --git a/src/lib/candid/serde/visitors/visit/variant/index.ts b/src/lib/candid/serde/visitors/visit/variant/index.ts index 21186ac9b3..26818ae4d3 100644 --- a/src/lib/candid/serde/visitors/visit/variant/index.ts +++ b/src/lib/candid/serde/visitors/visit/variant/index.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../../encode_visitor'; import { AzleResult } from '../../../../../system_types'; import { DecodeVisitor } from '../../decode_visitor'; diff --git a/src/lib/candid/serde/visitors/visit/vec.ts b/src/lib/candid/serde/visitors/visit/vec.ts index d40077575c..44b600ef96 100644 --- a/src/lib/candid/serde/visitors/visit/vec.ts +++ b/src/lib/candid/serde/visitors/visit/vec.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { EncodeVisitor } from '../encode_visitor'; import { DecodeVisitor } from '../decode_visitor'; import { VisitorData, VisitorResult } from '../types'; diff --git a/src/lib/candid/to_idl.ts b/src/lib/candid/to_idl.ts index 7a9856217e..a61e01d0dc 100644 --- a/src/lib/candid/to_idl.ts +++ b/src/lib/candid/to_idl.ts @@ -1,4 +1,4 @@ -import { IDL } from '../idl_export'; +import { IDL } from '@dfinity/candid'; import { CandidType } from './candid_type'; export type Parent = { diff --git a/src/lib/candid/types/constructed/blob.ts b/src/lib/candid/types/constructed/blob.ts index cf7fec7491..2736eba2f0 100644 --- a/src/lib/candid/types/constructed/blob.ts +++ b/src/lib/candid/types/constructed/blob.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/constructed/opt.ts b/src/lib/candid/types/constructed/opt.ts index 82e414af77..f7d71e4a1f 100644 --- a/src/lib/candid/types/constructed/opt.ts +++ b/src/lib/candid/types/constructed/opt.ts @@ -4,7 +4,7 @@ import { encode } from '../../serde/encode'; import { Parent, toIdl } from '../../to_idl'; import { TypeMapping } from '../../type_mapping'; import { RequireExactlyOne } from './variant'; -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; /** * Represents an optional value: every {@link Opt} is either `Some` and contains diff --git a/src/lib/candid/types/constructed/record.ts b/src/lib/candid/types/constructed/record.ts index 2c5cbd4bc0..a27d9d0e7f 100644 --- a/src/lib/candid/types/constructed/record.ts +++ b/src/lib/candid/types/constructed/record.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { toIdlMap, CandidMap } from './to_idl_map'; import { CandidType } from '../../candid_type'; import { TypeMapping } from '../../type_mapping'; diff --git a/src/lib/candid/types/constructed/to_idl_map.ts b/src/lib/candid/types/constructed/to_idl_map.ts index 75aefe051f..0384ca1882 100644 --- a/src/lib/candid/types/constructed/to_idl_map.ts +++ b/src/lib/candid/types/constructed/to_idl_map.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { CandidType } from '../../candid_type'; import { Parent, toIdl } from '../../to_idl'; diff --git a/src/lib/candid/types/constructed/tuple.ts b/src/lib/candid/types/constructed/tuple.ts index 35c9d77a04..050535f044 100644 --- a/src/lib/candid/types/constructed/tuple.ts +++ b/src/lib/candid/types/constructed/tuple.ts @@ -1,6 +1,6 @@ import { CandidType } from '../../candid_type'; import { Parent, toIdl } from '../../to_idl'; -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; import { TypeMapping } from '../../type_mapping'; diff --git a/src/lib/candid/types/constructed/variant.ts b/src/lib/candid/types/constructed/variant.ts index c87d67a92c..67ba5df80b 100644 --- a/src/lib/candid/types/constructed/variant.ts +++ b/src/lib/candid/types/constructed/variant.ts @@ -1,7 +1,7 @@ import { CandidType } from '../../candid_type'; import { TypeMapping } from '../../type_mapping'; import { toIdlMap, CandidMap } from './to_idl_map'; -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { decode } from '../../serde/decode'; import { encode } from '../../serde/encode'; diff --git a/src/lib/candid/types/constructed/vec.ts b/src/lib/candid/types/constructed/vec.ts index 94ffa17d65..8ab0d94a4f 100644 --- a/src/lib/candid/types/constructed/vec.ts +++ b/src/lib/candid/types/constructed/vec.ts @@ -1,6 +1,6 @@ import { CandidType } from '../../candid_type'; import { Parent, toIdl } from '../../to_idl'; -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; import { TypeMapping } from '../../type_mapping'; diff --git a/src/lib/candid/types/primitive/bool.ts b/src/lib/candid/types/primitive/bool.ts index 8a10503307..6578496b6f 100644 --- a/src/lib/candid/types/primitive/bool.ts +++ b/src/lib/candid/types/primitive/bool.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/primitive/empty.ts b/src/lib/candid/types/primitive/empty.ts index f9826971fe..bf60cd0c87 100644 --- a/src/lib/candid/types/primitive/empty.ts +++ b/src/lib/candid/types/primitive/empty.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/primitive/floats/float32.ts b/src/lib/candid/types/primitive/floats/float32.ts index 06fa6b1dc5..60f19b9635 100644 --- a/src/lib/candid/types/primitive/floats/float32.ts +++ b/src/lib/candid/types/primitive/floats/float32.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/floats/float64.ts b/src/lib/candid/types/primitive/floats/float64.ts index 10a859830f..f373b353c4 100644 --- a/src/lib/candid/types/primitive/floats/float64.ts +++ b/src/lib/candid/types/primitive/floats/float64.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/ints/int.ts b/src/lib/candid/types/primitive/ints/int.ts index 51ab87baef..8b226601e2 100644 --- a/src/lib/candid/types/primitive/ints/int.ts +++ b/src/lib/candid/types/primitive/ints/int.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/ints/int16.ts b/src/lib/candid/types/primitive/ints/int16.ts index 3898334e1c..b757d55607 100644 --- a/src/lib/candid/types/primitive/ints/int16.ts +++ b/src/lib/candid/types/primitive/ints/int16.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/ints/int32.ts b/src/lib/candid/types/primitive/ints/int32.ts index b930152f36..5ba10b6bdd 100644 --- a/src/lib/candid/types/primitive/ints/int32.ts +++ b/src/lib/candid/types/primitive/ints/int32.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/ints/int64.ts b/src/lib/candid/types/primitive/ints/int64.ts index 49ec67182e..32145a69a5 100644 --- a/src/lib/candid/types/primitive/ints/int64.ts +++ b/src/lib/candid/types/primitive/ints/int64.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/ints/int8.ts b/src/lib/candid/types/primitive/ints/int8.ts index 51756e5e06..33f92ae3c3 100644 --- a/src/lib/candid/types/primitive/ints/int8.ts +++ b/src/lib/candid/types/primitive/ints/int8.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/nats/nat.ts b/src/lib/candid/types/primitive/nats/nat.ts index 5f81926c6f..88c2151bd7 100644 --- a/src/lib/candid/types/primitive/nats/nat.ts +++ b/src/lib/candid/types/primitive/nats/nat.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/nats/nat16.ts b/src/lib/candid/types/primitive/nats/nat16.ts index 8c77ad4d55..27b4206f88 100644 --- a/src/lib/candid/types/primitive/nats/nat16.ts +++ b/src/lib/candid/types/primitive/nats/nat16.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/nats/nat32.ts b/src/lib/candid/types/primitive/nats/nat32.ts index 5e1fc12f72..3c08026452 100644 --- a/src/lib/candid/types/primitive/nats/nat32.ts +++ b/src/lib/candid/types/primitive/nats/nat32.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/nats/nat64.ts b/src/lib/candid/types/primitive/nats/nat64.ts index c542f63365..538c985998 100644 --- a/src/lib/candid/types/primitive/nats/nat64.ts +++ b/src/lib/candid/types/primitive/nats/nat64.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/nats/nat8.ts b/src/lib/candid/types/primitive/nats/nat8.ts index bec3a2c673..4cfd235128 100644 --- a/src/lib/candid/types/primitive/nats/nat8.ts +++ b/src/lib/candid/types/primitive/nats/nat8.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../../serde/encode'; import { decode } from '../../../serde/decode'; diff --git a/src/lib/candid/types/primitive/null.ts b/src/lib/candid/types/primitive/null.ts index 56fbd35446..d5a0809e44 100644 --- a/src/lib/candid/types/primitive/null.ts +++ b/src/lib/candid/types/primitive/null.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/primitive/reserved.ts b/src/lib/candid/types/primitive/reserved.ts index cb85ba17ef..e005d6a7bf 100644 --- a/src/lib/candid/types/primitive/reserved.ts +++ b/src/lib/candid/types/primitive/reserved.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/primitive/text.ts b/src/lib/candid/types/primitive/text.ts index d416287c9a..106da3f0be 100644 --- a/src/lib/candid/types/primitive/text.ts +++ b/src/lib/candid/types/primitive/text.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/primitive/void.ts b/src/lib/candid/types/primitive/void.ts index dd05e4d778..2774153c44 100644 --- a/src/lib/candid/types/primitive/void.ts +++ b/src/lib/candid/types/primitive/void.ts @@ -1,4 +1,4 @@ -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { decode } from '../../serde/decode'; import { encode } from '../../serde/encode'; diff --git a/src/lib/candid/types/reference/func.ts b/src/lib/candid/types/reference/func.ts index 26faa82058..34ba5f9173 100644 --- a/src/lib/candid/types/reference/func.ts +++ b/src/lib/candid/types/reference/func.ts @@ -1,5 +1,5 @@ import { CandidType, Parent, toIdlArray } from '../../index'; -import { IDL } from '../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { Principal } from './principal'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; diff --git a/src/lib/candid/types/reference/principal.ts b/src/lib/candid/types/reference/principal.ts index 8bc5d3b43e..2f4d025a8b 100644 --- a/src/lib/candid/types/reference/principal.ts +++ b/src/lib/candid/types/reference/principal.ts @@ -1,5 +1,5 @@ -import { IDL } from '../../../idl_export'; -import { DfinityPrincipal } from '../../..'; +import { IDL } from '@dfinity/candid'; +import { Principal as DfinityPrincipal } from '@dfinity/principal'; import { encode } from '../../serde/encode'; import { decode } from '../../serde/decode'; import { Parent } from '../../to_idl'; diff --git a/src/lib/candid/types/reference/service/canister_function/index.ts b/src/lib/candid/types/reference/service/canister_function/index.ts index b2f56d8a37..cb60b743e0 100644 --- a/src/lib/candid/types/reference/service/canister_function/index.ts +++ b/src/lib/candid/types/reference/service/canister_function/index.ts @@ -2,7 +2,7 @@ import { Parent, CandidType, toIdlArray } from '../../../../index'; import { _AzleRecursiveFunction } from '../../../../recursive'; import { ic } from '../../../../../ic'; import { Principal } from '../../principal'; -import { IDL } from '../../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { CanisterMethodInfo } from '../../../../../canister_methods/types/canister_method_info'; import { decode, encode } from '../../../../serde'; import { createQueryMethods, createUpdateMethods } from './query_update'; diff --git a/src/lib/candid/types/reference/service/canister_function/system_methods.ts b/src/lib/candid/types/reference/service/canister_function/system_methods.ts index 9213a33c7d..7fa272a6fb 100644 --- a/src/lib/candid/types/reference/service/canister_function/system_methods.ts +++ b/src/lib/candid/types/reference/service/canister_function/system_methods.ts @@ -1,6 +1,6 @@ import { Parent, toIdlArray } from '../../../../index'; import { _AzleRecursiveFunction } from '../../../../recursive'; -import { IDL } from '../../../../../idl_export'; +import { IDL } from '@dfinity/candid'; import { CanisterOptions, ServiceFunctionInfo } from '.'; type SystemMethod = { name: string } | undefined; diff --git a/src/lib/idl_export.ts b/src/lib/idl_export.ts deleted file mode 100644 index a11bd0c3b3..0000000000 --- a/src/lib/idl_export.ts +++ /dev/null @@ -1 +0,0 @@ -export { IDL } from '@dfinity/candid'; diff --git a/src/lib/index.ts b/src/lib/index.ts index 7147f0fc6a..27a38557b0 100644 --- a/src/lib/index.ts +++ b/src/lib/index.ts @@ -6,6 +6,3 @@ export * from './ic'; export * from './stable_structures/stable_b_tree_map'; export * from './stable_structures/stable_json'; export * from './system_types'; - -export { DfinityPrincipal } from './principal_export'; -export { IDL } from './idl_export'; diff --git a/src/lib/principal_export.ts b/src/lib/principal_export.ts deleted file mode 100644 index ad6ae4c94e..0000000000 --- a/src/lib/principal_export.ts +++ /dev/null @@ -1 +0,0 @@ -export { Principal as DfinityPrincipal } from '@dfinity/principal'; diff --git a/src/lib/system_types/result.ts b/src/lib/system_types/result.ts index 5e8032e3a7..0af595e43a 100644 --- a/src/lib/system_types/result.ts +++ b/src/lib/system_types/result.ts @@ -1,7 +1,7 @@ import { CandidType } from '../candid/candid_type'; import { Parent, toIdl } from '../candid/to_idl'; import { RequireExactlyOne } from '../candid/types/constructed/variant'; -import { IDL } from '../idl_export'; +import { IDL } from '@dfinity/candid'; export class AzleResult { constructor(ok: T, err: K) { From d2c032e595b1876450224c026a0c15b3bf7eb6e3 Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 12 Dec 2023 16:25:42 -0600 Subject: [PATCH 3/5] use deep-is library to solve NaN problem and hopefully performance --- package-lock.json | 1 + package.json | 1 + property_tests/arbitraries/canister_arb.ts | 4 +++- property_tests/tests/blob/test/generate_tests.ts | 3 ++- property_tests/tests/bool/test/generate_tests.ts | 3 ++- property_tests/tests/float32/test/generate_tests.ts | 3 ++- property_tests/tests/float64/test/generate_tests.ts | 3 ++- property_tests/tests/func/test/generate_tests.ts | 3 ++- property_tests/tests/int/test/generate_tests.ts | 3 ++- property_tests/tests/int16/test/generate_tests.ts | 3 ++- property_tests/tests/int32/test/generate_tests.ts | 3 ++- property_tests/tests/int64/test/generate_tests.ts | 3 ++- property_tests/tests/int8/test/generate_tests.ts | 3 ++- property_tests/tests/nat/test/generate_tests.ts | 3 ++- property_tests/tests/nat16/test/generate_tests.ts | 3 ++- property_tests/tests/nat32/test/generate_tests.ts | 3 ++- property_tests/tests/nat64/test/generate_tests.ts | 3 ++- property_tests/tests/nat8/test/generate_tests.ts | 3 ++- property_tests/tests/null/test/generate_tests.ts | 3 ++- property_tests/tests/opt/test/generate_tests.ts | 3 ++- property_tests/tests/principal/test/generate_tests.ts | 4 +++- property_tests/tests/query_methods/test/generate_tests.ts | 3 ++- property_tests/tests/record/test/generate_tests.ts | 3 ++- property_tests/tests/stable_b_tree_map/test/contains_key.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/get.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/insert.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/is_empty.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/items.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/keys.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/len.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/remove.ts | 4 +++- property_tests/tests/stable_b_tree_map/test/values.ts | 4 +++- property_tests/tests/text/test/generate_tests.ts | 3 ++- property_tests/tests/tuple/test/generate_tests.ts | 3 ++- property_tests/tests/update_methods/test/generate_tests.ts | 3 ++- property_tests/tests/variant/test/generate_tests.ts | 3 ++- property_tests/tests/vec/test/generate_tests.ts | 3 ++- 37 files changed, 83 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 436f4e48a4..5736919a23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@types/deep-equal": "^1.0.4", "@types/fs-extra": "9.0.13", "deep-equal": "^2.2.3", + "deep-is": "^0.1.4", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", "fast-check": "^3.13.1", diff --git a/package.json b/package.json index 45e7ffdb9b..13c15d22ef 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@types/deep-equal": "^1.0.4", "@types/fs-extra": "9.0.13", "deep-equal": "^2.2.3", + "deep-is": "^0.1.4", "eslint": "8.11.0", "eslint-config-prettier": "8.5.0", "fast-check": "^3.13.1", diff --git a/property_tests/arbitraries/canister_arb.ts b/property_tests/arbitraries/canister_arb.ts index 22c4d12ab7..3605439099 100644 --- a/property_tests/arbitraries/canister_arb.ts +++ b/property_tests/arbitraries/canister_arb.ts @@ -85,7 +85,9 @@ function generateSourceCode( return /*TS*/ ` import { ${imports} } from 'azle'; - import deepEqual from 'deep-equal'; + + // @ts-ignore + import deepEqual from 'deep-is'; ${declarations} diff --git a/property_tests/tests/blob/test/generate_tests.ts b/property_tests/tests/blob/test/generate_tests.ts index 1cf676c261..11cdefc293 100644 --- a/property_tests/tests/blob/test/generate_tests.ts +++ b/property_tests/tests/blob/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/bool/test/generate_tests.ts b/property_tests/tests/bool/test/generate_tests.ts index 61fac35f18..d3566d1656 100644 --- a/property_tests/tests/bool/test/generate_tests.ts +++ b/property_tests/tests/bool/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/float32/test/generate_tests.ts b/property_tests/tests/float32/test/generate_tests.ts index 24d7ca49ba..e3bce7d74e 100644 --- a/property_tests/tests/float32/test/generate_tests.ts +++ b/property_tests/tests/float32/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/float64/test/generate_tests.ts b/property_tests/tests/float64/test/generate_tests.ts index 12f1b193e0..4739fe0873 100644 --- a/property_tests/tests/float64/test/generate_tests.ts +++ b/property_tests/tests/float64/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/func/test/generate_tests.ts b/property_tests/tests/func/test/generate_tests.ts index 38fd790309..16149f8923 100644 --- a/property_tests/tests/func/test/generate_tests.ts +++ b/property_tests/tests/func/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int/test/generate_tests.ts b/property_tests/tests/int/test/generate_tests.ts index 596c897295..64db0bfc35 100644 --- a/property_tests/tests/int/test/generate_tests.ts +++ b/property_tests/tests/int/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int16/test/generate_tests.ts b/property_tests/tests/int16/test/generate_tests.ts index 8530987669..8abd2f59fb 100644 --- a/property_tests/tests/int16/test/generate_tests.ts +++ b/property_tests/tests/int16/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int32/test/generate_tests.ts b/property_tests/tests/int32/test/generate_tests.ts index 6374cdbc69..fa6c287b36 100644 --- a/property_tests/tests/int32/test/generate_tests.ts +++ b/property_tests/tests/int32/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int64/test/generate_tests.ts b/property_tests/tests/int64/test/generate_tests.ts index c971cf7859..6da080f3fb 100644 --- a/property_tests/tests/int64/test/generate_tests.ts +++ b/property_tests/tests/int64/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/int8/test/generate_tests.ts b/property_tests/tests/int8/test/generate_tests.ts index 10388996e5..57300b1c67 100644 --- a/property_tests/tests/int8/test/generate_tests.ts +++ b/property_tests/tests/int8/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat/test/generate_tests.ts b/property_tests/tests/nat/test/generate_tests.ts index ac2c5e902b..c6ee4821bc 100644 --- a/property_tests/tests/nat/test/generate_tests.ts +++ b/property_tests/tests/nat/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat16/test/generate_tests.ts b/property_tests/tests/nat16/test/generate_tests.ts index 14e2062e67..e4f6f806c4 100644 --- a/property_tests/tests/nat16/test/generate_tests.ts +++ b/property_tests/tests/nat16/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat32/test/generate_tests.ts b/property_tests/tests/nat32/test/generate_tests.ts index 92aca97d03..571293b7ba 100644 --- a/property_tests/tests/nat32/test/generate_tests.ts +++ b/property_tests/tests/nat32/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat64/test/generate_tests.ts b/property_tests/tests/nat64/test/generate_tests.ts index c7fc4f305e..8ca65d843e 100644 --- a/property_tests/tests/nat64/test/generate_tests.ts +++ b/property_tests/tests/nat64/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/nat8/test/generate_tests.ts b/property_tests/tests/nat8/test/generate_tests.ts index 5fcce12c6e..5125ae9a0c 100644 --- a/property_tests/tests/nat8/test/generate_tests.ts +++ b/property_tests/tests/nat8/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/null/test/generate_tests.ts b/property_tests/tests/null/test/generate_tests.ts index e107d5761d..00cdacd037 100644 --- a/property_tests/tests/null/test/generate_tests.ts +++ b/property_tests/tests/null/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/opt/test/generate_tests.ts b/property_tests/tests/opt/test/generate_tests.ts index b6b46fdaee..5443081501 100644 --- a/property_tests/tests/opt/test/generate_tests.ts +++ b/property_tests/tests/opt/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/principal/test/generate_tests.ts b/property_tests/tests/principal/test/generate_tests.ts index 2cd7ffe0b2..c44fa40eb5 100644 --- a/property_tests/tests/principal/test/generate_tests.ts +++ b/property_tests/tests/principal/test/generate_tests.ts @@ -1,5 +1,7 @@ import { Principal } from '@dfinity/principal'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/query_methods/test/generate_tests.ts b/property_tests/tests/query_methods/test/generate_tests.ts index aa6525c60d..3c7100e5b3 100644 --- a/property_tests/tests/query_methods/test/generate_tests.ts +++ b/property_tests/tests/query_methods/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CorrespondingJSType } from 'azle/property_tests/arbitraries/candid/corresponding_js_type'; diff --git a/property_tests/tests/record/test/generate_tests.ts b/property_tests/tests/record/test/generate_tests.ts index 423a63bc69..77520f68e0 100644 --- a/property_tests/tests/record/test/generate_tests.ts +++ b/property_tests/tests/record/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/stable_b_tree_map/test/contains_key.ts b/property_tests/tests/stable_b_tree_map/test/contains_key.ts index 65ac471340..7c73d2cf45 100644 --- a/property_tests/tests/stable_b_tree_map/test/contains_key.ts +++ b/property_tests/tests/stable_b_tree_map/test/contains_key.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor } from 'azle/property_tests'; import { Test } from 'azle/test'; diff --git a/property_tests/tests/stable_b_tree_map/test/get.ts b/property_tests/tests/stable_b_tree_map/test/get.ts index 27a91cf5e9..e80b8ddea3 100644 --- a/property_tests/tests/stable_b_tree_map/test/get.ts +++ b/property_tests/tests/stable_b_tree_map/test/get.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/insert.ts b/property_tests/tests/stable_b_tree_map/test/insert.ts index 075fe4d996..7caaf4ed78 100644 --- a/property_tests/tests/stable_b_tree_map/test/insert.ts +++ b/property_tests/tests/stable_b_tree_map/test/insert.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/is_empty.ts b/property_tests/tests/stable_b_tree_map/test/is_empty.ts index e2e7618712..0160dfca52 100644 --- a/property_tests/tests/stable_b_tree_map/test/is_empty.ts +++ b/property_tests/tests/stable_b_tree_map/test/is_empty.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/items.ts b/property_tests/tests/stable_b_tree_map/test/items.ts index a60defc68a..5cd85d3417 100644 --- a/property_tests/tests/stable_b_tree_map/test/items.ts +++ b/property_tests/tests/stable_b_tree_map/test/items.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/keys.ts b/property_tests/tests/stable_b_tree_map/test/keys.ts index 07e47711ca..23816b1031 100644 --- a/property_tests/tests/stable_b_tree_map/test/keys.ts +++ b/property_tests/tests/stable_b_tree_map/test/keys.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/len.ts b/property_tests/tests/stable_b_tree_map/test/len.ts index d5e28ddd6b..cc38e93e5a 100644 --- a/property_tests/tests/stable_b_tree_map/test/len.ts +++ b/property_tests/tests/stable_b_tree_map/test/len.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/remove.ts b/property_tests/tests/stable_b_tree_map/test/remove.ts index 8d3bf53a98..4ac97f4f89 100644 --- a/property_tests/tests/stable_b_tree_map/test/remove.ts +++ b/property_tests/tests/stable_b_tree_map/test/remove.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/stable_b_tree_map/test/values.ts b/property_tests/tests/stable_b_tree_map/test/values.ts index f20f2c42da..61ee962286 100644 --- a/property_tests/tests/stable_b_tree_map/test/values.ts +++ b/property_tests/tests/stable_b_tree_map/test/values.ts @@ -1,5 +1,7 @@ import fc from 'fast-check'; -import deepEqual from 'deep-equal'; + +// @ts-ignore +import deepEqual from 'deep-is'; import { StableBTreeMap } from 'azle/property_tests/arbitraries/stable_b_tree_map_arb'; import { getActor } from 'azle/property_tests'; diff --git a/property_tests/tests/text/test/generate_tests.ts b/property_tests/tests/text/test/generate_tests.ts index 9c6647b43c..fe72aa108c 100644 --- a/property_tests/tests/text/test/generate_tests.ts +++ b/property_tests/tests/text/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/tuple/test/generate_tests.ts b/property_tests/tests/tuple/test/generate_tests.ts index 2acb80c796..7300272946 100644 --- a/property_tests/tests/tuple/test/generate_tests.ts +++ b/property_tests/tests/tuple/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/update_methods/test/generate_tests.ts b/property_tests/tests/update_methods/test/generate_tests.ts index 39eaebe5d4..0f7b7cacd5 100644 --- a/property_tests/tests/update_methods/test/generate_tests.ts +++ b/property_tests/tests/update_methods/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { Named, getActor } from 'azle/property_tests'; import { Test } from 'azle/test'; diff --git a/property_tests/tests/variant/test/generate_tests.ts b/property_tests/tests/variant/test/generate_tests.ts index 7c44d1e800..28c2cca5bf 100644 --- a/property_tests/tests/variant/test/generate_tests.ts +++ b/property_tests/tests/variant/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; diff --git a/property_tests/tests/vec/test/generate_tests.ts b/property_tests/tests/vec/test/generate_tests.ts index 2a98c8775a..e0784a649d 100644 --- a/property_tests/tests/vec/test/generate_tests.ts +++ b/property_tests/tests/vec/test/generate_tests.ts @@ -1,4 +1,5 @@ -import deepEqual from 'deep-equal'; +// @ts-ignore +import deepEqual from 'deep-is'; import { getActor, Named } from 'azle/property_tests'; import { CandidValueAndMeta } from 'azle/property_tests/arbitraries/candid/candid_value_and_meta_arb'; From f785c029f8f236fbad02ca54ecf16aa321f26dc3 Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 12 Dec 2023 17:51:03 -0600 Subject: [PATCH 4/5] make sure -0 is printed out for float32 --- property_tests/arbitraries/candid/to_src_literal/float.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/property_tests/arbitraries/candid/to_src_literal/float.ts b/property_tests/arbitraries/candid/to_src_literal/float.ts index f789e3cb4d..8394b8b65a 100644 --- a/property_tests/arbitraries/candid/to_src_literal/float.ts +++ b/property_tests/arbitraries/candid/to_src_literal/float.ts @@ -3,6 +3,10 @@ export function floatToSrcLiteral(value: number): string { return 'Number.NaN'; } if (Number.isFinite(value)) { + if (1 / value === -Infinity) { + return '-0'; + } + return value.toString(); } if (value > 0) { From 220c75c67cd1a2561d963ab241230fa62751dd97 Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Tue, 12 Dec 2023 18:27:59 -0600 Subject: [PATCH 5/5] fix float64 -0/0 issue --- property_tests/arbitraries/candid/to_src_literal/float.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/property_tests/arbitraries/candid/to_src_literal/float.ts b/property_tests/arbitraries/candid/to_src_literal/float.ts index 8394b8b65a..20a0f46be7 100644 --- a/property_tests/arbitraries/candid/to_src_literal/float.ts +++ b/property_tests/arbitraries/candid/to_src_literal/float.ts @@ -3,7 +3,7 @@ export function floatToSrcLiteral(value: number): string { return 'Number.NaN'; } if (Number.isFinite(value)) { - if (1 / value === -Infinity) { + if (value === 0 && 1 / value === -Infinity) { return '-0'; }