diff --git a/assembly/std/__tests__/index.spec.ts b/assembly/std/__tests__/index.spec.ts index 8d97d677..8d182f11 100644 --- a/assembly/std/__tests__/index.spec.ts +++ b/assembly/std/__tests__/index.spec.ts @@ -46,6 +46,7 @@ const keySerOk3: StaticArray = [ ]; const keysSerKo8: StaticArray = []; // edge case +const keysSerKo9: StaticArray = [0, 0]; // length < 4 (Minimal length) describe('index tests', () => { it('derOpKeys ok 1', () => { @@ -73,6 +74,11 @@ describe('index tests', () => { expect(res8.length).toBe(0); }); + it('derOpKeys ko 8', () => { + let res9 = derKeys(keysSerKo9); + expect(res9.length).toBe(0); + }); + it('derOpKeys ok 3', () => { let res = derKeys(keySerOk3); expect(res.length).toBe(1); diff --git a/assembly/std/op-datastore/util.ts b/assembly/std/op-datastore/util.ts index 05d0602f..7d3817af 100644 --- a/assembly/std/op-datastore/util.ts +++ b/assembly/std/op-datastore/util.ts @@ -7,6 +7,8 @@ * */ function getNumberOfKeys(keysSer: StaticArray): u32 { + // check if keysSer is more than 4 bytes + assert(keysSer.length >= 4, 'Invalid keysSer length'); // The first 4 bytes of the input array represent the number of keys let arr = new Uint8Array(4); arr[0] = keysSer[0]; @@ -46,7 +48,8 @@ function getNumberOfKeys(keysSer: StaticArray): u32 { * */ export function derKeys(keysSer: StaticArray): Array> { - if (keysSer.length == 0) return []; + // check if keysSer is more than 4 bytes (for the number of keys) + if (keysSer.length < 4) return []; const keyCount: u32 = getNumberOfKeys(keysSer); const keys = new Array>(keyCount); diff --git a/package-lock.json b/package-lock.json index 0ed14c9c..477cd8f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "js-sha3": "^0.9.2" }, "devDependencies": { - "@as-pect/cli": "^8.0.1", + "@as-pect/cli": "^8.1.0", "@massalabs/as-transformer": "^0.2.0", "@massalabs/as-types": "^2.0.0", "@massalabs/eslint-config": "^0.0.8", @@ -68,23 +68,59 @@ "visitor-as": "^0.11.4" } }, + "node_modules/@as-covers/transform/node_modules/assemblyscript": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.25.2.tgz", + "integrity": "sha512-67TQOMvKo23htvSK6lhOzsoQjnplNKkdwgq925uBvQZLDbg9pHfAWhg/R8i8tqKrtk6GH8haOJbQY4oNSQqehA==", + "dev": true, + "peer": true, + "dependencies": { + "binaryen": "110.0.0-nightly.20221105", + "long": "^5.2.0" + }, + "bin": { + "asc": "bin/asc.js", + "asinit": "bin/asinit.js" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/assemblyscript" + } + }, + "node_modules/@as-covers/transform/node_modules/visitor-as": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", + "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", + "dev": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "ts-mixer": "^6.0.2" + }, + "peerDependencies": { + "assemblyscript": "^0.25.0" + } + }, "node_modules/@as-pect/assembly": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/assembly/-/assembly-8.0.1.tgz", - "integrity": "sha512-MJryGqA06X6cT3Db0KdeCd4l6bur8i6WVfAtX+YmXU5bKRnbB0tUikX8CC5r0/LI/mVTcBOUxEcUbxnSTEQTCA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/assembly/-/assembly-8.1.0.tgz", + "integrity": "sha512-ALDm5M0Zx/hoFZ27vS3/kjkzMHbcPt2IBIkNjJz0M798meRCJV6ZWbChfmi4kDcMqaPk/awU54b4Bpx+VxBKfg==", "dev": true }, "node_modules/@as-pect/cli": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/cli/-/cli-8.0.1.tgz", - "integrity": "sha512-3yp/xAFVt4HqDC/s7EiAQP+qbpWaiEmv6+NW8jHATu812zv7UegXvMPG+Bk684J5CxS+neK7k7t62VAgngtsEA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/cli/-/cli-8.1.0.tgz", + "integrity": "sha512-bu2PUnWdYcF3aQ7X9rB6GXiE+b7Pi0MGMOyiShqdGlDCr3vKoD1kAK5Kb5rqY3tWRCC4gWO7/wupEynem6Qq0Q==", "dev": true, "dependencies": { "@as-covers/core": "0.4.2", "@as-covers/transform": "0.4.2", - "@as-pect/assembly": "^8.0.1", - "@as-pect/core": "^8.0.1", - "@as-pect/transform": "^8.0.1", + "@as-pect/assembly": "^8.1.0", + "@as-pect/core": "^8.1.0", + "@as-pect/transform": "^8.1.0", "chalk": "^5.2.0", "chalk-template": "^0.4.0", "commander": "^9.4.1", @@ -96,52 +132,52 @@ "aspect": "bin/asp.js" }, "optionalDependencies": { - "@as-pect/csv-reporter": "^8.0.1", - "@as-pect/json-reporter": "^8.0.1" + "@as-pect/csv-reporter": "^8.1.0", + "@as-pect/json-reporter": "^8.1.0" }, "peerDependencies": { - "assemblyscript": "^0.25.0" + "assemblyscript": "^0.27.2" } }, "node_modules/@as-pect/core": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/core/-/core-8.0.1.tgz", - "integrity": "sha512-GNb0Hi7pci8QDW6wVmga9Rt45LtqwO8JfNIWfBCUirAaDEmBNVEENVieChk/eQCK8XDICK/N0lKHofr3AvOT6A==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/core/-/core-8.1.0.tgz", + "integrity": "sha512-ufXnyHzHh2ybfyyj1fojOxlI8npgk7o5ktbCqWdhfX+/RD7L5nyI14pBP5PUpHs2wRrpt7neXb4QEyHvZmc0Xw==", "dev": true, "dependencies": { - "@as-pect/assembly": "^8.0.1", - "@as-pect/snapshots": "^8.0.1", + "@as-pect/assembly": "^8.1.0", + "@as-pect/snapshots": "^8.1.0", "@assemblyscript/loader": "^0.25.0", - "assemblyscript": "^0.25.0", + "assemblyscript": "^0.27.2", "chalk": "^5.2.0", "chalk-template": "^0.4.0", "long": "^5.2.1" } }, "node_modules/@as-pect/csv-reporter": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/csv-reporter/-/csv-reporter-8.0.1.tgz", - "integrity": "sha512-SgMNd4k6NokcV1A2QWD1Elv/nFXcBo/7E3+6s+7Yk4ZspmMy/1io2VleNcEEUQ6B8fIc0wIKcyfXkHKwcU5Dgw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/csv-reporter/-/csv-reporter-8.1.0.tgz", + "integrity": "sha512-7EQL2IBZ4WgZk3UdIzG5SRwNaVgVzB6CpZyyyKCWQbtF3i4phUN8g59kRE2XM6vJx0Ojf9+LqkOCM00WNgIxJg==", "dev": true, "optional": true, "dependencies": { - "@as-pect/core": "^8.0.1" + "@as-pect/core": "^8.1.0" } }, "node_modules/@as-pect/json-reporter": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/json-reporter/-/json-reporter-8.0.1.tgz", - "integrity": "sha512-rQnU8vfdJ4KpiK7ODpdBXUzpvnYUaxenrNA4ysL4FZmSf/CabfR7CiJryUFuAVEZu1VWn+7KsBA1CHk695CF4g==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/json-reporter/-/json-reporter-8.1.0.tgz", + "integrity": "sha512-KcMq15cGcY4mJh34UHOrqQAUR7LwajCJ0OkfcZZE3vPN45IY2R5CeO+sj4/1a/7TQIGvLFVMGB57szBIe6lDqQ==", "dev": true, "optional": true, "dependencies": { - "@as-pect/core": "^8.0.1" + "@as-pect/core": "^8.1.0" } }, "node_modules/@as-pect/snapshots": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/snapshots/-/snapshots-8.0.1.tgz", - "integrity": "sha512-cKuqvy1MBT81b4GjEcel/bHjWO1p8CaI/KQvniIZsjCtycKYi0grOeIcP9HuCbWUTeFtgdXI/yVgeBmdE9N/ag==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/snapshots/-/snapshots-8.1.0.tgz", + "integrity": "sha512-FoZdnxEFvTlhyGu2pfCrKkH9bs2BaR/Buf5On876cTOCI1yfLFpP0kwCnStjRz0kfwHmg6LSHGbhvc3tKaJBdg==", "dev": true, "dependencies": { "chevrotain": "^10.4.2", @@ -150,12 +186,12 @@ } }, "node_modules/@as-pect/transform": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/transform/-/transform-8.0.1.tgz", - "integrity": "sha512-n1gShKroaDWKQvFV2mAvV32Pw0mnXKy4/VgLXaTj2IWmXa/s4C5KGNS4vy71puQuIJROrb0s5x/ta/em27BLOw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/transform/-/transform-8.1.0.tgz", + "integrity": "sha512-dyWSMjsNWg8TmIAf7GXmvlQSae155pGR8rEIteHCNo8kn4boLQ8IGlL6k8DdacJl58mtHRQWx+N3v4u0RN5yfg==", "dev": true, "dependencies": { - "assemblyscript": "^0.25.0" + "assemblyscript": "^0.27.2" } }, "node_modules/@assemblyscript/loader": { @@ -165,36 +201,36 @@ "dev": true }, "node_modules/@chevrotain/cst-dts-gen": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.4.2.tgz", - "integrity": "sha512-0+4bNjlndNWMoVLH/+y4uHnf6GrTipsC+YTppJxelVJo+xeRVQ0s2PpkdDCVTsu7efyj+8r1gFiwVXsp6JZ0iQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz", + "integrity": "sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==", "dev": true, "dependencies": { - "@chevrotain/gast": "10.4.2", - "@chevrotain/types": "10.4.2", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", "lodash": "4.17.21" } }, "node_modules/@chevrotain/gast": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.4.2.tgz", - "integrity": "sha512-4ZAn8/mjkmYonilSJ60gGj1tAF0cVWYUMlIGA0e4ATAc3a648aCnvpBw7zlPHDQjFp50XC13iyWEgWAKiRKTOA==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.5.0.tgz", + "integrity": "sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==", "dev": true, "dependencies": { - "@chevrotain/types": "10.4.2", + "@chevrotain/types": "10.5.0", "lodash": "4.17.21" } }, "node_modules/@chevrotain/types": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.4.2.tgz", - "integrity": "sha512-QzSCjg6G4MvIoLeIgOiMR0IgzkGEQqrNJJIr3T5ETRa7l4Av4AMIiEctV99mvDr57iXwwk0/kr3RJxiU36Nevw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.5.0.tgz", + "integrity": "sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A==", "dev": true }, "node_modules/@chevrotain/utils": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.4.2.tgz", - "integrity": "sha512-V34dacxWLwKcvcy32dx96ADJVdB7kOJLm7LyBkBQw5u5HC9WdEFw2G17zml+U3ivavGTrGPJHl8o9/UJm0PlUw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", + "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==", "dev": true }, "node_modules/@es-joy/jsdoccomment": { @@ -309,6 +345,19 @@ "url": "https://opencollective.com/assemblyscript" } }, + "node_modules/@massalabs/as-transformer/node_modules/visitor-as": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", + "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", + "dev": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "ts-mixer": "^6.0.2" + }, + "peerDependencies": { + "assemblyscript": "^0.25.0" + } + }, "node_modules/@massalabs/as-types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@massalabs/as-types/-/as-types-2.0.0.tgz", @@ -867,21 +916,21 @@ } }, "node_modules/assemblyscript": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.25.2.tgz", - "integrity": "sha512-67TQOMvKo23htvSK6lhOzsoQjnplNKkdwgq925uBvQZLDbg9pHfAWhg/R8i8tqKrtk6GH8haOJbQY4oNSQqehA==", + "version": "0.27.21", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.27.21.tgz", + "integrity": "sha512-tdaHqBr1C4rB5me4hXKcQ6HHmMwlakS1c3PEj2GXwjQGa3406U9QwZYqpOkLElAvNnGko9glVkmBud4el/Z2pw==", "dev": true, "dependencies": { - "binaryen": "110.0.0-nightly.20221105", - "long": "^5.2.0" + "binaryen": "116.0.0-nightly.20231102", + "long": "^5.2.1" }, "bin": { "asc": "bin/asc.js", "asinit": "bin/asinit.js" }, "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" + "node": ">=16", + "npm": ">=7" }, "funding": { "type": "opencollective", @@ -908,6 +957,16 @@ "prettier": "^2.7.1" } }, + "node_modules/assemblyscript/node_modules/binaryen": { + "version": "116.0.0-nightly.20231102", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-116.0.0-nightly.20231102.tgz", + "integrity": "sha512-aPU9tlKdw/gcXx6u4PxtDgOtGjg/ZKnYdk23ctYb70GxZgPhWnGWmnBt01aV5dt5yFFo2V4rbB7SzpSFhViFQA==", + "dev": true, + "bin": { + "wasm-opt": "bin/wasm-opt", + "wasm2js": "bin/wasm2js" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -1023,15 +1082,15 @@ } }, "node_modules/chevrotain": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.4.2.tgz", - "integrity": "sha512-gzF5GxE0Ckti5kZVuKEZycLntB5X2aj9RVY0r4/220GwQjdnljU+/t3kP74/FMWC7IzCDDEjQ9wsFUf0WCdSHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.5.0.tgz", + "integrity": "sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==", "dev": true, "dependencies": { - "@chevrotain/cst-dts-gen": "10.4.2", - "@chevrotain/gast": "10.4.2", - "@chevrotain/types": "10.4.2", - "@chevrotain/utils": "10.4.2", + "@chevrotain/cst-dts-gen": "10.5.0", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "@chevrotain/utils": "10.5.0", "lodash": "4.17.21", "regexp-to-ast": "0.5.0" } @@ -5280,6 +5339,7 @@ }, "node_modules/npm/node_modules/lodash._baseindexof": { "version": "3.1.0", + "extraneous": true, "inBundle": true, "license": "MIT" }, @@ -5295,16 +5355,19 @@ }, "node_modules/npm/node_modules/lodash._bindcallback": { "version": "3.0.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/lodash._cacheindexof": { "version": "3.0.2", + "extraneous": true, "inBundle": true, "license": "MIT" }, "node_modules/npm/node_modules/lodash._createcache": { "version": "3.1.2", + "extraneous": true, "inBundle": true, "license": "MIT", "dependencies": { @@ -5319,6 +5382,7 @@ }, "node_modules/npm/node_modules/lodash._getnative": { "version": "3.9.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, @@ -5336,6 +5400,7 @@ }, "node_modules/npm/node_modules/lodash.restparam": { "version": "3.6.1", + "extraneous": true, "inBundle": true, "license": "MIT" }, @@ -8408,19 +8473,6 @@ "punycode": "^2.1.0" } }, - "node_modules/visitor-as": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", - "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", - "dev": true, - "dependencies": { - "lodash.clonedeep": "^4.5.0", - "ts-mixer": "^6.0.2" - }, - "peerDependencies": { - "assemblyscript": "^0.25.0" - } - }, "node_modules/vscode-json-languageservice": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.2.1.tgz", @@ -8621,27 +8673,50 @@ "requires": { "line-column": "^1.0.2", "visitor-as": "^0.11.4" + }, + "dependencies": { + "assemblyscript": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.25.2.tgz", + "integrity": "sha512-67TQOMvKo23htvSK6lhOzsoQjnplNKkdwgq925uBvQZLDbg9pHfAWhg/R8i8tqKrtk6GH8haOJbQY4oNSQqehA==", + "dev": true, + "peer": true, + "requires": { + "binaryen": "110.0.0-nightly.20221105", + "long": "^5.2.0" + } + }, + "visitor-as": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", + "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", + "dev": true, + "requires": { + "lodash.clonedeep": "^4.5.0", + "ts-mixer": "^6.0.2" + } + } } }, "@as-pect/assembly": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/assembly/-/assembly-8.0.1.tgz", - "integrity": "sha512-MJryGqA06X6cT3Db0KdeCd4l6bur8i6WVfAtX+YmXU5bKRnbB0tUikX8CC5r0/LI/mVTcBOUxEcUbxnSTEQTCA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/assembly/-/assembly-8.1.0.tgz", + "integrity": "sha512-ALDm5M0Zx/hoFZ27vS3/kjkzMHbcPt2IBIkNjJz0M798meRCJV6ZWbChfmi4kDcMqaPk/awU54b4Bpx+VxBKfg==", "dev": true }, "@as-pect/cli": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/cli/-/cli-8.0.1.tgz", - "integrity": "sha512-3yp/xAFVt4HqDC/s7EiAQP+qbpWaiEmv6+NW8jHATu812zv7UegXvMPG+Bk684J5CxS+neK7k7t62VAgngtsEA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/cli/-/cli-8.1.0.tgz", + "integrity": "sha512-bu2PUnWdYcF3aQ7X9rB6GXiE+b7Pi0MGMOyiShqdGlDCr3vKoD1kAK5Kb5rqY3tWRCC4gWO7/wupEynem6Qq0Q==", "dev": true, "requires": { "@as-covers/core": "0.4.2", "@as-covers/transform": "0.4.2", - "@as-pect/assembly": "^8.0.1", - "@as-pect/core": "^8.0.1", - "@as-pect/csv-reporter": "^8.0.1", - "@as-pect/json-reporter": "^8.0.1", - "@as-pect/transform": "^8.0.1", + "@as-pect/assembly": "^8.1.0", + "@as-pect/core": "^8.1.0", + "@as-pect/csv-reporter": "^8.1.0", + "@as-pect/json-reporter": "^8.1.0", + "@as-pect/transform": "^8.1.0", "chalk": "^5.2.0", "chalk-template": "^0.4.0", "commander": "^9.4.1", @@ -8650,44 +8725,44 @@ } }, "@as-pect/core": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/core/-/core-8.0.1.tgz", - "integrity": "sha512-GNb0Hi7pci8QDW6wVmga9Rt45LtqwO8JfNIWfBCUirAaDEmBNVEENVieChk/eQCK8XDICK/N0lKHofr3AvOT6A==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/core/-/core-8.1.0.tgz", + "integrity": "sha512-ufXnyHzHh2ybfyyj1fojOxlI8npgk7o5ktbCqWdhfX+/RD7L5nyI14pBP5PUpHs2wRrpt7neXb4QEyHvZmc0Xw==", "dev": true, "requires": { - "@as-pect/assembly": "^8.0.1", - "@as-pect/snapshots": "^8.0.1", + "@as-pect/assembly": "^8.1.0", + "@as-pect/snapshots": "^8.1.0", "@assemblyscript/loader": "^0.25.0", - "assemblyscript": "^0.25.0", + "assemblyscript": "^0.27.2", "chalk": "^5.2.0", "chalk-template": "^0.4.0", "long": "^5.2.1" } }, "@as-pect/csv-reporter": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/csv-reporter/-/csv-reporter-8.0.1.tgz", - "integrity": "sha512-SgMNd4k6NokcV1A2QWD1Elv/nFXcBo/7E3+6s+7Yk4ZspmMy/1io2VleNcEEUQ6B8fIc0wIKcyfXkHKwcU5Dgw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/csv-reporter/-/csv-reporter-8.1.0.tgz", + "integrity": "sha512-7EQL2IBZ4WgZk3UdIzG5SRwNaVgVzB6CpZyyyKCWQbtF3i4phUN8g59kRE2XM6vJx0Ojf9+LqkOCM00WNgIxJg==", "dev": true, "optional": true, "requires": { - "@as-pect/core": "^8.0.1" + "@as-pect/core": "^8.1.0" } }, "@as-pect/json-reporter": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/json-reporter/-/json-reporter-8.0.1.tgz", - "integrity": "sha512-rQnU8vfdJ4KpiK7ODpdBXUzpvnYUaxenrNA4ysL4FZmSf/CabfR7CiJryUFuAVEZu1VWn+7KsBA1CHk695CF4g==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/json-reporter/-/json-reporter-8.1.0.tgz", + "integrity": "sha512-KcMq15cGcY4mJh34UHOrqQAUR7LwajCJ0OkfcZZE3vPN45IY2R5CeO+sj4/1a/7TQIGvLFVMGB57szBIe6lDqQ==", "dev": true, "optional": true, "requires": { - "@as-pect/core": "^8.0.1" + "@as-pect/core": "^8.1.0" } }, "@as-pect/snapshots": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/snapshots/-/snapshots-8.0.1.tgz", - "integrity": "sha512-cKuqvy1MBT81b4GjEcel/bHjWO1p8CaI/KQvniIZsjCtycKYi0grOeIcP9HuCbWUTeFtgdXI/yVgeBmdE9N/ag==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/snapshots/-/snapshots-8.1.0.tgz", + "integrity": "sha512-FoZdnxEFvTlhyGu2pfCrKkH9bs2BaR/Buf5On876cTOCI1yfLFpP0kwCnStjRz0kfwHmg6LSHGbhvc3tKaJBdg==", "dev": true, "requires": { "chevrotain": "^10.4.2", @@ -8696,12 +8771,12 @@ } }, "@as-pect/transform": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@as-pect/transform/-/transform-8.0.1.tgz", - "integrity": "sha512-n1gShKroaDWKQvFV2mAvV32Pw0mnXKy4/VgLXaTj2IWmXa/s4C5KGNS4vy71puQuIJROrb0s5x/ta/em27BLOw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@as-pect/transform/-/transform-8.1.0.tgz", + "integrity": "sha512-dyWSMjsNWg8TmIAf7GXmvlQSae155pGR8rEIteHCNo8kn4boLQ8IGlL6k8DdacJl58mtHRQWx+N3v4u0RN5yfg==", "dev": true, "requires": { - "assemblyscript": "^0.25.0" + "assemblyscript": "^0.27.2" } }, "@assemblyscript/loader": { @@ -8711,36 +8786,36 @@ "dev": true }, "@chevrotain/cst-dts-gen": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.4.2.tgz", - "integrity": "sha512-0+4bNjlndNWMoVLH/+y4uHnf6GrTipsC+YTppJxelVJo+xeRVQ0s2PpkdDCVTsu7efyj+8r1gFiwVXsp6JZ0iQ==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz", + "integrity": "sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==", "dev": true, "requires": { - "@chevrotain/gast": "10.4.2", - "@chevrotain/types": "10.4.2", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", "lodash": "4.17.21" } }, "@chevrotain/gast": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.4.2.tgz", - "integrity": "sha512-4ZAn8/mjkmYonilSJ60gGj1tAF0cVWYUMlIGA0e4ATAc3a648aCnvpBw7zlPHDQjFp50XC13iyWEgWAKiRKTOA==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.5.0.tgz", + "integrity": "sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==", "dev": true, "requires": { - "@chevrotain/types": "10.4.2", + "@chevrotain/types": "10.5.0", "lodash": "4.17.21" } }, "@chevrotain/types": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.4.2.tgz", - "integrity": "sha512-QzSCjg6G4MvIoLeIgOiMR0IgzkGEQqrNJJIr3T5ETRa7l4Av4AMIiEctV99mvDr57iXwwk0/kr3RJxiU36Nevw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.5.0.tgz", + "integrity": "sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A==", "dev": true }, "@chevrotain/utils": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.4.2.tgz", - "integrity": "sha512-V34dacxWLwKcvcy32dx96ADJVdB7kOJLm7LyBkBQw5u5HC9WdEFw2G17zml+U3ivavGTrGPJHl8o9/UJm0PlUw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", + "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==", "dev": true }, "@es-joy/jsdoccomment": { @@ -8823,6 +8898,16 @@ "binaryen": "110.0.0-nightly.20221105", "long": "^5.2.0" } + }, + "visitor-as": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", + "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", + "dev": true, + "requires": { + "lodash.clonedeep": "^4.5.0", + "ts-mixer": "^6.0.2" + } } } }, @@ -9219,13 +9304,21 @@ } }, "assemblyscript": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.25.2.tgz", - "integrity": "sha512-67TQOMvKo23htvSK6lhOzsoQjnplNKkdwgq925uBvQZLDbg9pHfAWhg/R8i8tqKrtk6GH8haOJbQY4oNSQqehA==", + "version": "0.27.21", + "resolved": "https://registry.npmjs.org/assemblyscript/-/assemblyscript-0.27.21.tgz", + "integrity": "sha512-tdaHqBr1C4rB5me4hXKcQ6HHmMwlakS1c3PEj2GXwjQGa3406U9QwZYqpOkLElAvNnGko9glVkmBud4el/Z2pw==", "dev": true, "requires": { - "binaryen": "110.0.0-nightly.20221105", - "long": "^5.2.0" + "binaryen": "116.0.0-nightly.20231102", + "long": "^5.2.1" + }, + "dependencies": { + "binaryen": { + "version": "116.0.0-nightly.20231102", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-116.0.0-nightly.20231102.tgz", + "integrity": "sha512-aPU9tlKdw/gcXx6u4PxtDgOtGjg/ZKnYdk23ctYb70GxZgPhWnGWmnBt01aV5dt5yFFo2V4rbB7SzpSFhViFQA==", + "dev": true + } } }, "assemblyscript-prettier": { @@ -9321,15 +9414,15 @@ } }, "chevrotain": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.4.2.tgz", - "integrity": "sha512-gzF5GxE0Ckti5kZVuKEZycLntB5X2aj9RVY0r4/220GwQjdnljU+/t3kP74/FMWC7IzCDDEjQ9wsFUf0WCdSHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.5.0.tgz", + "integrity": "sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==", "dev": true, "requires": { - "@chevrotain/cst-dts-gen": "10.4.2", - "@chevrotain/gast": "10.4.2", - "@chevrotain/types": "10.4.2", - "@chevrotain/utils": "10.4.2", + "@chevrotain/cst-dts-gen": "10.5.0", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "@chevrotain/utils": "10.5.0", "lodash": "4.17.21", "regexp-to-ast": "0.5.0" } @@ -12455,7 +12548,8 @@ }, "lodash._baseindexof": { "version": "3.1.0", - "bundled": true + "bundled": true, + "extraneous": true }, "lodash._baseuniq": { "version": "4.6.0", @@ -12468,15 +12562,18 @@ }, "lodash._bindcallback": { "version": "3.0.1", - "bundled": true + "bundled": true, + "extraneous": true }, "lodash._cacheindexof": { "version": "3.0.2", - "bundled": true + "bundled": true, + "extraneous": true }, "lodash._createcache": { "version": "3.1.2", "bundled": true, + "extraneous": true, "requires": { "lodash._getnative": "^3.0.0" } @@ -12488,7 +12585,8 @@ }, "lodash._getnative": { "version": "3.9.1", - "bundled": true + "bundled": true, + "extraneous": true }, "lodash._root": { "version": "3.0.1", @@ -12502,7 +12600,8 @@ }, "lodash.restparam": { "version": "3.6.1", - "bundled": true + "bundled": true, + "extraneous": true }, "lodash.union": { "version": "4.6.0", @@ -14894,16 +14993,6 @@ "punycode": "^2.1.0" } }, - "visitor-as": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/visitor-as/-/visitor-as-0.11.4.tgz", - "integrity": "sha512-uih7AooY2V3LhzobjLqyEQzhYYBGeq0y/rZk295foM1Ko498f24NNXBDyM1SgzcLMFCAT/fpmSRco1BpTIdKNQ==", - "dev": true, - "requires": { - "lodash.clonedeep": "^4.5.0", - "ts-mixer": "^6.0.2" - } - }, "vscode-json-languageservice": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-4.2.1.tgz", diff --git a/package.json b/package.json index b00d6855..d7c99e8c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "js-sha3": "^0.9.2" }, "devDependencies": { - "@as-pect/cli": "^8.0.1", + "@as-pect/cli": "^8.1.0", "@massalabs/as-transformer": "^0.2.0", "@massalabs/as-types": "^2.0.0", "@massalabs/eslint-config": "^0.0.8",