-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
⬆️ upgrade templates #2658
⬆️ upgrade templates #2658
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@shahriar-shojib We have a single type error in the playground template: Not sure why but it's only for the caption and deserializeMd plugins. Could you take a look? Will tip $50 for that one 🙂 |
I looked into this one, and the two plugins that are not working are I have tested the same thing on www project and did not face this issue. Anyhow, the issue is createPlugins expects I also noticed that each bundle is emitting its own types which should be imported from @plate/common. Since I am not facing this issue on www leads me to believe that there are some inconsistency on the published packages, I will have to investigate further into this. |
Hello, https://github.com/udecode/plate/tree/fix/tsup-dts-output this does not bundle node_modules dts into the package's d.ts which should not only reduce the package size but also improve tsserver and tsc performance on the user's end and ensures all packages are referencing to a single type at a time instead of having them declared on their own package. |
Also, Lodash issue is still here: https://bundlephobia.com/package/@udecode/[email protected] plate/config/rollup.config.cjs Lines 110 to 118 in 7be7728
Any idea? |
I am checking now |
I could not find a possible reason why only these two plugins fail typechecking, it seems a lot of types are still bundled into d.ts which because of implicit return types and those types being re-exported from |
type PluginCreatorFn<Options extends PluginOptions = PluginOptions> = <
V extends Value = Value,
E extends PlateEditor<V> = PlateEditor<V>,
>(
override?: Partial<PlatePlugin<NoInfer<Options>, V, E>>,
overrideByKey?: OverrideByKey<V, E>
) => PlatePlugin;
/**
* Enables support for caption.
*/
export const createCaptionPlugin: PluginCreatorFn<CaptionPlugin> =
createPluginFactory<CaptionPlugin>({
key: KEY_CAPTION,
withOverrides: withCaption,
handlers: {
onKeyDown: onKeyDownCaption,
},
options: {
pluginKeys: [],
},
}) as any satisfies PluginCreatorFn<CaptionPlugin>; is this acceptable as a temporary workaround? |
Or createPlugin's type can be relaxed |
or moving createPluginFactory and createPlugins functionality could be moved to |
Not really, too much overhead, we need to keep type inference. I think the issue appeared because of the
so the
|
I will investigate this further, I am surprised that it's not happening in www though. |
|
Note that intellisense is extremely slow (and heavy CPU usage) specifically inside 2023-10-01.at.23.50.04.mp4If you have a proposal to soften |
# Conflicts: # apps/www/tsconfig.tsbuildinfo # config/tsup.config.ts # package.json # yarn.lock
I will create a private registry and test out the released packages to solve the issue. |
So I've tried to create a minimal reproduction of the tsserver issue. Any array that contains any I'll do a test release for the other issues in the meantime. |
Another regression we have is #2661, more context in evanw/esbuild#622 (comment) I'll add |
Description
See changesets.