Skip to content

release: v2.5.2 - #56

Merged
Shinrai merged 4 commits into
masterfrom
release/2.5.2
Oct 27, 2025
Merged

Shinrai merged 4 commits into
masterfrom
release/2.5.2

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Oct 27, 2025 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

No bug fixes

🔧 Other Changes

🏷️ Release Information

  • release: v2.5.2 [HOTFIX] nested folder multi-default export handling (0179355)

👥 Contributors

Shinrai and others added 2 commits October 27, 2025 13:11
- Add originalAnalysis parameter to processModuleForAPI call in buildCategoryStructure
- Ensures proper namespace creation for modules with default+named exports in nested folders
- Now api.lg.connect.* structure works correctly instead of incorrect api.lg.connect() flattening
- Maintains consistency with root-level multi-default processing logic
- Fixes bug where nested folders lost proper hasDefault detection, falling back to !!mod.default

Resolves multi-default export processing inconsistency between root and nested categories
@cldmv-bot cldmv-bot Bot added semver: explicit This release uses an explicitly specified version rather than an auto-detected bump release Marks a pull request as a pending release — merge to publish a new version labels Oct 27, 2025
@Shinrai Shinrai self-assigned this Oct 27, 2025
@Shinrai
Shinrai requested a review from Copilot October 27, 2025 20:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This is a hotfix release (v2.5.2) that addresses an issue with handling nested folder multi-default export scenarios. The fix ensures that module analysis data is properly preserved and passed through when processing modules with multiple default exports.

Key Changes:

  • Added re-analysis of existing modules to preserve original analysis data
  • Updated processModuleForAPI to receive and utilize originalAnalysis parameter
  • Added default export declarations to test files

Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

File Description
package.json Version bump from 2.5.1 to 2.5.2
src/lib/helpers/api_builder.mjs Added re-analysis for existing modules and pass originalAnalysis to processModuleForAPI
api_tests/api_tv_test/manufacturer/lg/volume.mjs Added default export declaration for test case
types/api_tests/api_tv_test/manufacturer/lg/volume.d.mts Added corresponding TypeScript type declaration for default export

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/helpers/api_builder.mjs Resolved
- Store analysis data alongside processed modules in defaultExportFiles during first pass
- Reuse stored analysis instead of re-analyzing already loaded modules
- Remove duplicate analyzeModule() and import operations for existing defaults
- Apply optimization to both buildCategoryStructure and buildCategoryDecisions functions
- Maintain identical functionality while reducing I/O overhead in multi-default scenarios

Eliminates redundant file system access and import operations for nested folder processing
@Shinrai
Shinrai requested a review from Copilot October 27, 2025 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Shinrai
Shinrai merged commit 8ed980c into master Oct 27, 2025
@Shinrai
Shinrai deleted the release/2.5.2 branch December 8, 2025 04:41
Shinrai added a commit that referenced this pull request Feb 11, 2026
# Release: v2.5.2 - Nested Folder Multi-Default Export Hotfix

🔧 **CRITICAL BUG FIX - NESTED FOLDER MULTI-DEFAULT EXPORT HANDLING**
• Fix critical nested folder multi-default export processing inconsistency causing incorrect API flattening
• Add missing originalAnalysis parameter to processModuleForAPI call in buildCategoryStructure function
• Resolve bug where modules with default+named exports in nested folders lost proper namespace structure
• Ensure api.lg.connect.* structure works correctly instead of incorrect api.lg.connect() flattening behavior
• Maintain consistency with root-level multi-default processing logic eliminating architectural disparity

🎯 **API STRUCTURE CONSISTENCY RESTORATION**
• Achieve complete multi-default export parity between root-level and nested folder processing
• Restore proper namespace creation for modules like connect.mjs, disconnect.mjs, key.mjs, power.mjs in nested contexts
• Eliminate incorrect function flattening where api.manufacturer.lg.connect() appeared instead of api.manufacturer.lg.connect.*
• Fix category-level module processing maintaining architectural consistency across all folder depths

🛡️ **VALIDATION AND TESTING**
• Complete pre-commit validation chain execution: test:node → test:unit → build:dist → build:types → test:types
• All 10 Node.js test files pass including comprehensive API structure validation
• All 88 unit tests pass via Vitest ensuring functional correctness
• TypeScript definition validation confirms all 12 package exports maintain compatibility
• API structure inspection confirms proper namespace restoration in api_tv_test manufacturer/lg folder

**Technical Details**: The fix addresses a gap where buildCategoryStructure function lacked the originalAnalysis parameter needed for accurate hasDefault detection in nested folders, causing fallback to unreliable !!mod.default checks.

**Breaking Changes**: None - targeted hotfix maintains full backward compatibility  
**Performance Impact**: Negligible - single parameter addition with minimal processing overhead  
**API Compatibility**: Complete preservation with enhanced nested folder multi-default export correctness

This hotfix resolves a critical architectural inconsistency in nested folder multi-default export processing, restoring proper namespace structure and ensuring consistent behavior across all folder depths.

Co-authored-by: Nate - CLDMV <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Marks a pull request as a pending release — merge to publish a new version semver: explicit This release uses an explicitly specified version rather than an auto-detected bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants