-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(#7401, #7415): resolve visual editing issues #7405
base: main
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,5 @@ | |||
import { vercelStegaEncode } from '@vercel/stega'; | |||
|
|||
import { isImmutableMap, isImmutableList } from './types'; | |||
import { isImmutableMap, isImmutableList } from 'decap-cms-lib-util/src/types'; |
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.
Looking at this again, I think this will actually have a similar issue. In general, I don't think we should ever use imports that directly reach into <package>/src/
.
Possible fixes...
import { ... } from 'decap-cms-lib-util/dist/esm/types'
- re-export these methods in
decap-cms-lib-util/src/index.ts
andimport { ... } from 'decap-cms-lib-util'
- move these
isImmutable*
methods intodecap-cms-core
, as they aren't used anywhere else currently
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.
Oh yes, good catch! I moved the type guards to types/immutable.ts
in the core package – a file which was already there. I think this is a good fit.
Update: I updated the PR to include a fix for #7415 since this is closely related. |
Summary
This PR fixes #7401 by moving stega.ts to the core package, thereby getting rid of the circular dependency.
Additional changes:
visualEditing
prop to the type declarations.nx
anddist
in jestTest plan
Use decap-cms-app in an external project.
Checklist
Please add a
x
inside each checkbox:A picture of a cute animal (not mandatory but encouraged)
🦦