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.
- package/bin/obsidian-inject.js +1 -1
- package/package.json +1 -1
- package/scripts/inject-core.ts +13 -20
package/bin/obsidian-inject.js
CHANGED
package/package.json
CHANGED
package/scripts/inject-core.ts
CHANGED
|
@@ -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;
|