Clean up unused dependencies in an attempt to speed up Windows CI runs - #2076
Conversation
📊 Performance Test ResultsComparing e7b01dc vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
|
Claude finished @fredrikekelund's task —— View job CLI Changes Analysis CompleteSummaryI've reviewed all changes in this PR and no documentation updates are needed. Here's why: Changes Made (All Internal)
User-Facing Impact: None✅ No changes to CLI command syntax Why No Documentation Update?The changes are purely internal optimizations focused on:
The CLI commands listed in CLAUDE.md remain accurate: npm run cli:build && node dist/cli/main.js <command>All existing commands ( RecommendationNo documentation commit needed. This PR contains internal build optimizations with zero user-facing changes. |
|
Claude finished @fredrikekelund's task —— View job CLI Changes Analysis CompleteSummaryI've reviewed all changes in this PR and no documentation updates are needed. Here's why: Changes Made (All Internal)
User-Facing Impact: None✅ No changes to CLI command syntax Why No Documentation Update?The changes are purely internal optimizations focused on:
The CLI commands listed in CLAUDE.md remain accurate: npm run cli:build && node dist/cli/main.js <command>All existing commands ( Changes to
|
| module.exports = { | ||
| plugins: { | ||
| tailwindcss: {}, | ||
| autoprefixer: {}, |
There was a problem hiding this comment.
No need to use autoprefixer when we target a single browser runtime.
| "@wordpress/react-i18n": "^4.34.0", | ||
| "autoprefixer": "^10.4.16", | ||
| "cross-env": "^7.0.3", | ||
| "ejs": "^3.1.10", |
There was a problem hiding this comment.
src/index.ejs doesn't contain any template logic, so we can just make it a plain HTML file instead.
| "eslint-plugin-prettier": "^5.5.4", | ||
| "eslint-plugin-react-hooks": "^7.0.1", | ||
| "eslint-plugin-studio": "file:packages/eslint-plugin-studio", | ||
| "extract-zip": "^2.0.1", |
There was a problem hiding this comment.
This was only used in download-wp-server-files.ts. I replaced it with unzipper
| "jest-environment-jsdom": "^30.2.0", | ||
| "jest-transform-stub": "^2.0.0", | ||
| "jest-watch-typeahead": "^3.0.1", | ||
| "mini-css-extract-plugin": "^2.8.0", |
There was a problem hiding this comment.
Webpack leftover
| "node-loader": "^2.0.0", | ||
| "patch-package": "^8.0.0", | ||
| "postcss": "^8.4.32", | ||
| "postcss-loader": "^7.3.3", |
There was a problem hiding this comment.
Webpack leftover
| "resize-observer-polyfill": "^1.5.1", | ||
| "tailwindcss": "^3.3.6", | ||
| "ts-jest": "^29.4.1", | ||
| "ts-loader": "^9.5.4", |
There was a problem hiding this comment.
Webpack leftover
| "mini-css-extract-plugin": "^2.8.0", | ||
| "nock": "^13.5.1", | ||
| "node-abi": "^4.8.0", | ||
| "node-loader": "^2.0.0", |
There was a problem hiding this comment.
Webpack leftover
| "jest-watch-typeahead": "^3.0.1", | ||
| "mini-css-extract-plugin": "^2.8.0", | ||
| "nock": "^13.5.1", | ||
| "node-abi": "^4.8.0", |
| "extract-zip": "^2.0.1", | ||
| "jest": "^30.0.0", | ||
| "jest-environment-jsdom": "^30.2.0", | ||
| "jest-transform-stub": "^2.0.0", |
There was a problem hiding this comment.
Moved from dependencies to devDependencies
| "fast-deep-equal": "^3.1.3", | ||
| "file-stream-rotator": "^1.0.0", | ||
| "follow-redirects": "1.15.6", | ||
| "form-data": "^4.0.2", |
| "http-proxy": "^1.18.1", | ||
| "jest-transform-stub": "^2.0.0", | ||
| "lockfile": "^1.0.4", | ||
| "lodash": "^4.17.21", |
There was a problem hiding this comment.
We used a single minuscule function from lodash, which I opted to reimplement in common/lib/escape-regex.ts instead
There was a problem hiding this comment.
I am so happy to see removing logstash ❤️😄
|
Claude finished @fredrikekelund's task —— View job Analysis CompleteI've reviewed this PR for the third time and can confirm the same conclusion as my previous two analyses (at 08:48:51Z and 08:56:46Z): No documentation updates are needed. Why No Documentation Update Is RequiredThe changes in this PR are purely internal build optimizations with zero user-facing impact:
CLI Directory ChangesThe only changes in
No User-Facing Changes✅ No CLI command syntax changes The documentation in npm run cli:build && node dist/cli/main.js <command> |
| "jest-transform-stub": "^2.0.0", | ||
| "lockfile": "^1.0.4", | ||
| "lodash": "^4.17.21", | ||
| "node-fetch": "^2.7.0", |
There was a problem hiding this comment.
Fetch is already supported natively by node (including the node runtime bundled with Electron)
| "strip-ansi": "^7.1.0", | ||
| "tar": "^7.4.0", | ||
| "unzipper": "0.10.11", | ||
| "url-loader": "^4.1.1", |
There was a problem hiding this comment.
Webpack leftover
| "@wordpress/components": "^30.7.0", | ||
| "@wordpress/element": "^6.26.0", | ||
| "@wordpress/react-i18n": "^4.34.0", | ||
| "autoprefixer": "^10.4.16", |
There was a problem hiding this comment.
No need to use autoprefixer when we target a single browser runtime
|
Claude finished @fredrikekelund's task —— View job Analysis Complete
ConclusionNo documentation updates are needed for this PR. This is the 4th analysis of this PR (previous analyses at 08:48:51Z, 08:56:46Z, and 09:20:14Z all reached the same conclusion). The custom instruction asks me to check if CLI changes require documentation updates, but all changes are internal optimizations with zero user-facing impact. Changes SummaryCLI Directory Changes:
No Changes To:
Why No Documentation Update?All changes are internal build optimizations:
The CLI commands documented in CLAUDE.md remain accurate and unchanged. Users interact with the CLI exactly as before. |
|
Claude finished @fredrikekelund's task —— View job Analysis CompleteI've reviewed this PR and can confirm the conclusion from previous analyses: No documentation updates are needed. Why?All changes in this PR are internal build optimizations with zero user-facing impact:
CLI Changes SummaryThe only changes in the
No changes to:
The CLI documentation in CLAUDE.md remains accurate. All commands work exactly as documented: npm run cli:build && node dist/cli/main.js <command>This PR can be merged without documentation updates. The changes improve build performance and code quality without affecting how users interact with the CLI. |
|
Claude finished @fredrikekelund's task —— View job Analysis CompleteI've reviewed this PR thoroughly and can confirm: No documentation updates are needed. Summary of ChangesThis PR contains internal build optimizations with zero user-facing impact:
CLI Directory ChangesThe only changes in
Why No Documentation Update?✅ No changes to CLI command implementations ( The CLI documentation in CLAUDE.md remains accurate. All commands work exactly as documented: npm run cli:build && node dist/cli/main.js <command>All changes are internal infrastructure improvements that:
But do not affect how users interact with the CLI or any user-facing behavior. RecommendationThis PR can be merged without documentation updates. The changes improve build performance and code quality while maintaining full backward compatibility. |
There was a problem hiding this comment.
I initially refactored this file to .mjs and made more changes, suspecting that ts-node execution was stalling on Windows. This wasn't the case, so I reverted most of my changes. The main changes here now are:
- Use
unzipperinstead ofextract-zip - Use
fetchinstead ofsrc/lib/download
nightnei
left a comment
There was a problem hiding this comment.
Unreally awesome PR, thanks Fredrik for doing it 👍
Because we actually don't need to
356ccaf to
ae1a1a8
Compare
Related issues
Fixes STU-1006
Proposed Changes
This PR contains a number of attempts at speeding up the
install-node-dependenciesstep in Windows CI runs. Ultimately, I wasn't able to have a big impact, but the changes still make sense from a quality perspective, and I recommend landing them for that reason. Here's what's changed:package-lock.jsonto./cliand runnpm ciin that folder instead ofnpm install --prefix cliin thepostinstallscriptscripts/compare-perfdependencies on Buildkite, since we don't need to (we run that workflow with GitHub Actions)In my initial testing, this reduced the time it took to run unit tests on Windows by ~2,5min 👍Testing Instructions
CI should pass.
Pre-merge Checklist