@pnpm/network.git-utils 1100.0.2 → 1100.0.4
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 +13 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +10 -0
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @pnpm/network.git-utils
|
|
2
|
+
|
|
3
|
+
## 1100.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `pnpm publish` now allows a detached Git HEAD in CI, including checkouts of release tags. The working tree must still be clean. Branch and remote-history checks still apply when HEAD is attached [pnpm/pnpm#5894](https://github.com/pnpm/pnpm/issues/5894).
|
|
8
|
+
|
|
9
|
+
## 1100.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Republished every package: the tarballs published by the v11.13.1 through v11.16.0 releases were missing most of their compiled files due to a packing bug [#13164](https://github.com/pnpm/pnpm/issues/13164).
|
package/lib/index.d.ts
CHANGED
|
@@ -3,5 +3,7 @@ export interface GitCwdOptions {
|
|
|
3
3
|
}
|
|
4
4
|
export declare function isGitRepo(opts?: GitCwdOptions): Promise<boolean>;
|
|
5
5
|
export declare function getCurrentBranch(opts?: GitCwdOptions): Promise<string | null>;
|
|
6
|
+
/** Returns false when Git cannot verify HEAD or HEAD refers to a branch. */
|
|
7
|
+
export declare function isHeadDetached(opts?: GitCwdOptions): Promise<boolean>;
|
|
6
8
|
export declare function isWorkingTreeClean(opts?: GitCwdOptions): Promise<boolean>;
|
|
7
9
|
export declare function isRemoteHistoryClean(opts?: GitCwdOptions): Promise<boolean>;
|
package/lib/index.js
CHANGED
|
@@ -23,6 +23,16 @@ export async function getCurrentBranch(opts = {}) {
|
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
/** Returns false when Git cannot verify HEAD or HEAD refers to a branch. */
|
|
27
|
+
export async function isHeadDetached(opts = {}) {
|
|
28
|
+
try {
|
|
29
|
+
const { stdout } = await execa('git', ['rev-parse', '--verify', '--symbolic-full-name', 'HEAD'], { cwd: opts.cwd });
|
|
30
|
+
return stdout === 'HEAD';
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
26
36
|
export async function isWorkingTreeClean(opts = {}) {
|
|
27
37
|
try {
|
|
28
38
|
const { stdout: status } = await execa('git', ['status', '--porcelain'], { cwd: opts.cwd });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/network.git-utils",
|
|
3
|
-
"version": "1100.0.
|
|
3
|
+
"version": "1100.0.4",
|
|
4
4
|
"description": "Utilities for git",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"funding": "https://opencollective.com/pnpm",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/pnpm/pnpm/tree/main/network/git-utils"
|
|
15
|
+
"url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/network/git-utils"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/network/git-utils#readme",
|
|
17
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/network/git-utils#readme",
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
20
20
|
},
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@jest/globals": "30.4.1",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
36
|
+
"@pnpm/network.git-utils": "1100.0.4",
|
|
37
|
+
"tempy": "3.0.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=22.13"
|