@aspruyt/json-config-sync 3.9.0 → 3.10.1

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/README.md CHANGED
@@ -540,7 +540,7 @@ repos:
540
540
 
541
541
  ### Executable Files
542
542
 
543
- Shell scripts (`.sh` files) are automatically marked as executable using `git update-index --chmod=+x`. You can control this behavior:
543
+ Shell scripts (`.sh` files) are automatically marked as executable using `git update-index --add --chmod=+x`. You can control this behavior:
544
544
 
545
545
  ```yaml
546
546
  files:
package/dist/git-ops.js CHANGED
@@ -115,7 +115,7 @@ export class GitOps {
115
115
  const filePath = this.validatePath(fileName);
116
116
  // Use relative path from workDir for git command
117
117
  const relativePath = relative(this.workDir, filePath);
118
- await this.exec(`git update-index --chmod=+x ${escapeShellArg(relativePath)}`, this.workDir);
118
+ await this.exec(`git update-index --add --chmod=+x ${escapeShellArg(relativePath)}`, this.workDir);
119
119
  }
120
120
  /**
121
121
  * Checks if writing the given content would result in changes.
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.1",
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",