@optique/git 0.10.0-dev.288 → 0.10.0-dev.290
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.
- package/README.md +2 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,10 +91,10 @@ const result = await parseAsync(parser, ["main"]);
|
|
|
91
91
|
~~~~
|
|
92
92
|
|
|
93
93
|
Options:
|
|
94
|
+
|
|
94
95
|
- `dir`: Git repository directory (defaults to current working directory)
|
|
95
96
|
- `metavar`: Metavar name for help text (default: `"BRANCH"`)
|
|
96
97
|
|
|
97
|
-
|
|
98
98
|
### `gitRemoteBranch(remote, options?)`
|
|
99
99
|
|
|
100
100
|
A value parser for remote branch names. Validates that the input matches an
|
|
@@ -113,7 +113,6 @@ const result = await parseAsync(parser, ["--branch=main"]);
|
|
|
113
113
|
// Valid remote branch on origin
|
|
114
114
|
~~~~
|
|
115
115
|
|
|
116
|
-
|
|
117
116
|
### `gitTag(options?)`
|
|
118
117
|
|
|
119
118
|
A value parser for tag names. Validates that the input matches an existing tag
|
|
@@ -132,7 +131,6 @@ const result = await parseAsync(parser, ["--tag=v1.0.0"]);
|
|
|
132
131
|
// Valid tag
|
|
133
132
|
~~~~
|
|
134
133
|
|
|
135
|
-
|
|
136
134
|
### `gitRemote(options?)`
|
|
137
135
|
|
|
138
136
|
A value parser for remote names. Validates that the input matches an existing
|
|
@@ -151,7 +149,6 @@ const result = await parseAsync(parser, ["--remote=origin"]);
|
|
|
151
149
|
// Valid remote
|
|
152
150
|
~~~~
|
|
153
151
|
|
|
154
|
-
|
|
155
152
|
### `gitCommit(options?)`
|
|
156
153
|
|
|
157
154
|
A value parser for commit SHAs. Validates that the input is a valid commit SHA
|
|
@@ -170,7 +167,6 @@ const result = await parseAsync(parser, ["--commit=abc1234"]);
|
|
|
170
167
|
// Valid commit SHA
|
|
171
168
|
~~~~
|
|
172
169
|
|
|
173
|
-
|
|
174
170
|
### `gitRef(options?)`
|
|
175
171
|
|
|
176
172
|
A value parser for any Git reference (branches, tags, or commits). Validates
|
|
@@ -189,7 +185,6 @@ const result = await parseAsync(parser, ["--ref=v1.0.0"]);
|
|
|
189
185
|
// Valid branch, tag, or commit
|
|
190
186
|
~~~~
|
|
191
187
|
|
|
192
|
-
|
|
193
188
|
### `createGitParsers(options?)`
|
|
194
189
|
|
|
195
190
|
Creates a factory for Git parsers with shared configuration. All parsers
|
|
@@ -211,6 +206,7 @@ const parser = object({
|
|
|
211
206
|
~~~~
|
|
212
207
|
|
|
213
208
|
The factory returns a `GitParsers` object with the following methods:
|
|
209
|
+
|
|
214
210
|
- `branch(options?)` - Same as `gitBranch()`
|
|
215
211
|
- `remoteBranch(remote, options?)` - Same as `gitRemoteBranch()`
|
|
216
212
|
- `tag(options?)` - Same as `gitTag()`
|