-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Migration script for expected types in EventCatalog on updates #796
Comments
This PR add these dependencies to EC and create a test emulating the package on production ( But, i think we could go a step further. The way i see, EC is two projects - the eventcatalog bin and astro project. The But, how do you distinguish the packages needed for each one? By separating the EC into two projects with workspaces, resulting in the following structure:
The final package would be the bin bundled by tsup along with its dependencies and the astro directory to copy/paste into the user's .eventcatalog-core directory. |
Yeah interesting @carlosallexandre I think you might be ontop something here. Happy to explore it in more details, what would the workspaces look like? Would we need to use turbo or anything? Or just plain workspaces? |
@boyney123 I think just plain workspaces. I will work on something more concrete by this weekend to show you. |
It might be an overkill but maybe using https://projen.io/ instead can solve this problem? I haven't look into the details but just my 2 cents. |
After working on a POC with plain workspaces, I think that it's not helpful as I thought. In my humble opinion, the best option for now is keep the packages needed at production as dependencies. The only valuable thing from this POC is bundling |
@boyney123 @carlosallexandre |
Hey @XaaXaaX, Answer me a doubt 🙏. Let's say that the user project has the following package: {
"devDependecies": {
"@eventcatalog/core": "2.8.2"
}
} And {
"dependencies": {
"@parcel/watcher": "1.0.0",
"commander": "1.0.0",
"axios": "1.0.0"
},
"peerDependencies": {
"astro": "1.0.0"
}
} As you can see, the user doesn't have a direct dependency of astro. How package managers handle that, especially I ask this because of this issue. For Another option to solve #575 is doesn't create the .eventcatalog-core dir and consider the package inside the node_modules as .eventcatalog-core. In my tests, all commands from eventcatalog works properly except the dev command. This option for me sounds a little strange. |
Use Case
When new packages are added to EventCatalog (lodash for example), the types are also added. Now EventCatalog will bundle the lodash package fine, but people will miss the types as they dev dependency.
We either, add them add project dependencies or write a script to add them to folks dev deps for them when they run the dev command for example.
I'm leaning towards making them a dep of the project....
Proposed Solution
No response
Implementation Notes
No response
Community Notes
The text was updated successfully, but these errors were encountered: