Skip to content

Conversation

@fredrikekelund
Copy link
Contributor

@fredrikekelund fredrikekelund commented Dec 3, 2025

Related issues

Proposed Changes

This PR changes how we import pm2. pm2 exports two members: default (an instantiated API) and custom (the original API class). By importing custom and passing the pm2_home config prop, we can remove the resolvePm2 logic.

The only problem is that the custom member isn't accounted for in the pm2 type definitions. I've submitted a PR Unitech/pm2#6064 to pm2 to fix this. Until that's merged, I've updated our pm2 patch to include my changes from that PR.

Tip

View the upstream PR diff with whitespace changes hidden to see that I haven't actually changed all that much in types/index.d.ts

Testing Instructions

  1. Lint CI should pass
  2. Run npm run cli:build
  3. Run node dist/cli/main.js site list
  4. Ensure that it finishes successfully

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@fredrikekelund fredrikekelund requested review from a team, bcotrim and nightnei December 3, 2025 09:12
@fredrikekelund fredrikekelund self-assigned this Dec 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

📊 Performance Test Results

Comparing 4c2ad03 vs trunk

site-editor

Metric trunk 4c2ad03 Diff Change
load 13764.00 ms 13098.00 ms -666.00 ms 🟢 -4.8%

site-startup

Metric trunk 4c2ad03 Diff Change
siteCreation 23554.00 ms 20680.00 ms -2874.00 ms 🟢 -12.2%
siteStartup 9033.00 ms 9029.00 ms -4.00 ms 🟢 -0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

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