v3-sdk
v3-sdk copied to clipboard
Upgrade regenerator-runtime
Hi! I found the built version of this project contains an old version of regenerator-runtime (https://github.com/facebook/regenerator/) which throws an error in our environment.

Please upgrade to the latest version of regenerator runtime, thanks!
The new code in the regenerator runtime:

Hey @Jack-Works - thanks for reporting this! I've marked it down as an enhancement; we'd take a look if you wanted to submit a PR upgrading it!
It looks like package regenerator-runtime is installed via package tsdx. Both [email protected] and [email protected] are latest versions. I wonder if I'm missing something..
% npm ls regenerator-runtime
@uniswap/[email protected] /Users/hirotashiro/Uniswap/sdk-core
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ @babel/[email protected]
│ └── [email protected] deduped
└── [email protected]
% cd ../v3-sdk
% npm ls regenerator-runtime
@uniswap/[email protected] /Users/hirotashiro/Uniswap/v3-sdk
└─┬ [email protected]
├─┬ [email protected]
│ └─┬ @babel/[email protected]
│ └── [email protected] deduped
└── [email protected]
I took a look, and it is still using the old version. (New version should use define, not =). Maybe there is something wrong with the build step
node_modules/regenerator-runtime/runtime.js has the correct version in my environment.
It could be something to do with npm as you said. Deleting node_modules folder and running npm install might help? https://stackoverflow.com/questions/11351784/how-do-i-do-a-clean-install-delete-node-modules-and-install-with-npm
Note: this is not related to the cache. The published version of @uniswap/v3-sdk has that code.
https://cdn.jsdelivr.net/npm/@uniswap/[email protected]/dist/v3-sdk.esm.js
search gp[iteratorsymbol] and you can see it.
Good catch!