@aspruyt/json-config-sync 3.9.0 → 3.10.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/dist/index.js CHANGED
@@ -26,14 +26,14 @@ program
26
26
  .option("-w, --work-dir <path>", "Temporary directory for cloning", "./tmp")
27
27
  .option("-r, --retries <number>", "Number of retries for network operations (0 to disable)", (v) => parseInt(v, 10), 3)
28
28
  .option("-b, --branch <name>", "Override the branch name (default: chore/sync-{filename} or chore/sync-config)")
29
- .option("-m, --merge <mode>", "PR merge mode: manual (default), auto (merge when checks pass), force (bypass requirements)", (value) => {
29
+ .option("-m, --merge <mode>", "PR merge mode: manual, auto (default, merge when checks pass), force (bypass requirements)", (value) => {
30
30
  const valid = ["manual", "auto", "force"];
31
31
  if (!valid.includes(value)) {
32
32
  throw new Error(`Invalid merge mode: ${value}. Valid: ${valid.join(", ")}`);
33
33
  }
34
34
  return value;
35
35
  })
36
- .option("--merge-strategy <strategy>", "Merge strategy: merge (default), squash, rebase", (value) => {
36
+ .option("--merge-strategy <strategy>", "Merge strategy: merge, squash (default), rebase", (value) => {
37
37
  const valid = ["merge", "squash", "rebase"];
38
38
  if (!valid.includes(value)) {
39
39
  throw new Error(`Invalid merge strategy: ${value}. Valid: ${valid.join(", ")}`);
@@ -143,14 +143,14 @@ export class RepositoryProcessor {
143
143
  retries,
144
144
  });
145
145
  // Step 10: Handle merge options if configured
146
- const mergeMode = repoConfig.prOptions?.merge ?? "manual";
146
+ const mergeMode = repoConfig.prOptions?.merge ?? "auto";
147
147
  let mergeResult;
148
148
  if (prResult.success && prResult.url && mergeMode !== "manual") {
149
149
  this.log.info(`Handling merge (mode: ${mergeMode})...`);
150
150
  const mergeConfig = {
151
151
  mode: mergeMode,
152
- strategy: repoConfig.prOptions?.mergeStrategy,
153
- deleteBranch: repoConfig.prOptions?.deleteBranch,
152
+ strategy: repoConfig.prOptions?.mergeStrategy ?? "squash",
153
+ deleteBranch: repoConfig.prOptions?.deleteBranch ?? true,
154
154
  bypassReason: repoConfig.prOptions?.bypassReason,
155
155
  };
156
156
  const result = await mergePR({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aspruyt/json-config-sync",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "CLI tool to sync JSON or YAML configuration files across multiple GitHub and Azure DevOps repositories",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",