Closed AlexSwensen closed 1 year ago
@sindresorhus I don't believe I have enough context to fix the tests... what do you recommend?
Is #94 related to this? I was getting that issue too and have been chasing my tail trying to upgrade to ESM, but running into unrelated blockers with ts-jest
, etc.
I know very little about ESM and knew nothing a few days ago, so all this with a grain of salt, but if map-obj
was not on ESM as of version 4.3.0 (as it appears not to have been), I imagine that could cause Jest encountered an unexpected token
I saw:
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import mapObject from 'map-obj';
^^^^^^
I'm piping up mostly because
Apologies if this isn't useful and thanks for all the great libraries!
@Ethan826 I had a similar issue too... my solution was to fork the library and make some changes to it. Once I did that, my problems were solved for my use case. Hopefully, this helps.
Also, the original author is more than welcome to pull from the branch I just linked as well. I just don't know enough about their use case and implementation to know if it's appropriate. All I know is it worked well for me which allowed me to move on and solve other problems.
I'm having the same issue. Downgrading to 7.x helped.
Closing for now as there seems to be no traction on this, and it is no longer relevant to my work.
Currently: While using camelcase-keys, im getting a nested error from the built library.
After digging, the library currently assumes
map-obj
is exporting a default function, but the4.3.0
version that was pinned does not export the called function as a default. The current5.0.2
version ofmap-obj
does, however. I assume no other breaking changes took place besides how the function is exported, so the only fix required was to bump the dependency.It does however seem that tests are failing. I could use some assistance in next steps to resolve this issue.