-
Notifications
You must be signed in to change notification settings - Fork 68
feat(tpc): build-time third-party-capital composables #81
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 looks really interesting. There's definitely some Nuxt specific stuff that I am not too familiar with, but overall it makes sense.
I like it, assuming we're ok with the manual / semi-manual updates of the tpc package.
If I'm getting it right, the gist is that we're adding (or updating) tpc scripts in the registry and kinda "glueing it all together", right?
package.json
Outdated
] | ||
}, | ||
"peerDependencies": { | ||
"third-party-capital": "^1.0.30" |
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.
what is the rationale for this?
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.
I moved it to peer dep so module managers won't enforce a specific version of tpc. User will be free to update tpc on their own.
I'll change it to >=1
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.
What's the issue with having it as a dependency though? It's not clear
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.
Having it as a dependency prevent users from having for example tpc v1.2.30. If set in peerDeps tpc should be updatable by users without tpc's version being locked by @nuxt/scripts
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.
Seems like a reasonable constraint to avoid breaking behaviours. If TPC introduces new scripts or config we'd need to add code to support them anyway.
Users can always override the version if they really need
I'm still not convinced TPC in its current format will be worth maintaining with Nuxt Scripts in the long term but I'm happy to move this forward for the time being once comments are addressed. Either way this is a nice solution to avoiding the runtime of TPC, great work @huang-julien 👏 |
This PR re-introduce TPC as dependency and not type provider. TPC will be used to generate all composables (and components if possible).
Composables and components will be generated at USER build-time and not at @nuxt/scripts.
steps:
optionnal: