-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: improve pnpm bootstrapping and add compile script #3882
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
Conversation
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]>
c4590a1 to
2834cdd
Compare
|
This now works on Red Hat Enterprise Linux (RHEL) for Now the following works: This deploys |
|
@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. |
|
Sorry - didn't get to this last night; will take a look as soon as I'm out of meetings. |
Thanks! |
…eInc#3882) * update the model list when the client refreshes * Refactor and use the grpc response instead of a webview message
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
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.
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.
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.
Updated test script to use npx pnpm when invoking turbo, ensuring the package manager binary is found correctly.
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
npm install- it should bootstrap to pnpm installnpm run install- it should also worknpm run install:all- it should also worknpm run compile- it should compile without creating a .vsix fileIssues 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.
scripts/bootstrap.jsto handle npm-to-pnpm transitions without recursion or global installation..husky/pre-commitand.husky/pre-pushto usenpx pnpmif pnpm is not in PATH.package.jsonscriptspreinstall,install, andinstall:allto usescripts/bootstrap.js.compilescript topackage.jsonfor TypeScript compilation without creating a .vsix package.This description was created by
for 2834cdd. You can customize this summary. It will automatically update as commits are pushed.