-
Notifications
You must be signed in to change notification settings - Fork 936
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
component and workspace configuration #2456
Comments
@GiladShoham please remind me, why do we need |
We discuessed it. |
See my comment there. I do think we can use valid package names instead. Happy to hear your thoughts. |
irrelevant |
This issue is a task list for many tasks required for an extension to be able to use bit's config (both from workspace and components)
This is related to some of the tasks in issue: #2455
checklist
below you can find more details for some of the tasks
implementation
tests
details
variants are similar to the old overrides property we used to have (each entry inside is a component glob pattern)
We can do it by identity there is bit.env path in the file
the merge will be done based on a top-level property similar to do something like
object.assign(bit config, extension config, workspace config, component package.json)
But some of the props will have special merge strategies:
for example, dependencies (all types - runtime / dev and peer) can be overridden completely by the user if he specify those props in the package.json (this will eliminate completely the automatic dependency definition by bit)
but there are special props (exact names TBD) - dependenciesOverrides.(runtime,dev,peer), values from there will be merged into the dependencies instead of compleltly override them. those props also support the "+" and "-" symbols to add/remove dependencies). for example if an extension wants to add react in v16.0.0 he will return:
@component.main
In case the user overrides them, he overrides all of them.
If he wants to use the + / - to modify the deps it will be under
@component.dependences
,@component.devDependences
,@component.peerDependences
The text was updated successfully, but these errors were encountered: