-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
bun compat issue #144
Comments
@RokoTechnology it must be issue with your tooling, note it's perfectly working JavaScript (well covered by tests: https://github.com/medikoo/memoizee/actions/runs/9220608521) Maybe there's some bug with type definitions but they're not maintained here and not by me. I guess you need to investigat what exactly you're using |
I also get this error in runtime using Bun v1.1.30. memoize(_getListening, { maxAge: 5_000 })
|
@RuiNtD this is not a problem with this package, but with a tooling you're using. Have you tried to report it to Bun? Or any other utility that's responsible? |
I'm not familiar with the code of this package, so I don't even know what the issue is to report to Bun. |
@RuiNtD same what you reported here |
I'm closing this, as again there's no issue with this package, to confirm just try it in plain Node.js + npm |
Adding two cents. It appears that Bun makes wrong assumptions about JavaScript. e.g. following is perfectly valid javascript: const foo = {};
bar.prop = "elo"; If I read correctly it'll fail in Bun, because it comes up with assumption that It might be that it's simply not compatible with plain JavaScript, but I guess there could be some option to make it work |
This isn't valid JS because you're trying to access a property of $ bunx bun@1.1.26 --print "const foo = {}; foo.prop = 'elo'; foo.prop"
elo |
The specific issue in memoizee is due to how Bun determines whether a module imported via Ideally, Bun's heuristics should, if the current version decides a module is ambiguous, check for |
@heimskr, yes, my example was meant to be be: const foo = {};
foo.prop = "elo"; Sorry for confusion. Again, as you've noticed, this is perfectly working package (with millions of downloads, working well for 10+ years). It's bun repository where discussion on this issue should be directed |
@heimskr I still encounter this issue with newest bun version. when can we expect a fix? |
Latest bun (1.1.26) will throw on this example:
This is what happens in latest memoizee (0.4.17)
memoizee/ext/promise.js
where you require"use strict"
as string frommemoizee/lib/registered-extensions.js
and then try to set.promise
on it:The text was updated successfully, but these errors were encountered: