codemodctl 0.1.16 → 0.1.18
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/dist/cli.js +4 -4
- package/dist/{codeowner-analysis-CkGR1oU6.d.ts → codeowner-analysis-CBrsUJBb.d.ts} +1 -1
- package/dist/{codeowner-analysis-BcFoet6s.js → codeowner-analysis-DlwMGduk.js} +1 -1
- package/dist/codeowners.d.ts +1 -1
- package/dist/codeowners.js +1 -1
- package/dist/{consistent-sharding-lYO6XLIO.js → consistent-sharding-BfgFDhwr.js} +1 -1
- package/dist/{consistent-sharding-B-Si8jYX.d.ts → consistent-sharding-DhhmhZM-.d.ts} +1 -1
- package/dist/{directory-analysis-v_cncT1X.js → directory-analysis-D4YprDWr.js} +3 -2
- package/dist/directory.d.ts +3 -1
- package/dist/directory.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/sharding.d.ts +1 -1
- package/dist/sharding.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./codemod-cli-DailrcEf.js";
|
|
3
|
-
import { analyzeCodeowners } from "./codeowner-analysis-
|
|
4
|
-
import "./consistent-sharding-
|
|
5
|
-
import { analyzeDirectories } from "./directory-analysis-
|
|
3
|
+
import { analyzeCodeowners } from "./codeowner-analysis-DlwMGduk.js";
|
|
4
|
+
import "./consistent-sharding-BfgFDhwr.js";
|
|
5
|
+
import { analyzeDirectories } from "./directory-analysis-D4YprDWr.js";
|
|
6
6
|
import { defineCommand, runMain } from "citty";
|
|
7
7
|
import crypto from "node:crypto";
|
|
8
8
|
import { $ } from "execa";
|
|
@@ -164,7 +164,7 @@ const gitCommand = defineCommand({
|
|
|
164
164
|
name: "git",
|
|
165
165
|
description: "Git operations"
|
|
166
166
|
},
|
|
167
|
-
subCommands: {
|
|
167
|
+
subCommands: { "create-pr": createPrCommand }
|
|
168
168
|
});
|
|
169
169
|
|
|
170
170
|
//#endregion
|
package/dist/codeowners.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-
|
|
1
|
+
import { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-CBrsUJBb.js";
|
|
2
2
|
export { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName };
|
package/dist/codeowners.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./codemod-cli-DailrcEf.js";
|
|
3
|
-
import { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-
|
|
3
|
+
import { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-DlwMGduk.js";
|
|
4
4
|
|
|
5
5
|
export { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName };
|
|
@@ -53,7 +53,7 @@ function getShardForFilename(filename, { shardCount }) {
|
|
|
53
53
|
* @returns True if file is in the shard's files list
|
|
54
54
|
*/
|
|
55
55
|
function fitsInShard(filename, shard) {
|
|
56
|
-
return shard.
|
|
56
|
+
return shard._meta_files.includes(filename);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* Distributes files across shards using deterministic hashing
|
|
@@ -30,7 +30,7 @@ declare function getShardForFilename(filename: string, {
|
|
|
30
30
|
* @returns True if file is in the shard's files list
|
|
31
31
|
*/
|
|
32
32
|
declare function fitsInShard(filename: string, shard: {
|
|
33
|
-
|
|
33
|
+
_meta_files: string[];
|
|
34
34
|
}): boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Distributes files across shards using deterministic hashing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { getApplicableFiles } from "./codemod-cli-DailrcEf.js";
|
|
3
|
-
import { calculateOptimalShardCount, distributeFilesAcrossShards } from "./consistent-sharding-
|
|
3
|
+
import { calculateOptimalShardCount, distributeFilesAcrossShards } from "./consistent-sharding-BfgFDhwr.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/directory-analysis.ts
|
|
@@ -60,7 +60,8 @@ function createDirectoryShards(filesByDirectory, shardSize, existingState) {
|
|
|
60
60
|
directory,
|
|
61
61
|
shard: shardIndex + 1,
|
|
62
62
|
shardCount,
|
|
63
|
-
|
|
63
|
+
_meta_files: shardFiles.sort(),
|
|
64
|
+
name: `${directory} (${shardIndex + 1}/${shardCount})`
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
}
|
package/dist/directory.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ interface DirectoryShardResult {
|
|
|
10
10
|
/** Total number of shards for this directory */
|
|
11
11
|
shardCount: number;
|
|
12
12
|
/** Array of file paths in this shard */
|
|
13
|
-
|
|
13
|
+
_meta_files: string[];
|
|
14
|
+
/** The name of the shard */
|
|
15
|
+
name: string;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Options for directory-based analysis
|
package/dist/directory.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./codemod-cli-DailrcEf.js";
|
|
3
|
-
import "./consistent-sharding-
|
|
4
|
-
import { analyzeDirectories, createDirectoryShards, groupFilesByDirectory } from "./directory-analysis-
|
|
3
|
+
import "./consistent-sharding-BfgFDhwr.js";
|
|
4
|
+
import { analyzeDirectories, createDirectoryShards, groupFilesByDirectory } from "./directory-analysis-D4YprDWr.js";
|
|
5
5
|
|
|
6
6
|
export { analyzeDirectories, createDirectoryShards, groupFilesByDirectory };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-
|
|
2
|
-
import { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-
|
|
1
|
+
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-DhhmhZM-.js";
|
|
2
|
+
import { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-CBrsUJBb.js";
|
|
3
3
|
export { CodeownerAnalysisOptions, CodeownerAnalysisResult, ShardResult, TeamFileInfo, analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, findCodeownersFile, fitsInShard, generateShards, getFileHashPosition, getNumericFileNameSha1, getShardForFilename, getTeamFileInfo, normalizeOwnerName };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "./codemod-cli-DailrcEf.js";
|
|
3
|
-
import { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-
|
|
4
|
-
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-
|
|
3
|
+
import { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, findCodeownersFile, generateShards, getTeamFileInfo, normalizeOwnerName } from "./codeowner-analysis-DlwMGduk.js";
|
|
4
|
+
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-BfgFDhwr.js";
|
|
5
5
|
|
|
6
6
|
export { analyzeCodeowners, analyzeFilesByOwner, analyzeFilesWithoutOwner, analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, findCodeownersFile, fitsInShard, generateShards, getFileHashPosition, getNumericFileNameSha1, getShardForFilename, getTeamFileInfo, normalizeOwnerName };
|
package/dist/sharding.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-
|
|
1
|
+
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-DhhmhZM-.js";
|
|
2
2
|
export { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename };
|
package/dist/sharding.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-
|
|
2
|
+
import { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename } from "./consistent-sharding-BfgFDhwr.js";
|
|
3
3
|
|
|
4
4
|
export { analyzeShardScaling, calculateOptimalShardCount, distributeFilesAcrossShards, fitsInShard, getFileHashPosition, getNumericFileNameSha1, getShardForFilename };
|