Open xsahil03x opened 7 months ago
It makes sense, it's very intrusive though, so definitely as an opt-in. Do we really needed to have the message configurable though? I think that's a bit overkill.
We don't have to, we can decide on a message and use it
Hey, do you have any idea on how can i add a comment using pubspecEditor
? I didn't find anything similar in the code and docs.
I tried something like this but it generates it as a whole string.
pubspecEditor.update(
[pubspecKey, entry.key],
wrapAsYamlNode(
entry.value.toJson() + ' # Generated',
collectionStyle: CollectionStyle.BLOCK,
),
);
Output:
args: "^2.4.1 # Generated"
Hey @spydon, any help here? Thanks
Hey @spydon, any help here? Thanks
Have a look if this package supports that: https://pub.dev/packages/pubspec_manager
We have been thinking of migrating to that package.
Hey @spydon, any help here? Thanks
Have a look if this package supports that: pub.dev/packages/pubspec_manager
We have been thinking of migrating to that package.
Thanks, i will take a look
Is there an existing feature request for this?
Command
No response
Description
There should be an option to also generate message while updating
shared dependencies
.In projects where multiple developers are working, there can be instance where they might not know it's a generated dependency and coming from
melos.yaml
. To ensure no-one modifies the generated dependency directly in the package we should also generate a message mentioning the same.Similar approach is being used in the Flutter repo https://github.com/flutter/flutter/blob/master/packages/flutter/pubspec.yaml#L33-L49
eg:
The message can be configured directly in the
melos.yaml
file.