Skip to content

Fix build analyzer script configuration mismatch#57

Merged
s2005 merged 8 commits intomainfrom
claude/fix-build-analysis-presets-011CUyhK5kpVXPvLmgpSNBzk
Nov 10, 2025
Merged

Fix build analyzer script configuration mismatch#57
s2005 merged 8 commits intomainfrom
claude/fix-build-analysis-presets-011CUyhK5kpVXPvLmgpSNBzk

Conversation

@s2005
Copy link
Copy Markdown
Owner

@s2005 s2005 commented Nov 10, 2025

No description provided.

claude and others added 6 commits November 10, 2025 06:02
Phase 6: Documentation & Migration
- Add comprehensive API documentation (API.md)
- Add user guide with build options and use cases (USER_GUIDE.md)
- Add migration guide for upgrading (MIGRATION_GUIDE.md)
- Update main README with modular architecture section

Phase 7: Cleanup & Optimization
- Create build analysis script (analyze-builds.sh)
- Create performance testing script (performance-test.js)
- Add npm scripts for build analysis and performance testing
- Create implementation summary (PHASE_6_7_SUMMARY.md)
- Verify backward compatibility (no deprecated code removal needed)

New npm scripts:
- npm run build:all - Build all configurations
- npm run build:analyze - Build and analyze bundle sizes
- npm run perf - Run performance tests
- npm run perf:quick - Quick performance test

Documentation includes:
- Complete API reference for all shell plugins
- 7 detailed use case scenarios
- Bundle size comparison tables
- Performance metrics and benchmarks
- Migration paths for all scenarios
- Troubleshooting guides
- Best practices

All deliverables completed successfully.
- Add consistent spacing and blank lines across modular_shells docs for improved readability
- Convert generic code fences to language-labelled "text" where appropriate
- Minor layout tweaks in API, ARCHITECTURE, IMPLEMENTATION_PLAN, MIGRATION_GUIDE, README, TESTING_GUIDE, USER_GUIDE
Fixes issues in build analysis script:
- Map config names to correct npm script names (gitbash-only -> build:gitbash, cmd-only -> build:cmd)
- Copy build output to preset-specific files (dist/index.<preset>.js)
- Ensures analyze-builds.sh can find and analyze all build configurations

Resolves review feedback about build analysis never finding per-configuration bundles.
Converts the performance test script to ES modules syntax:
- Replace require() with import statements
- Replace module.exports with export
- Replace __dirname with fileURLToPath(import.meta.url)
- Replace require.main === module with import.meta.url check
- Update dynamic require() calls to use async import()

Fixes "ReferenceError: require is not defined" error when running
npm run perf or npm run perf:quick with "type": "module" in package.json.

Resolves review feedback about performance test crashing under ESM.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/performance-test.js
Remove query string cache-busting from import statements. Node's ESM loader
does not support query strings on file:// URLs and throws ERR_INVALID_FILE_URL_PATH.

The previous code with await import(`${buildPath}?t=${Date.now()}`) was:
- Consistently failing with ERR_INVALID_FILE_URL_PATH
- Never actually loading the bundles
- Producing meaningless timing measurements

With this fix:
- First iteration measures cold start (actual module load)
- Subsequent iterations measure cached module access
- Timing measurements are now accurate and meaningful

Resolves review feedback about query strings causing import failures.
@s2005
Copy link
Copy Markdown
Owner Author

s2005 commented Nov 10, 2025

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@s2005 s2005 merged commit 09cefff into main Nov 10, 2025
3 checks passed
@s2005 s2005 deleted the claude/fix-build-analysis-presets-011CUyhK5kpVXPvLmgpSNBzk branch November 10, 2025 07:58
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