Fix Image field tests#8820
Conversation
84847e7 to
52337e3
Compare
8350057 to
12bd982
Compare
| import { v4 as uuid } from 'uuid'; | ||
| import { randomBytes } from 'crypto'; | ||
|
|
||
| import { fileTypeFromBuffer } from 'file-type'; |
There was a problem hiding this comment.
file-type is ESM, which is problematic
jest is now passing, but we need the Keystone usage of esbuild to work too
There was a problem hiding this comment.
Vercel/remix e.g. read the package.json of the project to check if "type": "module" is set. I guess we can read that and tell the esbuild pipeline to either export the .keystone/config.js in CJS or ESM style? 🤔
keystone/packages/core/src/lib/esbuild.ts
Line 12 in 52337e3
| ] | ||
| } | ||
| }, | ||
| "transformIgnorePatterns": [] |
There was a problem hiding this comment.
This probably isn't the best pathway for this
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 789bbc3:
|
3b3dd28 to
789bbc3
Compare
d675b51 to
aa70665
Compare
aa70665 to
17dc035
Compare
17dc035 to
7d3f9cc
Compare
|
Solved in #9529 |
These tests were disabled in #8304 as jest was exploding with a
Segmentation Fault, this should help resolve that.