You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/publishing.md
+46-8Lines changed: 46 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Packages in this repo fall into the following categories:
29
29
30
30
1. Tells Dart to share dependency resolution and a lockfile with the monorepo.
31
31
32
-
2. Tells to use current repo as a source for the package, not pub.dev (for local runs).
32
+
2. Tells to use **current repo as a source** for the package, not pub.dev (for local runs).
33
33
34
34
Note that a package can opt out (by omitting `resolution: workspace`) to have separate dependency resolution.
35
35
@@ -41,11 +41,13 @@ The packages code should be always release ready. That means:
41
41
42
42
1.1. The package is planned to be released in the future. In this case it is published with `-wip` suffix in order to reserve the package name.
43
43
44
-
1.2. The package's changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs).
44
+
1.2. The package's last changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs).
45
45
46
46
You can publish `-wip<number>` versions (where `<number>` is a three-digit, zero padded integer like `-wip003`), if you need it for development.
47
47
48
-
2. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version. (There is no detailed guidance how to define this flag yet. It should be outlined when it is needed. Please create an issue if you need it soon.)
48
+
2. Remove `-wip` suffix from a version in `pubspec.yaml`, if your change in this package is publishable.
49
+
50
+
3. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version. (There is no detailed guidance how to define this flag yet. It should be outlined when it is needed. Please create an issue if you need it soon.)
49
51
50
52
## Versioning
51
53
@@ -60,19 +62,25 @@ major number for breaking changes.
1.**Auto**: The workflow job `publish / validate` will:
66
+
- check if the PR follows [firehose rules](https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose).
67
+
- add a table [like this](https://github.com/flutter/genui/pull/941#issuecomment-4556675732) to each PR.
68
+
69
+
2.**Manual**: After reviewing and merging the PR, for each 'ready to publish' version the author of the PR should run `flutter pub publish` or `dart pub publish`.
64
70
65
-
## How upgrade of dependencies (for both siblings and third party) happens?
71
+
TODO(polinach): update this section after fix of https://github.com/dart-lang/ecosystem/issues/418.
66
72
67
-
### For local development runs
73
+
## How upgrade of dependencies happens?
74
+
75
+
### For run in workspace
68
76
69
77
For packages with `resolution: workspace` in their pubspec.yaml, pub resolves every sibling from its local source directory — not from pub.dev, as long as its `version:` satisfies the consumer's constraint.
70
78
71
79
If a local bump escapes that constraint (e.g. `^0.9.0` → `0.10.0`), you must update the consumer's `pubspec.yaml` in the same PR. While `dart pub` natively silently falls back to the published version on pub.dev, **our `test_and_fix` CI suite contains a verification step that will explicitly throw an error** and fail your PR if internal workspace version constraints are not met.
72
80
73
-
### For runs by external packages
81
+
### For global dependencies
74
82
75
-
After a new version of a dependency (including sibling package in this repo) is published, this is how upgrade will happen:
83
+
After a new version of a dependency is published, this is how upgrade will happen:
76
84
77
85
1.[Dependabot] detects the new version on pub.dev and opens a PR per dependency, bumping the constraint in each consuming `pubspec.yaml`. See [About Dependabot version updates] for details.
78
86
2. The PR runs `publish / validate` and the rest of CI.
@@ -83,3 +91,33 @@ TODO: Consume solution for [dependabot issue][dependabot/dependabot-core#15057]
83
91
[Dependabot]: ../../.github/dependabot.yaml
84
92
[About Dependabot version updates]: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates
0 commit comments