Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Internal improvements: Custom jest resolver for db #5359

Merged
merged 1 commit into from
Jul 26, 2022
Merged

Conversation

cliffoo
Copy link
Contributor

@cliffoo cliffoo commented Jul 26, 2022

I'm not too sure why this isn't happening on develop, but take a look at this failed ci run.

We recently upgraded to jest 28, and it's trying to use an esm version of uuid (a pouchdb dep), things break because of that. So I added a custom jest resolver that forces jest to use the cjs version of uuid.

Others have run into this, here are some related resources:

Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes! I have to admit that I don't really understand this, but since it's seemingly the officially-recommended workaround, I guess I'll hit approve on this?

@cliffoo
Copy link
Contributor Author

cliffoo commented Jul 26, 2022

Thanks @haltman-at!

@cliffoo cliffoo merged commit 6c444b2 into develop Jul 26, 2022
@cliffoo cliffoo deleted the db-jest-resolver branch July 26, 2022 19:24
Copy link
Member

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this @cliffoo! We should probably have a check for esm/cjs when evaluating version bumps, since module authors can choose ECMAScript modules now.

@cliffoo cliffoo mentioned this pull request Jul 26, 2022
23 tasks
@cliffoo
Copy link
Contributor Author

cliffoo commented Oct 7, 2022

Okay it appears this custom resolver is no longer needed according to this thread. I'll make a note to test if ci passes when I remove it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants