obsidian-plugin-config 1.3.7 β†’ 1.3.8

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.3.7
6
+ * Version: 1.3.8
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.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "SystΓ¨me d'injection pour plugins Obsidian autonomes",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -199,44 +199,63 @@ main();
199
199
  */
200
200
  function buildAndPublishNpm(): void {
201
201
  console.log(`πŸš€ Obsidian Plugin Config - Complete NPM Workflow`);
202
- console.log(`Full automation: version β†’ commit β†’ push β†’ exports β†’ bin β†’ publish\n`);
202
+ console.log(
203
+ `Full automation: version β†’ exports β†’ bin β†’ commit β†’ publish\n`
204
+ );
203
205
 
204
206
  try {
205
- // Step 1: Update version and push to GitHub
207
+ // Step 1: Update version in package.json only
208
+ // (no commit yet - we'll do one big commit after)
206
209
  console.log(`πŸ“‹ Step 1/6: Updating version...`);
207
- execSync('tsx scripts/update-version-config.ts', { stdio: 'inherit' });
208
-
209
- // Step 2: Commit and push any remaining changes
210
- console.log(`\nπŸ“€ Step 2/6: Committing and pushing changes...`);
211
- try {
212
- execSync('echo "Prepare NPM package publication" | tsx scripts/acp.ts -b', { stdio: 'inherit' });
213
- } catch {
214
- console.log(` ℹ️ No additional changes to commit`);
215
- }
210
+ execSync('tsx scripts/update-version-config.ts', {
211
+ stdio: 'inherit'
212
+ });
216
213
 
217
- // Step 3: Update exports automatically
218
- console.log(`\nπŸ“¦ Step 3/6: Updating exports...`);
214
+ // Step 2: Update exports automatically
215
+ console.log(`\nπŸ“¦ Step 2/6: Updating exports...`);
219
216
  execSync('yarn update-exports', { stdio: 'inherit' });
220
217
 
221
- // Step 4: Generate bin file
222
- console.log(`\nπŸ”§ Step 4/6: Generating bin/obsidian-inject.js...`);
218
+ // Step 3: Generate bin file (uses updated version)
219
+ console.log(`\nπŸ”§ Step 3/6: Generating bin/obsidian-inject.js...`);
223
220
  generateBinFile();
224
221
 
225
- // Step 5: Verify package is ready
226
- console.log(`\nπŸ“‹ Step 5/6: Verifying package...`);
222
+ // Step 4: Verify package and sync versions.json
223
+ // (must happen before commit so versions.json is included)
224
+ console.log(`\nπŸ“‹ Step 4/6: Verifying package...`);
227
225
  verifyPackage();
228
226
 
227
+ // Step 5: Commit and push ALL changes together
228
+ // (package.json version, bin/, versions.json, exports)
229
+ console.log(`\nπŸ“€ Step 5/6: Committing and pushing changes...`);
230
+ try {
231
+ execSync(
232
+ 'echo "Publish NPM package" | tsx scripts/acp.ts -b',
233
+ { stdio: 'inherit' }
234
+ );
235
+ } catch {
236
+ console.log(` ℹ️ No additional changes to commit`);
237
+ }
238
+
229
239
  // Step 6: Publish to NPM
230
240
  console.log(`\nπŸ“€ Step 6/6: Publishing to NPM...`);
231
- execSync('npm publish --registry https://registry.npmjs.org/', { stdio: 'inherit' });
241
+ execSync(
242
+ 'npm publish --registry https://registry.npmjs.org/',
243
+ { stdio: 'inherit' }
244
+ );
232
245
 
233
246
  console.log(`\nπŸŽ‰ Complete workflow successful!`);
234
247
  console.log(`\nπŸ“‹ Next steps:`);
235
248
  console.log(` 1. npm install -g obsidian-plugin-config`);
236
- console.log(` 2. Test injection: cd any-plugin && obsidian-inject`);
249
+ console.log(
250
+ ` 2. Test injection: cd any-plugin && obsidian-inject`
251
+ );
237
252
 
238
253
  } catch (error) {
239
- console.error(`\n❌ Workflow failed: ${error instanceof Error ? error.message : String(error)}`);
254
+ console.error(
255
+ `\n❌ Workflow failed: ${
256
+ error instanceof Error ? error.message : String(error)
257
+ }`
258
+ );
240
259
  process.exit(1);
241
260
  }
242
261
  }
package/versions.json CHANGED
@@ -33,5 +33,6 @@
33
33
  "1.3.4": "1.8.9",
34
34
  "1.3.5": "1.8.9",
35
35
  "1.3.6": "1.8.9",
36
- "1.3.7": "1.8.9"
36
+ "1.3.7": "1.8.9",
37
+ "1.3.8": "1.8.9"
37
38
  }