Skip to content

Conversation

@KJ7LNW
Copy link
Contributor

@KJ7LNW KJ7LNW commented May 23, 2025

Context

This ensures proper bootstrapping of pnpm on systems where it may not be directly available (like Red Hat Enterprise Linux and Oracle Linux), fixes git hook failures.

Implementation

  1. Created a robust bootstrap script that handles npm-to-pnpm transitions without recursion or global installation requirements. This is particularly important for systems like Red Hat Enterprise Linux where pnpm is not available for local installation like npm is.

  2. Fixed Husky hooks to check if pnpm is in PATH and fall back to npx pnpm if not available, ensuring git hooks work in all environments.

  3. Modified package.json scripts to use the bootstrap script for install, install:all, and preinstall, preventing infinite recursion while maintaining compatibility with both npm and pnpm.

  4. Updated test script to use npx pnpm when invoking turbo, ensuring the package manager binary is found correctly.

  5. Added a compile script to the root package.json that runs the TypeScript compilation and bundling steps without creating the final .vsix package, which is needed for various automation scenarios.

How to Test

  1. Clone the repository on a system where pnpm is not in the PATH
  2. Run npm install - it should bootstrap to pnpm install
  3. Run npm run install - it should also work
  4. Run npm run install:all - it should also work
  5. Make changes and commit - the pre-commit hook should work
  6. Run npm run compile - it should compile without creating a .vsix file

Issues Fixed

Get in Touch

Discord: KJ7LNW


Important

Improves pnpm bootstrapping with a new script, updates git hooks for pnpm availability, modifies package scripts to prevent recursion, and adds a compile script.

This description was created by Ellipsis for 2834cdd. You can customize this summary. It will automatically update as commits are pushed.

Eric Wheeler added 3 commits May 22, 2025 19:27
This commit addresses several related issues with pnpm command execution:

1. Husky hooks now check if pnpm is in PATH and fall back to npx pnpm
   if not available, ensuring git hooks work in all environments.

2. Created a robust bootstrap script that handles npm-to-pnpm transitions
   without recursion or global installation requirements.

3. Modified package.json scripts to use the bootstrap script for install,
   install:all, and preinstall, preventing infinite recursion while
   maintaining compatibility with both npm and pnpm.

4. Updated test script to use npx pnpm when invoking turbo, ensuring
   the package manager binary is found correctly.

Fixes: #3875
Fixes: #3876
Fixes: #3877
Fixes: #3878
This commit adds a "compile" script to the root package.json that runs
the TypeScript compilation and bundling steps without creating the final
.vsix package. This is needed for various automation scenarios where we
want to verify the code compiles correctly without producing the final
package.

The compile script runs "pnpm --filter roo-cline bundle" which performs
the core compilation steps without packaging.

Fixes: #3881
Signed-off-by: Eric Wheeler <[email protected]>
This commit adds a vsix script that is an alias for the build script,
fixing a regression with existing build automation that expects to be
able to run "npm run vsix" to create a vsix package.

This ensures backward compatibility with existing CI/CD pipelines and
build scripts that may be using the vsix command directly.

Signed-off-by: Eric Wheeler <[email protected]>
@KJ7LNW KJ7LNW force-pushed the fix-pnpm-bootstrap-issues branch from c4590a1 to 2834cdd Compare May 23, 2025 02:28
@KJ7LNW
Copy link
Contributor Author

KJ7LNW commented May 23, 2025

@mrubens @cte

This now works on Red Hat Enterprise Linux (RHEL) for npm/npx based bootstrapping because pnpm it is not packaged in RHEL which is necessary for developers working in enterprise environments.

Now the following works:

npm install
npm install
npm run compile
npm run test
npm run build

This deploys pnpm via npx so users can use npx pnpm and follows what users will expect who have used npm for projects in the past.

@KJ7LNW KJ7LNW marked this pull request as ready for review May 23, 2025 02:31
@KJ7LNW
Copy link
Contributor Author

KJ7LNW commented May 23, 2025

@cte if this does not cause any regressions for you, then please merge ASAP because I am unable to do anything new in this repository until it is fixed.

@cte
Copy link
Collaborator

cte commented May 23, 2025

@cte if this does not cause any regressions for you, then please merge ASAP because I am unable to do anything new in this repository until it is fixed.

Will test it locally shortly.

@cte
Copy link
Collaborator

cte commented May 23, 2025

Sorry - didn't get to this last night; will take a look as soon as I'm out of meetings.

@KJ7LNW
Copy link
Contributor Author

KJ7LNW commented May 23, 2025

Sorry - didn't get to this last night; will take a look as soon as I'm out of meetings.

Thanks!

@cte cte merged commit be19a49 into RooCodeInc:main May 23, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 23, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 23, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
…eInc#3882)

* update the model list when the client refreshes

* Refactor and use the grpc response instead of a webview message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment