@simbo/git-exec 1.0.0 → 1.0.2
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/CHANGELOG.md +19 -0
- package/LICENSE.md +1 -1
- package/README.md +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @simbo/git-exec
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c017ffe: Set the license year to 2026, the year the package was first
|
|
8
|
+
published.
|
|
9
|
+
|
|
10
|
+
- `LICENSE.md` and the license link in `README.md` name 2026 instead of 2025.
|
|
11
|
+
|
|
12
|
+
## 1.0.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 0bbde2e: Document when `GitError.exitCode` is `undefined`.
|
|
17
|
+
|
|
18
|
+
- The README explains that `exitCode` is `undefined` when Git could not be
|
|
19
|
+
started, was terminated by a signal, or exceeded `maxBuffer`.
|
|
20
|
+
- An example shows how to tell a failed command from a Git that could not run.
|
|
21
|
+
|
|
3
22
|
## 1.0.0
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright ©
|
|
3
|
+
Copyright © 2026 Simon Lepel <simbo@simbo.de> (https://simbo.de)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
package/README.md
CHANGED
|
@@ -80,6 +80,22 @@ try {
|
|
|
80
80
|
exits with a non-zero code, is terminated, or exceeds `maxBuffer`. The message
|
|
81
81
|
contains the command, the reason, and the standard error output.
|
|
82
82
|
|
|
83
|
+
`exitCode` holds the exit code when Git exited on its own. It is `undefined`
|
|
84
|
+
when Git could not be started, was terminated by a signal, or was stopped for
|
|
85
|
+
exceeding `maxBuffer`. Check it to tell a failed command from a Git that could
|
|
86
|
+
not run:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
try {
|
|
90
|
+
await git(['fetch', 'origin'], { cwd: root });
|
|
91
|
+
} catch (error) {
|
|
92
|
+
if (error instanceof GitError && error.exitCode === undefined) {
|
|
93
|
+
throw error; // Git did not run to completion
|
|
94
|
+
}
|
|
95
|
+
// Git ran and reported a failure
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
83
99
|
`gitSucceeds()` returns `false` only for a non-zero exit code. If Git cannot run
|
|
84
100
|
at all, it rejects, so that a missing Git or working directory is not mistaken
|
|
85
101
|
for a failed check.
|
|
@@ -121,4 +137,4 @@ await git([
|
|
|
121
137
|
|
|
122
138
|
## License
|
|
123
139
|
|
|
124
|
-
[MIT © Simon Lepel](https://simbo.mit-license.org/
|
|
140
|
+
[MIT © Simon Lepel](https://simbo.mit-license.org/2026/)
|