@ferrflow/doc 7.34.1 → 7.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,47 @@ At the end it lists the commits, the files written and the tags created, then de
84
84
 
85
85
  ---
86
86
 
87
+ ## `ferrflow snapshot`
88
+
89
+ Stamp every package with pending changes with a throwaway pre-release version, for a PR preview build.
90
+
91
+ ```bash
92
+ ferrflow snapshot --tag <SUFFIX> [--from-zero] [--no-git] [--run-hooks]
93
+ ```
94
+
95
+ | Flag | Description |
96
+ | ---------------- | ------------------------------------------------------------------------ |
97
+ | `--tag <SUFFIX>` | Pre-release suffix, e.g. `pr-123`. Must be a valid semver pre-release |
98
+ | `--from-zero` | Use `0.0.0-<SUFFIX>.<sha>` instead of the computed next version |
99
+ | `--no-git` | Skip the clean working tree check, for checkouts CI already modified |
100
+ | `--run-hooks` | Run the `pre_publish` and `post_publish` hooks with the snapshot version |
101
+
102
+ The next version is computed from every commit since each package's last release, then its pre-release part is replaced: `1.3.0` becomes `1.3.0-pr-123.abc1234`, where `abc1234` is the short HEAD commit. Only versioned files are written, plus lockfiles when `updateLockfiles` is on. There is no changelog, commit, tag or push, and configured publishers do not run, so nothing can move a `latest` dist-tag. With `--dry-run` nothing is written.
103
+
104
+ It prints one JSON object on stdout:
105
+
106
+ ```json
107
+ {
108
+ "tag": "pr-123",
109
+ "commit": "abc1234",
110
+ "dry_run": false,
111
+ "packages": [
112
+ {
113
+ "name": "cli",
114
+ "version": "1.3.0-pr-123.abc1234",
115
+ "previous_version": "1.2.0"
116
+ }
117
+ ]
118
+ }
119
+ ```
120
+
121
+ ```bash
122
+ ferrflow snapshot --tag "pr-$PR_NUMBER" > snapshot.json
123
+ npm publish --tag "pr-$PR_NUMBER"
124
+ ```
125
+
126
+ ---
127
+
87
128
  ## `ferrflow check`
88
129
 
89
130
  Preview what `ferrflow release` would do without making any changes.
@@ -53,6 +53,47 @@ Avec `releaseCommitMode: "pr"`, le clone reçoit le commit et les tags qui arriv
53
53
 
54
54
  ---
55
55
 
56
+ ## `ferrflow snapshot`
57
+
58
+ Donner à chaque package qui a des changements en attente une version de pré-release jetable, pour un build de preview de PR.
59
+
60
+ ```bash
61
+ ferrflow snapshot --tag <SUFFIXE> [--from-zero] [--no-git] [--run-hooks]
62
+ ```
63
+
64
+ | Option | Description |
65
+ | ----------------- | ------------------------------------------------------------------------------------- |
66
+ | `--tag <SUFFIXE>` | Suffixe de pré-release, par exemple `pr-123`. Doit être une pré-release semver valide |
67
+ | `--from-zero` | Utiliser `0.0.0-<SUFFIXE>.<sha>` au lieu de la prochaine version calculée |
68
+ | `--no-git` | Ne pas exiger un working tree propre, pour un checkout déjà modifié par la CI |
69
+ | `--run-hooks` | Exécuter les hooks `pre_publish` et `post_publish` avec la version snapshot |
70
+
71
+ La prochaine version est calculée à partir de tous les commits depuis la dernière release de chaque package, puis sa partie pré-release est remplacée : `1.3.0` devient `1.3.0-pr-123.abc1234`, où `abc1234` est le commit HEAD abrégé. Seuls les fichiers versionnés sont écrits, ainsi que les lockfiles quand `updateLockfiles` est activé. Pas de changelog, de commit, de tag ni de push, et les publishers configurés ne tournent pas, donc rien ne peut déplacer un dist-tag `latest`. Avec `--dry-run`, rien n'est écrit.
72
+
73
+ La commande affiche un objet JSON sur stdout :
74
+
75
+ ```json
76
+ {
77
+ "tag": "pr-123",
78
+ "commit": "abc1234",
79
+ "dry_run": false,
80
+ "packages": [
81
+ {
82
+ "name": "cli",
83
+ "version": "1.3.0-pr-123.abc1234",
84
+ "previous_version": "1.2.0"
85
+ }
86
+ ]
87
+ }
88
+ ```
89
+
90
+ ```bash
91
+ ferrflow snapshot --tag "pr-$PR_NUMBER" > snapshot.json
92
+ npm publish --tag "pr-$PR_NUMBER"
93
+ ```
94
+
95
+ ---
96
+
56
97
  ## `ferrflow check`
57
98
 
58
99
  Prévisualiser ce que `ferrflow release` ferait sans effectuer de changements.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferrflow/doc",
3
- "version": "7.34.1",
3
+ "version": "7.35.1",
4
4
  "description": "Documentation for FerrFlow, the universal semantic versioning CLI. Rendered at ferrflow.com/docs.",
5
5
  "license": "MIT",
6
6
  "repository": {