Skip to content

Commit

Permalink
fix: update packages (#850)
Browse files Browse the repository at this point in the history
* fix: update packages

* fix: recreate yarn.lock files for apps

* fix: temporary downgrade

* fix: 850 apps/sdk-nextjs-integration/src/app/page.tsx fix async calls

* fix: downgrade next

* fix: fix issues

---------

Co-authored-by: Rodolfo Pietro Calabrò <[email protected]>
Co-authored-by: rodolfopietro97 <[email protected]>
Co-authored-by: lucanicoladebiasi <[email protected]>
  • Loading branch information
4 people authored May 9, 2024
1 parent 56f0f10 commit e0940b9
Show file tree
Hide file tree
Showing 9 changed files with 669 additions and 550 deletions.
182 changes: 111 additions & 71 deletions apps/sdk-hardhat-integration/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -469,53 +469,53 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.5.tgz#3c428000ec27501617a00f7c447054a272f99177"
integrity sha512-gIXUIiPMUy6roLHpNlxf15DumU7/YhffUf7XIB+WUjMecaySfTGyZsTGnCMJZqrDyiYqWPyPKwCV/2u/jqFAUg==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.5.tgz#fee26c4a83c9fc534bc0a719e88382fafeed69fe"
integrity sha512-0MrpOCXUK8gmplpYZ2Cy0holHEylvWoNeecFcrP2WJ5DLQzrB23U5JU2MvUzOJ7aL76Za1VXNBWi/UeTWdHM+w==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.5.tgz#c48ad44b578abb50706cd8cad607a65b1289689f"
integrity sha512-aw9f7AZMiY1dZFNePJGKho2k+nEgFgzUAyyukiKfSqUIMXoFXMf1U3Ujv848czrSq9c5XGcdDa2xnEf3daU3xg==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.5.tgz#7cc1b12e2adf872e5a542647182262cc4582f8d9"
integrity sha512-cVFRQjyABBlsbDj+XTczYBfrCHprZ6YNzN8gGGSqAh+UGIJkAIRomK6ar27GyJLNx3HkgbuDoi/9kA0zOo/95w==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.5.tgz#ae4366c6fad03ea6ec3e2f2bafe397661c11f054"
integrity sha512-CjOg85DfR1Vt0fQWn5U0qi26DATK9tVzo3YOZEyI0JBsnqvk43fUTPv3uUAWBrPIRg5O5kOc9xG13hSpCBBxBg==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.5.tgz#4071929fcece90f95c271f6ba455c55f35750efd"
integrity sha512-hvX8bBGpBydAVevzK8jsu2FlqVZK1RrCyTX6wGHnltgMuBaoGLHYtNHiFpteOaJw2byYMiORc2bvj+98LhJ0Ew==

"@nomicfoundation/[email protected].5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.5.tgz#6e6684e56f336c67fbda9bf75b21d7ac586631b8"
integrity sha512-IJXjW13DY5UPsx/eG5DGfXtJ7Ydwrvw/BTZ2Y93lRLHzszVpSmeVmlxjZP5IW2afTSgMLaAAsqNw4NhppRGN8A==

"@nomicfoundation/edr@^0.3.1":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.3.5.tgz#04f980386f871e1c3bbc180b290d37af0336c81d"
integrity sha512-dPSM9DuI1sr71gqWUMgLo8MjHQWO4+WNDm3iWaT6P4vUFJReZX5qwA5X+3UwIPBry8GvNY084u7yWUvB3/8rqA==
"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.7.tgz#c204edc79643624dbd431b489b254778817d8244"
integrity sha512-6tK9Lv/lSfyBvpEQ4nsTfgxyDT1y1Uv/x8Wa+aB+E8qGo3ToexQ1BMVjxJk6PChXCDOWxB3B4KhqaZFjdhl3Ow==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.7.tgz#c3b394445084270cc5250d6c1869b0574e7ef810"
integrity sha512-1RrQ/1JPwxrYO69e0tglFv5H+ggour5Ii3bb727+yBpBShrxtOTQ7fZyfxA5h62LCN+0Z9wYOPeQ7XFcVurMaQ==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.7.tgz#6d65545a44d1323bb7ab08c3306947165d2071de"
integrity sha512-ds/CKlBoVXIihjhflhgPn13EdKWed6r5bgvMs/YwRqT5wldQAQJZWAfA2+nYm0Yi2gMGh1RUpBcfkyl4pq7G+g==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.7.tgz#5368534bceac1a8c18b1be6b908caca5d39b0c03"
integrity sha512-e29udiRaPujhLkM3+R6ju7QISrcyOqpcaxb2FsDWBkuD7H8uU9JPZEyyUIpEp5uIY0Jh1eEJPKZKIXQmQAEAuw==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.7.tgz#42349bf5941dbb54a5719942924c6e4e8cde348e"
integrity sha512-/xkjmTyv+bbJ4akBCW0qzFKxPOV4AqLOmqurov+s9umHb16oOv72osSa3SdzJED2gHDaKmpMITT4crxbar4Axg==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.7.tgz#e6babe11c9a8012f1284e6e48c3551861f2a7cd4"
integrity sha512-QwBP9xlmsbf/ldZDGLcE4QiAb8Zt46E/+WLpxHBATFhGa7MrpJh6Zse+h2VlrT/SYLPbh2cpHgSmoSlqVxWG9g==

"@nomicfoundation/[email protected].7":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.7.tgz#1504b98f305f03be153b0220a546985660de9dc6"
integrity sha512-j/80DEnkxrF2ewdbk/gQ2EOPvgF0XSsg8D0o4+6cKhUVAW6XwtWKzIphNL6dyD2YaWEPgIrNvqiJK/aln0ww4Q==

"@nomicfoundation/edr@^0.3.5":
version "0.3.7"
resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.3.7.tgz#9c75edf1fcf601617905b2c89acf103f4786d017"
integrity sha512-v2JFWnFKRsnOa6PDUrD+sr8amcdhxnG/YbL7LzmgRGU1odWEyOF4/EwNeUajQr4ZNKVWrYnJ6XjydXtUge5OBQ==
optionalDependencies:
"@nomicfoundation/edr-darwin-arm64" "0.3.5"
"@nomicfoundation/edr-darwin-x64" "0.3.5"
"@nomicfoundation/edr-linux-arm64-gnu" "0.3.5"
"@nomicfoundation/edr-linux-arm64-musl" "0.3.5"
"@nomicfoundation/edr-linux-x64-gnu" "0.3.5"
"@nomicfoundation/edr-linux-x64-musl" "0.3.5"
"@nomicfoundation/edr-win32-x64-msvc" "0.3.5"
"@nomicfoundation/edr-darwin-arm64" "0.3.7"
"@nomicfoundation/edr-darwin-x64" "0.3.7"
"@nomicfoundation/edr-linux-arm64-gnu" "0.3.7"
"@nomicfoundation/edr-linux-arm64-musl" "0.3.7"
"@nomicfoundation/edr-linux-x64-gnu" "0.3.7"
"@nomicfoundation/edr-linux-x64-musl" "0.3.7"
"@nomicfoundation/edr-win32-x64-msvc" "0.3.7"

"@nomicfoundation/[email protected]":
version "4.0.4"
Expand Down Expand Up @@ -578,9 +578,9 @@
integrity sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==

"@nomicfoundation/hardhat-verify@^2.0.0":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.5.tgz#dcc2cb5e5c55a39704c7d492436f80f05a4ca5a3"
integrity sha512-Tg4zu8RkWpyADSFIgF4FlJIUEI4VkxcvELsmbJn2OokbvH2SnUrqKmw0BBfDrtvP0hhmx8wsnrRKP5DV/oTyTA==
version "2.0.6"
resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.6.tgz#02623c431244c92a852c524008239fc616e1c658"
integrity sha512-oKUI5fl8QC8jysE2LUBHE6rObzEmccJcc4b43Ov7LFMlCBZJE27qoqGIsg/++wX7L8Jdga+bkejPxl8NvsecpQ==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@ethersproject/address" "^5.0.2"
Expand Down Expand Up @@ -839,9 +839,9 @@
"@types/chai" "*"

"@types/chai@*", "@types/chai@^4.2.0":
version "4.3.14"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6"
integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w==
version "4.3.16"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82"
integrity sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==

"@types/concat-stream@^1.6.0":
version "1.6.1"
Expand Down Expand Up @@ -888,9 +888,9 @@
integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==

"@types/node@*":
version "20.12.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384"
integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==
version "20.12.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.9.tgz#d7234f2e7839b55fcab5048404aef0195684adff"
integrity sha512-o93r47yu04MHumPBCFg0bMPBMNgtMg3jzbhl7e68z50+BMHmRMGDJv13eBlUgOdc9i/uoJXGMGYLtJV4ReTXEg==
dependencies:
undici-types "~5.26.4"

Expand Down Expand Up @@ -940,7 +940,7 @@
dependencies:
"@types/node" "*"

"@vechain/[email protected]", "@vechain/sdk-core@^1.0.0-beta.2":
"@vechain/[email protected]":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@vechain/sdk-core/-/sdk-core-1.0.0-beta.3.tgz#e095902dced4bd2a4a8c9b65033f6ac4b0226dc1"
integrity sha512-PgKjCPOwb+9rAXp8FTcrG1UwFnAaV0gzfmbCA/pPiEr8jOIrQd5+1S4Q9vDZ5dVDCnJq73y2OH5zPf4ff84IAA==
Expand All @@ -952,11 +952,28 @@
elliptic "^6.5.5"
ethers "6.11.1"

"@vechain/[email protected]", "@vechain/sdk-core@^1.0.0-beta.2":
version "1.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@vechain/sdk-core/-/sdk-core-1.0.0-beta.4.tgz#eb8f091c6118df25252a3485edd605138f51a48c"
integrity sha512-ECVq0YQI1mAWQwOja0dNvleTa+v+G2uTThgM6ZafInUqXUtGFVkf0kZ1jtVWRn3lTNFa+hcLG0tkkjw5dJ40dg==
dependencies:
"@ethereumjs/rlp" "^5.0.2"
"@types/elliptic" "^6.4.18"
"@vechain/sdk-errors" "1.0.0-beta.4"
blakejs "^1.2.1"
elliptic "^6.5.5"
ethers "6.12.1"

"@vechain/[email protected]":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@vechain/sdk-errors/-/sdk-errors-1.0.0-beta.3.tgz#44eb37d4ef0d1b050373b2611256667a9ee8f7b4"
integrity sha512-ojuCG/sA4gGQqhpAqLtC3T096TtJEEd+2WhdifZL5IGxQX34Gn/eJF8UDo7DapybAUhWUDTdOO8pI/0zLEetsQ==

"@vechain/[email protected]":
version "1.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@vechain/sdk-errors/-/sdk-errors-1.0.0-beta.4.tgz#01ba5925b91438a5b82dee5ddc5ae09ce71dc01c"
integrity sha512-G4pxRaCHpvS9iC8RoC7nLkA5iPYwSntg0iHjPkfM4/ae4idliZBlIj5xv15u3PPmn8qFrf/XtqjX8sG2tybfbw==

"@vechain/[email protected]":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@vechain/sdk-ethers-adapter/-/sdk-ethers-adapter-1.0.0-beta.3.tgz#25207681abf89932566ec98ad40a78a1a853a517"
Expand All @@ -981,7 +998,7 @@
dependencies:
"@vechain/sdk-errors" "1.0.0-beta.3"

"@vechain/[email protected]", "@vechain/sdk-network@^1.0.0-beta.2":
"@vechain/[email protected]":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@vechain/sdk-network/-/sdk-network-1.0.0-beta.3.tgz#1bc94e49b0ed6e7b013d206bb835be58966006e0"
integrity sha512-tEha4Ct88+Oy7lNvhKJDGGw7rTcpgI7M+uK7Bl2kR8k7ypkP6znWS6p+RgjMzrls/uEpCSN1f9Fo+OWuzvY98A==
Expand All @@ -991,6 +1008,16 @@
"@vechain/sdk-errors" "1.0.0-beta.3"
axios "^1.6.7"

"@vechain/sdk-network@^1.0.0-beta.2":
version "1.0.0-beta.4"
resolved "https://registry.yarnpkg.com/@vechain/sdk-network/-/sdk-network-1.0.0-beta.4.tgz#1862f669e7b07a6c7fc91217f6017692f04e2944"
integrity sha512-arzsH209xYlO3GJN1Dx86sG3dyqQdEz/k3xlfYDxlcgkEFdiGdSveqSJoECafBIvgdidj7kmydJGsobFoLBrfw==
dependencies:
"@types/ws" "^8.5.10"
"@vechain/sdk-core" "1.0.0-beta.4"
"@vechain/sdk-errors" "1.0.0-beta.4"
axios "^1.6.7"

"@vechain/[email protected]", "@vechain/sdk-provider@^1.0.0-beta.2":
version "1.0.0-beta.3"
resolved "https://registry.yarnpkg.com/@vechain/sdk-provider/-/sdk-provider-1.0.0-beta.3.tgz#ebc0a023692611fd6c1b63ea366f3eae1cf0c2de"
Expand Down Expand Up @@ -1059,14 +1086,14 @@ aggregate-error@^3.0.0:
indent-string "^4.0.0"

ajv@^8.0.1:
version "8.12.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
version "8.13.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.13.0.tgz#a3939eaec9fb80d217ddf0c3376948c023f28c91"
integrity sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==
dependencies:
fast-deep-equal "^3.1.1"
fast-deep-equal "^3.1.3"
json-schema-traverse "^1.0.0"
require-from-string "^2.0.2"
uri-js "^4.2.2"
uri-js "^4.4.1"

amdefine@>=0.0.4:
version "1.0.1"
Expand Down Expand Up @@ -1906,6 +1933,19 @@ [email protected]:
tslib "2.4.0"
ws "8.5.0"

[email protected]:
version "6.12.1"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.12.1.tgz#517ff6d66d4fd5433e38e903051da3e57c87ff37"
integrity sha512-j6wcVoZf06nqEcBbDWkKg8Fp895SS96dSnTCjiXT+8vt2o02raTn4Lo9ERUuIVU5bAjoPYeA+7ytQFexFmLuVw==
dependencies:
"@adraffy/ens-normalize" "1.10.1"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@types/node" "18.15.13"
aes-js "4.0.0-beta.5"
tslib "2.4.0"
ws "8.5.0"

ethers@^5.7.2:
version "5.7.2"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e"
Expand Down Expand Up @@ -1966,7 +2006,7 @@ evp_bytestokey@^1.0.3:
md5.js "^1.3.4"
safe-buffer "^5.1.1"

fast-deep-equal@^3.1.1:
fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
Expand Down Expand Up @@ -2283,13 +2323,13 @@ hardhat-gas-reporter@^1.0.8:
sha1 "^1.1.1"

hardhat@^2.22.2:
version "2.22.2"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.2.tgz#0cadd7ec93bf39bab09f81603e75bc5e92acea3d"
integrity sha512-0xZ7MdCZ5sJem4MrvpQWLR3R3zGDoHw5lsR+pBFimqwagimIOn3bWuZv69KA+veXClwI1s/zpqgwPwiFrd4Dxw==
version "2.22.3"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.3.tgz#50605daca6b29862397e446c42ec14c89430bec3"
integrity sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA==
dependencies:
"@ethersproject/abi" "^5.1.2"
"@metamask/eth-sig-util" "^4.0.0"
"@nomicfoundation/edr" "^0.3.1"
"@nomicfoundation/edr" "^0.3.5"
"@nomicfoundation/ethereumjs-common" "4.0.4"
"@nomicfoundation/ethereumjs-tx" "5.0.4"
"@nomicfoundation/ethereumjs-util" "9.0.4"
Expand Down Expand Up @@ -2872,9 +2912,9 @@ node-emoji@^1.10.0:
lodash "^4.17.21"

node-gyp-build@^4.2.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd"
integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==
version "4.8.1"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5"
integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==

nofilter@^3.1.0:
version "3.1.0"
Expand Down Expand Up @@ -3777,7 +3817,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==

uri-js@^4.2.2:
uri-js@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
Expand Down
18 changes: 18 additions & 0 deletions apps/sdk-nextjs-integration/jest-environment-jsdom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { TextEncoder, TextDecoder } = require('node:util')
const { default: $JSDOMEnvironment, TestEnvironment } = require('jest-environment-jsdom')

Object.defineProperty(exports, '__esModule', {
value: true,
})

class JSDOMEnvironment extends $JSDOMEnvironment {
constructor(...args) {
const { global } = super(...args)
global.TextEncoder = TextEncoder
global.TextDecoder = TextDecoder
global.Uint8Array = Uint8Array
}
}

exports.default = JSDOMEnvironment
exports.TestEnvironment = TestEnvironment === $JSDOMEnvironment ? JSDOMEnvironment : TestEnvironment
2 changes: 1 addition & 1 deletion apps/sdk-nextjs-integration/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const createJestConfig = nextJest({
// Add any custom config to be passed to Jest
const customJestConfig = {
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
testEnvironment: "jsdom",
testEnvironment: './jest-environment-jsdom.js',
}

// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
Expand Down
7 changes: 4 additions & 3 deletions apps/sdk-nextjs-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vechain-sdk-nextjs",
"description": "A Next.js sample app using the vechain SDK",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -12,9 +12,10 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@vechain/sdk-core": "1.0.0-beta.3",
"@vechain/sdk-core": "1.0.0-beta.4",
"@vechain/sdk-network": "1.0.0-beta.3",
"next": "14.1.3",
"install": "^0.13.0",
"next": "13",
"react": "^18",
"react-dom": "^18"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/sdk-nextjs-integration/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Home(): JSX.Element {
* Function to get the history for the provided address
* @param address The address to get the history for
*/
async function getHistoryFor(address: string) {
async function getHistoryFor(address: string): Promise<void> {
try {
// Get the latest block
const bestBlock = await thorClient.blocks.getBestBlockCompressed();
Expand Down Expand Up @@ -81,7 +81,7 @@ export default function Home(): JSX.Element {

// Update the history when the address changes
useEffect(() => {
getHistoryFor(address);
void getHistoryFor(address);
}, [address]);

return (
Expand Down
Loading

1 comment on commit e0940b9

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (3118/3118) 100% (690/690) 100% (650/650)
Title Tests Skipped Failures Errors Time
core 463 0 💤 0 ❌ 0 🔥 1m 5s ⏱️
network 606 0 💤 0 ❌ 0 🔥 3m 27s ⏱️
errors 48 0 💤 0 ❌ 0 🔥 14.967s ⏱️

Please sign in to comment.