v3-sdk icon indicating copy to clipboard operation
v3-sdk copied to clipboard

Upgrade regenerator-runtime

Open Jack-Works opened this issue 3 years ago • 6 comments

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.

image

Please upgrade to the latest version of regenerator runtime, thanks!

The new code in the regenerator runtime:

image

Jack-Works avatar Apr 04 '22 08:04 Jack-Works

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!

marktoda avatar Jul 07 '22 20:07 marktoda

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]

hiroshitashir avatar Jun 30 '23 23:06 hiroshitashir

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

image

Jack-Works avatar Jul 01 '23 02:07 Jack-Works

node_modules/regenerator-runtime/runtime.js has the correct version in my environment.

Screenshot 2023-07-05 at 12 48 07 PM

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

hiroshitashir avatar Jul 06 '23 00:07 hiroshitashir

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.

Jack-Works avatar Jul 06 '23 04:07 Jack-Works

Good catch!

hiroshitashir avatar Jul 06 '23 22:07 hiroshitashir