fix: correct submodule name extraction for nested interfaces modules#1877
Merged
aemada-aws merged 3 commits intomainfrom Nov 18, 2025
Merged
fix: correct submodule name extraction for nested interfaces modules#1877aemada-aws merged 3 commits intomainfrom
aemada-aws merged 3 commits intomainfrom
Conversation
With the addition of aws-cdk-lib.interfaces.* submodules, the previous logic incorrectly extracted only 'interfaces' as the submodule name for all nested interface modules (aws-cdk-lib.interfaces.aws_s3, aws-cdk-lib.interfaces.aws_ec2, etc.), causing all interface submodules to display as 'interfaces' and point to the same page. Changes: - Replace expensive split().slice().join() with fast substring() operation - Remove getUrl callback dependency to prevent unnecessary useMemo recalculations - Add detailed comments with examples showing correct extraction - Update tests to verify actual UI behavior shows proper nested names - Now correctly shows 'interfaces.aws_s3', 'interfaces.aws_ec2' etc. instead of just 'interfaces'
Replace substring approach with regex /^[^.]+\./ for better readability and more expressive code while maintaining the same performance benefits.
rix0rrr
approved these changes
Nov 18, 2025
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mrgrain
approved these changes
Nov 18, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the addition of aws-cdk-lib.interfaces.* submodules, the previous logic incorrectly extracted only 'interfaces' as the submodule name for all nested interface modules (aws-cdk-lib.interfaces.aws_s3, aws-cdk-lib.interfaces.aws_ec2, etc.), causing all interface submodules to display as 'interfaces' and point to the same page.
Currently this is how it looks like on https://constructs.dev/packages/aws-cdk-lib/v/2.225.0?lang=typescript and all the links are broken.
and inside one of the pages
Changes:
Also closes #1853