obsidian-plugin-config 1.6.7 โ†’ 1.6.9

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.
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Obsidian Plugin Config - CLI Entry Point
5
5
  * Global command: obsidian-inject
6
- * Version: 1.6.7
6
+ * Version: 1.6.9
7
7
  */
8
8
 
9
9
  import { execSync } from 'child_process';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obsidian-plugin-config",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Global CLI injection tool for Obsidian plugins",
5
5
  "type": "module",
6
6
  "bin": {
@@ -780,26 +780,6 @@ export async function performInjection(
780
780
 
781
781
  await runYarnInstall(targetPath);
782
782
 
783
- // Clean up old node_modules if yarn install succeeded
784
- const oldDirs = fs.readdirSync(targetPath)
785
- .filter(name => name.startsWith('node_modules.old.'))
786
- .map(name => path.join(targetPath, name));
787
-
788
- if (oldDirs.length > 0) {
789
- console.log(`\n๐Ÿงน Cleaning up old node_modules...`);
790
- for (const oldDir of oldDirs) {
791
- try {
792
- execSync(`rmdir /s /q "${oldDir}"`, {
793
- stdio: 'pipe',
794
- windowsHide: true
795
- });
796
- console.log(` ๐Ÿ—‘๏ธ Removed ${path.basename(oldDir)}`);
797
- } catch {
798
- console.log(` โš ๏ธ Could not remove ${path.basename(oldDir)} (delete manually)`);
799
- }
800
- }
801
- }
802
-
803
783
  console.log(`\n๐Ÿ“ Creating injection info...`);
804
784
  await createInjectionInfo(targetPath);
805
785
 
@@ -811,6 +791,19 @@ export async function performInjection(
811
791
  console.log(
812
792
  ` 4. yarn acp # Commit changes (or yarn bacp for build+commit)`
813
793
  );
794
+
795
+ // Check for .old directories and remind user to delete them
796
+ const oldDirs = fs.readdirSync(targetPath)
797
+ .filter(name => name.startsWith('node_modules.old.'))
798
+ .map(name => path.basename(name));
799
+
800
+ if (oldDirs.length > 0) {
801
+ console.log(`\n๐Ÿงน Cleanup reminder:`);
802
+ for (const oldDir of oldDirs) {
803
+ console.log(` ๐Ÿ—‘๏ธ Delete manually: ${oldDir}`);
804
+ }
805
+ console.log(` ๐Ÿ’ก Close all processes first, then delete these folders`);
806
+ }
814
807
  } catch (error) {
815
808
  console.error(`\nโŒ Injection failed: ${error}`);
816
809
  throw error;