-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo: Update lru-cache dependencies (ESM) / Switch Browser Test Provider #2804
Conversation
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
…er.spec.ts and eip4844.spec.ts for tx
… browser test provider, removed webdriverio
c7a3e81
to
1e1bdf8
Compare
@@ -19,6 +19,7 @@ | |||
"contributors": [ | |||
"Alex Beregszaszi <alex@rtfs.hu>" | |||
], | |||
"type": "commonjs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would want to keep this for now. It is generally not yet 100% clear what setting is appropriate here and on the VM browser tests work better when setting here to "commonjs"
(lol).
// be some not so clean workaround. | ||
// | ||
// (note that @ts-ignore doesn't work since stripped on declaration (.d.ts) files) | ||
protected _cache?: LRUCache<string, any> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected _cache?: LRUCache<string, any> | |
protected _cache?: LRUCache<string, Uint8Array> |
Is this enough in your case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we need undefined as a potential value within the current code setup, this is not allowed anymore by the lru-cache library, therefore the any typing as some kind of hack here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, as a starting point for getting browser tests running again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR updates different require-using dependencies, in particular the lru-cache dependency.
I've now "solved" the undefined/null-now-forbidden question for lru-cache by just using
@ts-ignore
, see also comment on trie library for some reasing, also opened this issue isaacs/node-lru-cache#308 on thelru-cache
library, since - while also having some intuition why restricting on undefined and null makes sense - I also feel that e.g. for our use case this is still the cleanest way to do things.Update:
@ts-ignore
doesn't work since it is stripped in the declaration files in thedist
folder. I am now usingany
for this. Still feel this is the better solution than using an"UNDEFINED"
string or whatever one could come up with.