@zukhruf/git-hooks 0.8.20 → 0.8.22

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.
Files changed (115) hide show
  1. package/README.md +275 -37
  2. package/dist/build.d.ts +1 -1
  3. package/dist/build.d.ts.map +1 -1
  4. package/dist/build.js +44 -46
  5. package/dist/build.js.map +1 -1
  6. package/dist/codegen.d.ts.map +1 -1
  7. package/dist/codegen.js +41 -8
  8. package/dist/codegen.js.map +1 -1
  9. package/dist/commit.d.ts +29 -10
  10. package/dist/commit.d.ts.map +1 -1
  11. package/dist/commit.js +244 -85
  12. package/dist/commit.js.map +1 -1
  13. package/dist/dependency-checks.d.ts.map +1 -1
  14. package/dist/dependency-checks.js +49 -44
  15. package/dist/dependency-checks.js.map +1 -1
  16. package/dist/dockerfile-installs.d.ts +7 -0
  17. package/dist/dockerfile-installs.d.ts.map +1 -0
  18. package/dist/dockerfile-installs.js +132 -0
  19. package/dist/dockerfile-installs.js.map +1 -0
  20. package/dist/format.d.ts.map +1 -1
  21. package/dist/format.js +33 -24
  22. package/dist/format.js.map +1 -1
  23. package/dist/git.d.ts +3 -0
  24. package/dist/git.d.ts.map +1 -0
  25. package/dist/git.js +20 -0
  26. package/dist/git.js.map +1 -0
  27. package/dist/index.d.ts +8 -3
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +3 -3
  30. package/dist/index.js.map +1 -1
  31. package/dist/lockfile-sync.d.ts +8 -0
  32. package/dist/lockfile-sync.d.ts.map +1 -0
  33. package/dist/lockfile-sync.js +82 -0
  34. package/dist/lockfile-sync.js.map +1 -0
  35. package/dist/no-numeric-pins.d.ts.map +1 -1
  36. package/dist/no-numeric-pins.js +12 -3
  37. package/dist/no-numeric-pins.js.map +1 -1
  38. package/dist/npm/lockfile.d.ts +18 -0
  39. package/dist/npm/lockfile.d.ts.map +1 -0
  40. package/dist/npm/lockfile.js +108 -0
  41. package/dist/npm/lockfile.js.map +1 -0
  42. package/dist/npmrc-policy.d.ts +7 -0
  43. package/dist/npmrc-policy.d.ts.map +1 -0
  44. package/dist/npmrc-policy.js +93 -0
  45. package/dist/npmrc-policy.js.map +1 -0
  46. package/dist/push.d.ts +14 -9
  47. package/dist/push.d.ts.map +1 -1
  48. package/dist/push.js +20 -93
  49. package/dist/push.js.map +1 -1
  50. package/dist/ref-update.d.ts +1 -1
  51. package/dist/ref-update.d.ts.map +1 -1
  52. package/dist/run/commit-msg.d.ts +9 -0
  53. package/dist/run/commit-msg.d.ts.map +1 -0
  54. package/dist/run/commit-msg.js +8 -0
  55. package/dist/run/commit-msg.js.map +1 -0
  56. package/dist/run/pre-commit.d.ts +14 -0
  57. package/dist/run/pre-commit.d.ts.map +1 -0
  58. package/dist/run/pre-commit.js +41 -0
  59. package/dist/run/pre-commit.js.map +1 -0
  60. package/dist/run/pre-push.d.ts +14 -0
  61. package/dist/run/pre-push.d.ts.map +1 -0
  62. package/dist/run/pre-push.js +27 -0
  63. package/dist/run/pre-push.js.map +1 -0
  64. package/dist/run/step-runner.d.ts +17 -0
  65. package/dist/run/step-runner.d.ts.map +1 -0
  66. package/dist/run/step-runner.js +27 -0
  67. package/dist/run/step-runner.js.map +1 -0
  68. package/dist/scripts/commit-msg.d.ts +1 -1
  69. package/dist/scripts/commit-msg.d.ts.map +1 -1
  70. package/dist/scripts/commit-msg.js +14 -19
  71. package/dist/scripts/commit-msg.js.map +1 -1
  72. package/dist/scripts/host.d.ts +10 -0
  73. package/dist/scripts/host.d.ts.map +1 -0
  74. package/dist/scripts/host.js +37 -0
  75. package/dist/scripts/host.js.map +1 -0
  76. package/dist/scripts/pre-commit.d.ts +1 -1
  77. package/dist/scripts/pre-commit.d.ts.map +1 -1
  78. package/dist/scripts/pre-commit.js +14 -17
  79. package/dist/scripts/pre-commit.js.map +1 -1
  80. package/dist/scripts/pre-push.d.ts +1 -1
  81. package/dist/scripts/pre-push.d.ts.map +1 -1
  82. package/dist/scripts/pre-push.js +16 -32
  83. package/dist/scripts/pre-push.js.map +1 -1
  84. package/dist/snapshot/drift.d.ts +0 -2
  85. package/dist/snapshot/drift.d.ts.map +1 -1
  86. package/dist/snapshot/drift.js +5 -57
  87. package/dist/snapshot/drift.js.map +1 -1
  88. package/dist/snapshot/installs.d.ts +1 -0
  89. package/dist/snapshot/installs.d.ts.map +1 -1
  90. package/dist/snapshot/installs.js +85 -29
  91. package/dist/snapshot/installs.js.map +1 -1
  92. package/dist/snapshot/snapshot.d.ts +21 -0
  93. package/dist/snapshot/snapshot.d.ts.map +1 -0
  94. package/dist/snapshot/snapshot.js +54 -0
  95. package/dist/snapshot/snapshot.js.map +1 -0
  96. package/dist/snapshot/snapshots.d.ts +30 -0
  97. package/dist/snapshot/snapshots.d.ts.map +1 -0
  98. package/dist/snapshot/snapshots.js +180 -0
  99. package/dist/snapshot/snapshots.js.map +1 -0
  100. package/dist/sync.d.ts.map +1 -1
  101. package/dist/sync.js +16 -16
  102. package/dist/sync.js.map +1 -1
  103. package/dist/testing.d.ts +23 -0
  104. package/dist/testing.d.ts.map +1 -0
  105. package/dist/testing.js +41 -0
  106. package/dist/testing.js.map +1 -0
  107. package/dist/tree.d.ts +24 -0
  108. package/dist/tree.d.ts.map +1 -0
  109. package/dist/tree.js +96 -0
  110. package/dist/tree.js.map +1 -0
  111. package/package.json +10 -4
  112. package/dist/snapshot/nx.d.ts +0 -7
  113. package/dist/snapshot/nx.d.ts.map +0 -1
  114. package/dist/snapshot/nx.js +0 -20
  115. package/dist/snapshot/nx.js.map +0 -1
