@alxwlw/stack 1.11.0 → 1.12.0
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/canon/catalogs.json
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"dependency-cruiser": "18.8.0-beta-2",
|
|
11
11
|
"vitest": "5.1.0",
|
|
12
12
|
"@playwright/test": "1.64.1",
|
|
13
|
-
"@alxwlw/stack": "1.
|
|
14
|
-
"@alxwlw/oxlint-config": "1.
|
|
15
|
-
"@alxwlw/tsconfig": "1.
|
|
13
|
+
"@alxwlw/stack": "1.12.0",
|
|
14
|
+
"@alxwlw/oxlint-config": "1.12.0",
|
|
15
|
+
"@alxwlw/tsconfig": "1.12.0"
|
|
16
16
|
},
|
|
17
17
|
"libs": {
|
|
18
18
|
"@nestjs/core": "12.3.2",
|
package/package.json
CHANGED
package/src/sync-pr.ts
CHANGED
|
@@ -41,15 +41,18 @@ interface GitResult {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// Окружение дочернего процесса без GH_TOKEN: токен нужен только gh. git-хуки и скрипты зависимостей
|
|
44
|
-
// consumer'а исполняют чужой код и токена не получают (sync.yml даёт его
|
|
44
|
+
// consumer'а исполняют чужой код и токена не получают (sync.yml даёт его одному шагу вызова, а команда не передаёт ни git, ни proto, ни pnpm, ни хуку).
|
|
45
45
|
export function withoutGhToken(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
|
|
46
46
|
const rest = { ...env };
|
|
47
47
|
delete rest.GH_TOKEN;
|
|
48
48
|
return rest;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// Хуки consumer'а (их ставит `pnpm install`) не роняют и не блокируют sync-PR: результат проверяет CI
|
|
52
|
+
// consumer'а на PR. `-c` из командной строки сильнее `core.hooksPath` из `.git/config`, а `.git/hooks`
|
|
53
|
+
// при заданном hooksPath не читается вовсе.
|
|
51
54
|
function runGit(cwd: string, args: readonly string[]): GitResult {
|
|
52
|
-
const r = spawnSync('git', args, {
|
|
55
|
+
const r = spawnSync('git', ['-c', 'core.hooksPath=/dev/null', ...args], {
|
|
53
56
|
cwd,
|
|
54
57
|
encoding: 'utf8',
|
|
55
58
|
maxBuffer: 1 << 30,
|
|
@@ -80,7 +83,7 @@ function changedFiles(repoRoot: string): string[] {
|
|
|
80
83
|
const message = (error: unknown): string =>
|
|
81
84
|
error instanceof Error ? error.message : String(error);
|
|
82
85
|
|
|
83
|
-
//
|
|
86
|
+
// Всё после установки и хука: список изменённых файлов, пользователь бота, ветка, commit, force-push, PR.
|
|
84
87
|
export async function publishChanges(
|
|
85
88
|
opts: PublishOptions,
|
|
86
89
|
github: GitHub,
|