invertase / invertase/melos

request: add support for message in shared dependencies

Open
#692 7 comments 0 reactions 0 assignees View on GitHub
feature request type: accepted
Dominant language
Dart
Stars
1.5k
Forks
259
Avg merge
3h 11m
Merged PRs (30d)
19

Description

### Is there an existing feature request for this?

- [X] I have searched the existing issues.

### 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:
```yaml
name: package_a

environment:
sdk: ^3.3.1 # THIS LINE IS AUTOGENERATED - TO UPDATE MODIFY "melos.yaml"

dependencies:
retrofit: 4.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE MODIFY "melos.yaml"
```

The message can be configured directly in the `melos.yaml` file.

Contributor guide

Open the contributing guide

Research direction

Start by reading the shared-dependency generation behavior and the melos.yaml configuration, then compare the Flutter pubspec example linked in the issue. Done means generated shared dependencies include a configurable message directing contributors to update melos.yaml rather than the generated package files.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.