mb-run 0.0.3 → 0.0.4-dev-20260706-96cae8a

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/CHANGELOG.md CHANGED
@@ -21,6 +21,15 @@ If you like this project and find it useful, please consider giving it a star on
21
21
 
22
22
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
23
23
 
24
+ ## [0.0.4] - Dev branch
25
+
26
+ ### Changed
27
+
28
+ - [package]: Update dependencies.
29
+ - [package]: Upgrade package.
30
+
31
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
32
+
24
33
  ## [0.0.3] - 2026-07-06
25
34
 
26
35
  ### Added
package/dist/upgrade.js CHANGED
@@ -27,7 +27,7 @@ export async function runUpgrade(opts) {
27
27
  for (const pkgPath of workspacePackageJsonPaths) {
28
28
  dstDir = path.dirname(pkgPath);
29
29
  const pkgJson = await parsePackageJson(dstDir);
30
- await runPackageJsonUpgrade(opts, dstDir, pkgJson, false, true, false, false);
30
+ await runPackageJsonUpgrade(opts, path.join(dstDir, 'package.json'), pkgJson, false, true, false, false);
31
31
  }
32
32
  if (commandFailures.length > 0) {
33
33
  log(`${red('Failed commands:')}${reset()}\n${inspect(commandFailures, false, 2, true)}`);
@@ -343,8 +343,10 @@ export async function runPackageJsonUpgrade(opts, pkgPath, pkgJson, isMonorepo =
343
343
  fileReplace('CHANGELOG.md', '(https://github.com/prettier/prettier)', '(https://prettier.io/)');
344
344
  fileReplace('CHANGELOG.md', '(https://github.com/eslint/eslint)', '(https://eslint.org/)');
345
345
  fileReplace('CHANGELOG.md', '(https://nodejs.org/api/esm.html)', '(https://nodejs.org/)');
346
- if (isMonorepo)
346
+ if (isMonorepo) {
347
+ log(magenta('Monorepo detected, skipping script setup for the root package.json.'));
347
348
  return;
349
+ }
348
350
  const scripts = pkgJson.scripts;
349
351
  const startScript = scripts?.start ?? `node ${pkgJson.main ?? 'dist/module.js'}`;
350
352
  log(magenta(`Start script: ${cyan(startScript)}`));
@@ -478,13 +480,19 @@ export async function runPackageJsonUpgrade(opts, pkgPath, pkgJson, isMonorepo =
478
480
  delete devDeps?.['@vitest/eslint-plugin'];
479
481
  delete devDeps?.['esbuild'];
480
482
  delete devDeps?.['javascript-obfuscator'];
483
+ log(magenta(`Changing package.json "${pkgPath}" scripts and devDependencies...`));
481
484
  const packageJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
482
485
  writeFileSync(pkgPath, JSON.stringify({
483
486
  ...packageJson,
484
487
  scripts: pkgJson.scripts,
485
488
  devDependencies: pkgJson.devDependencies,
486
489
  }, null, 2) + '\n', 'utf8');
490
+ log(magenta(`Emptying node_modules "${dstDir}"...`));
487
491
  await emptyDir('node_modules', { rootDir: dstDir, dryRun: false });
492
+ if (isWorkspace) {
493
+ log(magenta('Monorepo workspace detected, skipping install dependencies...'));
494
+ return;
495
+ }
488
496
  log(green('Installing devDependencies...'));
489
497
  const commands = [
490
498
  `npm pkg delete overrides`,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "mb-run",
3
- "version": "0.0.3",
3
+ "version": "0.0.4-dev-20260706-96cae8a",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "mb-run",
9
- "version": "0.0.3",
9
+ "version": "0.0.4-dev-20260706-96cae8a",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "cross-spawn": "7.0.6",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mb-run",
3
- "version": "0.0.3",
3
+ "version": "0.0.4-dev-20260706-96cae8a",
4
4
  "description": "Matterbridge command line executor",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",