-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix Image field tests #8820
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
format: 'cjs', |
@@ -97,6 +97,7 @@ | |||
"target": "esnext" | |||
} | |||
] | |||
} | |||
}, | |||
"transformIgnorePatterns": [] |
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.
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
These tests were disabled in #8304 as jest was exploding with a
Segmentation Fault
, this should help resolve that.