Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix Image field tests #8820

wants to merge 2 commits into from

Conversation

dcousens
Copy link
Member

@dcousens dcousens commented Sep 20, 2023

These tests were disabled in #8304 as jest was exploding with a Segmentation Fault, this should help resolve that.

@dcousens dcousens self-assigned this Sep 20, 2023
@dcousens dcousens changed the title Fix image field tests Fix Image field tests Sep 20, 2023
@dcousens dcousens closed this Sep 20, 2023
@dcousens dcousens reopened this Sep 20, 2023
@dcousens dcousens closed this Sep 20, 2023
@dcousens dcousens deleted the fix-image-tests branch September 20, 2023 07:41
@dcousens dcousens restored the fix-image-tests branch September 20, 2023 23:23
@dcousens dcousens reopened this Sep 20, 2023
import { v4 as uuid } from 'uuid';
import { randomBytes } from 'crypto';

import { fileTypeFromBuffer } from 'file-type';
Copy link
Member Author

@dcousens dcousens Sep 20, 2023

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

Copy link
Contributor

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? 🤔

@@ -97,6 +97,7 @@
"target": "esnext"
}
]
}
},
"transformIgnorePatterns": []
Copy link
Member Author

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 25, 2023

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:

Sandbox Source
@keystone-6/sandbox Configuration

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

Successfully merging this pull request may close these issues.

None yet

2 participants