Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade install-pkg #4703

Closed
wants to merge 1 commit into from
Closed

Conversation

benmccann
Copy link
Contributor

πŸ”— Linked issue

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Upgrades a dependency to the latest version

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@thetutlage thetutlage self-requested a review August 21, 2024 05:56
@thetutlage
Copy link
Member

The newer version of @antfu/install-pkg is still broken. Did not have time to look into it why. But I will see and replace it with a custom implementation soon

@benmccann
Copy link
Contributor Author

My bad for not running the tests. I thought it'd be simple and unlikely to fail

Assertion Error: Expected log messages to match /pnpm install.*inexistent exited/
Compared values have no visual difference.
at Object.executor tests\commands\add.spec.ts:263

@benmccann
Copy link
Contributor Author

Hmm. This seems to be related to @antfu/install-pkg moving to tinyexec.

Here's what is in the log messages:

[
   {
      "message":"[ blue(info) ] Installing the package using the following command : grey(pnpm add file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent)",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm) .. ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm) ...",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm)  ..",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm)   .",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm)    ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] package installed successfully ...",
      "stream":"stdout"
   },
   {
      "message":"[ red(error) ] Cannot find module \"file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent\". Make sure to install it",
      "stream":"stderr"
   },
   {
      "message":"[ red(error) ] Unable to configure green(file:///tmp/dwwibyshpirrbghjzq0p8m51/node_modules/inexistent)",
      "stream":"stderr"
   }
]

And here's what was in the log messages before the upgrade:

[
   {
      "message":"[ blue(info) ] Installing the package using the following command : grey(pnpm add file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent)",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm) .. ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm) ...",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm)  ..",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm)   .",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm)    ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] installing green(file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent) using grey(pnpm) .  ",
      "stream":"stdout"
   },
   {
      "message":"[ cyan(wait) ] unable to install the package ...",
      "stream":"stdout"
   },
   {
      "message":"[ red(error) ] pnpm install file:///tmp/tdrmo30es4po5jm4wxuy7bmx/node_modules/inexistent exited with a status of 1.\n      red(    at normalizeResult (node_modules/@jsdevtools/ez-spawn/lib/normalize-result.js:31:11))\n      red(    at ChildProcess.<anonymous> (node_modules/@jsdevtools/ez-spawn/lib/async.js:79:19))\n      red(    at ChildProcess.emit (node:events:519:28))\n      red(    at ChildProcess.emit (node:domain:488:12))\n      red(    at ChildProcess._handle.onexit (node:internal/child_process:294:12))",
      "stream":"stderr"
   }
]

@benmccann
Copy link
Contributor Author

I filed tinylibs/tinyexec#32 to address this upstream as it seems I inadvertently broke install-pkg. I will close this PR for now and we can look at upgrading it again after fixing it upstream shortly

@benmccann benmccann closed this Aug 21, 2024
@benmccann benmccann deleted the install-pkg branch August 21, 2024 23:18
@benmccann benmccann mentioned this pull request Aug 26, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants