sticky-note-cli 3.1.32 → 3.1.33

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/bin/cli.js CHANGED
@@ -4744,27 +4744,42 @@ async function _cmdMigrateDataBranch() {
4744
4744
  print(" [WARN] Could not commit to data branch: " + err.message);
4745
4745
  }
4746
4746
 
4747
- // Step 3: Add .sticky-note/ to .gitignore
4747
+ // Step 3: Add data files to .gitignore — but NOT sticky-note-config.json.
4748
+ // sticky-note-config.json must stay committed so teammates get sticky_url
4749
+ // on git pull (which triggers the API key prompt in `npx sticky-note init`).
4748
4750
  print("");
4749
4751
  const gitignorePath = path.join(cwd, ".gitignore");
4750
4752
  const MARKER = "# sticky-note: data branch migration";
4751
- const IGNORE_LINE = ".sticky-note/";
4753
+ // Ignore only the data files, not the whole directory.
4754
+ const IGNORE_LINES = [
4755
+ ".sticky-note/sticky-note.json",
4756
+ ".sticky-note/audit/",
4757
+ ".sticky-note/presence/",
4758
+ ];
4752
4759
  let gitignoreUpdated = false;
4753
4760
  if (fs.existsSync(gitignorePath)) {
4754
4761
  const existing = fs.readFileSync(gitignorePath, "utf-8");
4755
4762
  const gitignoreLines = existing.split(/\r?\n/).map(l => l.trim());
4756
- if (!gitignoreLines.includes(IGNORE_LINE)) {
4757
- fs.appendFileSync(gitignorePath, "\n" + MARKER + "\n" + IGNORE_LINE + "\n");
4763
+ // Also clean up the old broad ignore if present from a previous migration run
4764
+ const hasBroad = gitignoreLines.includes(".sticky-note/");
4765
+ const missingLines = IGNORE_LINES.filter(l => !gitignoreLines.includes(l));
4766
+ if (hasBroad) {
4767
+ // Replace the broad ignore with specific lines
4768
+ const replaced = existing.replace(/\.sticky-note\/\n?/, IGNORE_LINES.join("\n") + "\n");
4769
+ fs.writeFileSync(gitignorePath, replaced, "utf-8");
4770
+ gitignoreUpdated = true;
4771
+ } else if (missingLines.length > 0) {
4772
+ fs.appendFileSync(gitignorePath, "\n" + MARKER + "\n" + missingLines.join("\n") + "\n");
4758
4773
  gitignoreUpdated = true;
4759
4774
  }
4760
4775
  } else {
4761
- fs.writeFileSync(gitignorePath, MARKER + "\n" + IGNORE_LINE + "\n");
4776
+ fs.writeFileSync(gitignorePath, MARKER + "\n" + IGNORE_LINES.join("\n") + "\n");
4762
4777
  gitignoreUpdated = true;
4763
4778
  }
4764
4779
  if (gitignoreUpdated) {
4765
- print(" [OK] Added .sticky-note/ to .gitignore");
4780
+ print(" [OK] .gitignore: ignoring data files only (sticky-note-config.json stays committed)");
4766
4781
  } else {
4767
- print(" [OK] .gitignore already contains .sticky-note/");
4782
+ print(" [OK] .gitignore already up to date");
4768
4783
  }
4769
4784
 
4770
4785
  // Step 4: Remove sticky-note pre-commit and post-commit hooks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sticky-note-cli",
3
- "version": "3.1.32",
3
+ "version": "3.1.33",
4
4
  "description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
5
5
  "license": "MIT",
6
6
  "bin": {