package/dist/codegen.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Step } from "./step.js";
2
2
  // Builds generated files, such as an OpenAPI spec and the client made from it,
3
- // and stages them. With `when`, it builds only when nx says that one of those
4
- // projects is affected by the staged files: a hand-kept list of inputs would
5
- // miss a file, and an edit that is not staged is not part of the commit.
3
+ // from the staged commit, and stages them. With `when`, it builds only when nx
4
+ // says that one of those projects is affected by the staged changes: a
5
+ // hand-kept list of inputs would miss a file, and an edit that is not staged
6
+ // is not part of the commit.
6
7
  export class Codegen extends Step {
7
8
  name = 'codegen';
8
9
  #when;
@@ -16,13 +17,22 @@ export class Codegen extends Step {
16
17
  }
17
18
  async run(commit) {
18
19
  if (this.#when !== undefined) {
19
- const affected = new Set(await commit.affected());
20
+ const affected = new Set(await affectedProjects(commit));
20
21
  if (!this.#when.some((project) => affected.has(project)))
21
22
  return this.skip(`none of ${this.#when.join(', ')} is affected`);
22
23
  }
24
+ let generated;
23
25
  try {
24
- for (const target of this.#run)
25
- await commit.nx('run', target);
26
+ generated = await commit.generate(this.#stage, async (snapshot) => {
27
+ for (const target of this.#run) {
28
+ const { status, stdout, stderr } = await snapshot.bin('nx', [
29
+ 'run',
30
+ target,
31
+ ]);
32
+ if (status !== 0)
33
+ throw new Error(`nx run ${target} exited with ${status}:\n${`${stdout}${stderr}`.trimEnd()}`);
34
+ }
35
+ });
26
36
  }
27
37
  catch (error) {
28
38
  // A failed build is the step's outcome: the author reads the reason that
@@ -31,8 +41,31 @@ export class Codegen extends Step {
31
41
  throw error;
32
42
  return this.fail(error.message.trimEnd());
33
43
  }
34
- await commit.stage(this.#stage);
35
- return this.pass(`ran ${this.#run.join(', ')}; staged ${this.#stage.join(', ')}`);
44
+ if (generated.kind === 'not-staged')
45
+ return this.fail(generated.reason);
46
+ return this.pass(`ran ${this.#run.join(', ')}; staged ${generated.entries.length === 0 ? 'nothing new' : generated.entries.map(({ path }) => path).join(', ')}`);
36
47
  }
37
48
  }
49
+ // The nx projects that the staged changes affect, as nx in the snapshot of
50
+ // the staged commit lists them.
51
+ async function affectedProjects(commit) {
52
+ const changes = await commit.changes();
53
+ if (changes.length === 0)
54
+ return [];
55
+ const snapshot = await commit.snapshot({ packages: true });
56
+ const { status, stdout, stderr } = await snapshot.bin('nx', [
57
+ 'show',
58
+ 'projects',
59
+ '--affected',
60
+ `--files=${changes.map(({ path }) => path).join(',')}`,
61
+ '--json',
62
+ ]);
63
+ if (status !== 0)
64
+ throw new Error(`nx show projects exited with ${status}:\n${stderr.trimEnd()}`);
65
+ const projects = JSON.parse(stdout);
66
+ if (!Array.isArray(projects) ||
67
+ !projects.every((project) => typeof project === 'string'))
68
+ throw new TypeError(`nx show projects gave ${stdout.trim()}, not a list of names`);
69
+ return projects;
70
+ }
38
71
  //# sourceMappingURL=codegen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.js","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,IAAI,EAAE,MAAM,WAAW,CAAC;AAY/C,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,MAAM,OAAO,OAAQ,SAAQ,IAAY;IAC9B,IAAI,GAAG,SAAS,CAAC;IACjB,KAAK,CAAgC;IACrC,IAAI,CAAoB;IACxB,MAAM,CAAoB;IAEnC,YAAY,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAkB;QAC9C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc;QACtB,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC7B,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACtD,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC;YACH,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,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CAAC;QAE5E,MAAM,IAAI,SAAS,CACjB,yBAAyB,MAAM,CAAC,IAAI,EAAE,uBAAuB,CAC9D,CAAC;IACJ,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/dist/commit.d.ts CHANGED
@@ -1,15 +1,34 @@
1
+ import { PackagedSnapshot, Snapshot } from './snapshot/snapshot.ts';
2
+ import type { Snapshots } from './snapshot/snapshots.ts';
3
+ import { type DiffEntry, Tree } from './tree.ts';
4
+ export type Generated = {
5
+ readonly kind: 'staged';
6
+ readonly entries: readonly DiffEntry[];
7
+ } | {
8
+ readonly kind: 'not-staged';
9
+ readonly entries: readonly DiffEntry[];
10
+ readonly reason: string;
11
+ };
12
+ interface CommitOptions {
13
+ readonly root: string;
14
+ readonly environment: NodeJS.ProcessEnv;
15
+ readonly snapshots: Snapshots;
16
+ readonly notice: (message: string) => void;
17
+ readonly generated: (tree: string) => void;
18
+ }
1
19
  export declare class Commit {
2
20
  #private;
3
- readonly root: string;
4
- constructor(root: string, environment: NodeJS.ProcessEnv);
5
- staged(): Promise<string[]>;
6
- files(): Promise<string[]>;
7
- blob(path: string): Promise<string>;
21
+ constructor({ root, environment, snapshots, notice, generated, }: CommitOptions);
22
+ tree(): Promise<Tree>;
23
+ changes(): Promise<readonly DiffEntry[]>;
8
24
  touches(globs: readonly string[]): Promise<boolean>;
9
- inSnapshot<T>(work: (folder: string) => Promise<T>): Promise<T>;
10
- modified(): Promise<string[]>;
11
- stage(paths: readonly string[]): Promise<void>;
12
- nx(...args: string[]): Promise<string>;
13
- affected(): Promise<string[]>;
25
+ snapshot(options?: {
26
+ readonly packages?: false;
27
+ }): Promise<Snapshot>;
28
+ snapshot(options: {
29
+ readonly packages: true;
30
+ }): Promise<PackagedSnapshot>;
31
+ generate(globs: readonly string[], work: (snapshot: PackagedSnapshot) => Promise<void>): Promise<Generated>;
14
32
  }
33
+ export {};
15
34
  //# sourceMappingURL=commit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commit.d.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';
3
- import { tmpdir } from 'node:os';
4
- import { join, matchesGlob } from 'node:path';
5
- import { promisify } from 'node:util';
6
- import { withoutRepoVariables } from "./repo-variables.js";
7
- const execFileAsync = promisify(execFile);
1
+ import { spawn } from 'node:child_process';
2
+ import { chmod, copyFile, lstat, mkdir, readlink, rm, symlink, } from 'node:fs/promises';
3
+ import { basename, dirname, join, resolve } from 'node:path';
4
+ import { text } from 'node:stream/consumers';
5
+ import { TemporaryFiles } from '@zukhruf/fs';
6
+ import { gitIn } from "./git.js";
7
+ import { PackagedSnapshot, Snapshot } from "./snapshot/snapshot.js";
8
+ import { Tree, changesBetween, matches } from "./tree.js";
9
+ // The author and the committer of the commit that the hook writes from the
10
+ // staged tree. They do not change, so one tree and one parent give one commit.
11
+ const stagedCommitter = {
12
+ GIT_AUTHOR_NAME: 'git-hooks',
13
+ GIT_AUTHOR_EMAIL: 'git-hooks@localhost',
14
+ GIT_AUTHOR_DATE: '@0 +0000',
15
+ GIT_COMMITTER_NAME: 'git-hooks',
16
+ GIT_COMMITTER_EMAIL: 'git-hooks@localhost',
17
+ GIT_COMMITTER_DATE: '@0 +0000',
18
+ };
8
19
  // The staged commit: the index of the repo at `root`. Each read of a staged
9
20
  // file goes to its staged copy, never to the working tree, because other
10
- // sessions can edit the working tree while the hook runs. The environment is
11
- // the hook's own, so git keeps the index that `git commit` gave it in
12
- // GIT_INDEX_FILE.
21
+ // sessions can edit the working tree while the hook runs. The git commands get
22
+ // the hook environment, so git keeps the index that `git commit` gave the hook
23
+ // in GIT_INDEX_FILE. Each tool gets the tool environment, which the host
24
+ // computes, in the snapshots of the hook.
13
25
  export class Commit {
14
- root;
26
+ #root;
15
27
  #environment;
16
- constructor(root, environment) {
17
- this.root = root;
28
+ #snapshots;
29
+ #notice;
30
+ #generated;
31
+ #git;
32
+ constructor({ root, environment, snapshots, notice, generated, }) {
33
+ this.#root = root;
18
34
  this.#environment = environment;
35
+ this.#snapshots = snapshots;
36
+ this.#notice = notice;
37
+ this.#generated = generated;
38
+ this.#git = gitIn(root, environment);
19
39
  }
20
- // The paths that the commit adds, copies, modifies or renames.
21
- async staged() {
22
- const output = await this.#git('diff', '--cached', '--name-only', '--diff-filter=ACMR', '-z');
23
- return output.split('\0').filter((path) => path !== '');
40
+ // The staged tree: the tree that `git write-tree` writes from the index of
41
+ // the hook. Each call writes the tree of the index as it is then.
42
+ async tree() {
43
+ return Tree.list(await this.#stagedTree(), this.#git);
24
44
  }
25
- // The staged paths whose staged copy is the content of a file. The staged
26
- // copy of a link is the path that it points to, and that of a submodule is
27
- // a commit id, so a check of their content would judge the wrong text.
28
- async files() {
29
- const entries = await this.#git('ls-files', '--stage', '-z');
30
- const files = new Set(entries
31
- .split('\0')
32
- .filter((entry) => /^100(644|755) /.test(entry))
33
- .map((entry) => entry.slice(entry.indexOf('\t') + 1)));
34
- return (await this.staged()).filter((path) => files.has(path));
45
+ // The diff entries from the tree of HEAD to the staged tree. A first commit
46
+ // diffs from the empty tree.
47
+ async changes() {
48
+ return changesBetween(this.#git, await this.#revision('HEAD^{tree}'), await this.#stagedTree());
35
49
  }
36
- // The staged copy of one file.
37
- blob(path) {
38
- return this.#git('cat-file', 'blob', `:${path}`);
39
- }
40
- // Whether the commit stages a path that matches one of the globs.
50
+ // Whether a diff entry of the commit matches one of the globs. A deleted
51
+ // path counts, so a commit that only deletes a file that a step watches
52
+ // still starts the step.
41
53
  async touches(globs) {
42
- const staged = await this.staged();
43
- return staged.some((path) => globs.some((glob) => matchesGlob(path, glob)));
54
+ return (await this.changes()).some(({ path }) => matches(path, globs));
55
+ }
56
+ async snapshot({ packages = false, } = {}) {
57
+ const clone = await this.#snapshots.open(await this.#stagedCommit(), 'the staged commit', packages);
58
+ return packages ? new PackagedSnapshot(clone) : new Snapshot(clone);
59
+ }
60
+ // Runs `work` in a private snapshot of the staged commit, with packages,
61
+ // and stages each file that the work changed there and that matches one of
62
+ // the globs: new, modified and deleted files, links and the executable bit
63
+ // as written. The index of the hook gets them; the working-tree copy of a
64
+ // file changes too, but only when it is still the old staged copy, because
65
+ // another session may be editing it. `work` fails by throwing, and then
66
+ // nothing is staged.
67
+ async generate(globs, work) {
68
+ await using clone = await this.#snapshots.openPrivate(await this.#stagedCommit(), 'the staged commit');
69
+ await work(new PackagedSnapshot(clone));
70
+ const entries = await written(gitIn(clone.folder, clone.environment), clone.folder, globs);
71
+ if (entries.length === 0)
72
+ return { kind: 'staged', entries };
73
+ const lines = [];
74
+ for (const entry of entries) {
75
+ const staged = await this.#revision(`:${entry.path}`);
76
+ const copy = await this.#workingObject(entry.path);
77
+ if (entry.change === 'deleted') {
78
+ lines.push(`0 ${'0'.repeat(this.#nullLength(staged))}\t${entry.path}`);
79
+ if (copy === staged)
80
+ await rm(join(this.#root, entry.path), { force: true });
81
+ else
82
+ this.#leftAlone(entry.path);
83
+ continue;
84
+ }
85
+ const source = join(clone.folder, entry.path);
86
+ const { mode, object } = await this.#store(entry.path, source);
87
+ lines.push(`${mode} ${object}\t${entry.path}`);
88
+ if (copy === staged)
89
+ await place(source, join(this.#root, entry.path));
90
+ else
91
+ this.#leftAlone(entry.path);
92
+ }
93
+ if (isPartialCommit(this.#environment))
94
+ return {
95
+ kind: 'not-staged',
96
+ entries,
97
+ reason: [
98
+ 'this commit names its paths (git commit --only or git commit <paths>), so the hook cannot stage what it generated:',
99
+ ...entries.map(({ path }) => ` ${path}`),
100
+ `Commit them with your paths: git commit --only <your paths> ${entries.map(({ path }) => path).join(' ')}`,
101
+ ].join('\n'),
102
+ };
103
+ await this.#updateIndex(`${lines.join('\n')}\n`);
104
+ this.#generated(await this.#stagedTree());
105
+ return { kind: 'staged', entries };
106
+ }
107
+ // The object of the working-tree copy of `path` as git would store it, or
108
+ // undefined when there is none.
109
+ async #workingObject(path) {
110
+ const file = join(this.#root, path);
111
+ const stats = await lstat(file).catch(() => undefined);
112
+ if (stats === undefined)
113
+ return undefined;
114
+ if (stats.isSymbolicLink())
115
+ return (await gitWithInput(this.#root, this.#environment, await readlink(file), ['hash-object', '--stdin'])).trim();
116
+ return (await this.#git('hash-object', `--path=${path}`, '--', file)).trim();
117
+ }
118
+ // Writes the file at `source` into the object store of the repo, as the
119
+ // content of `path`, and gives its mode and object.
120
+ async #store(path, source) {
121
+ const stats = await lstat(source);
122
+ if (stats.isSymbolicLink())
123
+ return {
124
+ mode: '120000',
125
+ object: (await gitWithInput(this.#root, this.#environment, await readlink(source), ['hash-object', '-w', '--stdin'])).trim(),
126
+ };
127
+ return {
128
+ mode: (stats.mode & 0o111) === 0 ? '100644' : '100755',
129
+ object: (await this.#git('hash-object', '-w', `--path=${path}`, '--', source)).trim(),
130
+ };
44
131
  }
45
- // Runs `work` on a copy of the staged tree in a temporary folder, for a
46
- // check that reads many files at once. The folder is removed afterwards.
47
- async inSnapshot(work) {
48
- await using snapshot = await mkdtempDisposable(join(tmpdir(), 'git-hooks-'));
49
- await this.#git('checkout-index', '--all', `--prefix=${snapshot.path}/`);
50
- // Awaited here, so the folder stays until `work` ends.
51
- return await work(snapshot.path);
132
+ // A null object id is all zeros, as long as the ids of the repo: 40 for
133
+ // SHA-1, 64 for SHA-256.
134
+ #nullLength(staged) {
135
+ return staged?.length ?? 40;
52
136
  }
53
- // The tracked files whose working-tree copy differs from the staged copy.
54
- async modified() {
55
- const output = await this.#git('diff', '--name-only', '-z');
56
- return output.split('\0').filter((path) => path !== '');
137
+ #leftAlone(path) {
138
+ this.#notice(`left the working-tree copy of ${path}: it has edits that are not staged`);
57
139
  }
58
- // Stages files that a step wrote itself. A step never stages anything else.
59
- async stage(paths) {
60
- await this.#git('add', '--', ...paths);
140
+ // One update of the index of the hook. It takes the lock of the index, so
141
+ // it fails while a peer's git command holds it.
142
+ async #updateIndex(info) {
143
+ try {
144
+ await gitWithInput(this.#root, this.#environment, info, [
145
+ 'update-index',
146
+ '--index-info',
147
+ ]);
148
+ }
149
+ catch (error) {
150
+ if (Error.isError(error) && /index\.lock/.test(error.message))
151
+ throw new Error('another git process holds the lock of the index, so the hook could not stage what it generated; commit again', { cause: error });
152
+ throw error;
153
+ }
61
154
  }
62
- // Runs the repo's own nx with no daemon, so a hook started from a GUI or an
63
- // agent shell does not leave a daemon behind or read its stale graph. nx
64
- // and its tasks get none of git's variables of the repo, so a task that
65
- // runs git in its own folder never reaches the repo. The git commands of
66
- // the commit keep them, so they read and write the commit's index.
67
- async nx(...args) {
68
- const { stdout } = await execFileAsync(join(this.root, 'node_modules/.bin/nx'), args, {
69
- cwd: this.root,
70
- env: {
71
- ...(await withoutRepoVariables(this.#environment)),
72
- NX_DAEMON: 'false',
73
- },
74
- encoding: 'utf8',
75
- maxBuffer: 2 ** 30,
76
- });
77
- return stdout;
155
+ // `git write-tree` takes the lock of the index, to keep the trees that it
156
+ // wrote, and fails while another process holds it: a peer's `git add`, or
157
+ // the `git status` of an editor. A plain `git commit` does not lock the
158
+ // index while the hook runs. So the tree is written from a private copy of
159
+ // the index of the hook. No index file is an empty index.
160
+ async #stagedTree() {
161
+ await using copy = await new TemporaryFiles().directory('git-hooks-index-');
162
+ const index = join(copy.path, 'index');
163
+ try {
164
+ await copyFile(resolve(this.#root, (await this.#git('rev-parse', '--git-path', 'index')).trim()), index);
165
+ }
166
+ catch (error) {
167
+ if (!Error.isError(error) ||
168
+ !('code' in error) ||
169
+ error.code !== 'ENOENT')
170
+ throw error;
171
+ }
172
+ return (await gitIn(this.#root, { ...this.#environment, GIT_INDEX_FILE: index })('write-tree')).trim();
78
173
  }
79
- // The nx projects that the staged files affect. The files come from the
80
- // staged commit, so an edit that is only in the working tree affects nothing.
81
- async affected() {
82
- const staged = await this.staged();
83
- if (staged.length === 0)
84
- return [];
85
- const output = await this.nx('show', 'projects', '--affected', `--files=${staged.join(',')}`, '--json');
86
- const projects = JSON.parse(output);
87
- if (!Array.isArray(projects) ||
88
- !projects.every((project) => typeof project === 'string'))
89
- throw new TypeError(`nx show projects gave ${output.trim()}, not a list of names`);
90
- return projects;
174
+ // A commit of the staged tree, with HEAD as its parent, that no ref holds.
175
+ // `git gc` prunes it.
176
+ async #stagedCommit() {
177
+ const parent = await this.#revision('HEAD');
178
+ const tree = await this.#stagedTree();
179
+ return (await gitIn(this.#root, { ...this.#environment, ...stagedCommitter })('commit-tree', '--no-gpg-sign', '-m', 'the staged tree', ...(parent === undefined ? [] : ['-p', parent]), tree)).trim();
91
180
  }
92
- async #git(...args) {
93
- const { stdout } = await execFileAsync('git', args, {
94
- cwd: this.root,
95
- env: this.#environment,
96
- encoding: 'utf8',
97
- // A staged file of any size, not Node's default of 1 MiB.
98
- maxBuffer: 2 ** 30,
99
- });
100
- return stdout;
181
+ // The object that `revision` names, or undefined before the first commit.
182
+ async #revision(revision) {
183
+ try {
184
+ return (await this.#git('rev-parse', '--verify', '--quiet', revision)).trim();
185
+ }
186
+ catch (error) {
187
+ // With --quiet, rev-parse exits with 1 and says nothing when HEAD names
188
+ // no commit yet.
189
+ if (Error.isError(error) && 'code' in error && error.code === 1)
190
+ return undefined;
191
+ throw error;
192
+ }
101
193
  }
102
194
  }
195
+ // The paths that `work` wrote in the clone, as diff entries against the
196
+ // commit that the clone checked out, that match one of the globs.
197
+ async function written(git, folder, globs) {
198
+ const status = await git('status', '--porcelain=v1', '-z', '--untracked-files=all', '--no-renames');
199
+ const entries = [];
200
+ for (const record of status.split('\0')) {
201
+ if (record === '')
202
+ continue;
203
+ const code = record.slice(0, 2);
204
+ const path = record.slice(3);
205
+ if (!matches(path, globs))
206
+ continue;
207
+ if (code.includes('D')) {
208
+ entries.push({ change: 'deleted', path });
209
+ continue;
210
+ }
211
+ const kind = (await lstat(join(folder, path))).isSymbolicLink()
212
+ ? 'link'
213
+ : 'file';
214
+ const change = code === '??'
215
+ ? 'added'
216
+ : code.includes('T')
217
+ ? 'type-changed'
218
+ : 'modified';
219
+ entries.push({ change, path, kind });
220
+ }
221
+ return entries;
222
+ }
223
+ // Writes the file or link at `source` to `destination`, with its executable
224
+ // bit.
225
+ async function place(source, destination) {
226
+ await mkdir(dirname(destination), { recursive: true });
227
+ await rm(destination, { force: true });
228
+ const stats = await lstat(source);
229
+ if (stats.isSymbolicLink())
230
+ return symlink(await readlink(source), destination);
231
+ await copyFile(source, destination);
232
+ await chmod(destination, stats.mode & 0o777);
233
+ }
234
+ // git runs the pre-commit hook of `git commit --only` or `git commit <paths>`
235
+ // with a temporary index, `next-index-<pid>.lock`, that it commits and then
236
+ // drops. A file staged there is in the commit, but the index of the repo does
237
+ // not get it, so the next commit would undo it. The name is the only sign of
238
+ // that mode: a predicting check, because no harmless trial tells the modes
239
+ // apart.
240
+ function isPartialCommit(environment) {
241
+ return basename(environment.GIT_INDEX_FILE ?? '').startsWith('next-index-');
242
+ }
243
+ async function gitWithInput(cwd, environment, input, args) {
244
+ const child = spawn('git', args, {
245
+ cwd,
246
+ env: environment,
247
+ stdio: ['pipe', 'pipe', 'pipe'],
248
+ });
249
+ child.stdin.end(input);
250
+ const [stdout, stderr, code] = await Promise.all([
251
+ text(child.stdout),
252
+ text(child.stderr),
253
+ new Promise((resolve, reject) => {
254
+ child.once('error', reject);
255
+ child.once('close', resolve);
256
+ }),
257
+ ]);
258
+ if (code !== 0)
259
+ throw new Error(`git ${args.join(' ')} exited with ${code}: ${stderr.trim()}`);
260
+ return stdout;
261
+ }
103
262
  //# sourceMappingURL=commit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commit.js","sourceRoot":"","sources":["../src/commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAA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MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAwC5C"}
1
+ {"version":3,"file":"dependency-checks.d.ts","sourceRoot":"","sources":["../src/dependency-checks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,KAAK,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAiD/C,qBAAa,gBAAiB,SAAQ,IAAI,CAAC,MAAM,CAAC;IAChD,QAAQ,CAAC,IAAI,kBAAkB;IAEzB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAyD5C"}