Skip to content

Core: Dedupe aria-query and @testing-library/dom packages#32801

Merged
ndelangen merged 5 commits into
storybookjs:nextfrom
mrginglymus:one-aria-query-to-rule-them-all
Oct 26, 2025
Merged

Core: Dedupe aria-query and @testing-library/dom packages#32801
ndelangen merged 5 commits into
storybookjs:nextfrom
mrginglymus:one-aria-query-to-rule-them-all

Conversation

@mrginglymus
Copy link
Copy Markdown
Contributor

@mrginglymus mrginglymus commented Oct 23, 2025

@testing-library/dom was pulling in a fixed version of aria-query@5.3.0. Other references to aria-query are using @^5.3.0 (or similar), which means that many bundles included two full copies of aria-query.

This PR shaves ~200kb off manager/globals-runtime.js (storybook runtime), and the same from test/index.js (storybook browser)

What I did

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Relaxed the testing-library dependency constraint to allow compatible patch and minor updates, improving flexibility for future fixes.
    • Added a resolution entry to ensure a specific query library version is used across the project, reducing version conflicts.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Oct 23, 2025

📝 Walkthrough

Walkthrough

Updates dependency constraints: relaxes @testing-library/dom from exact 10.4.0 to caret ^10.4.1 in code/core/package.json, and adds a resolution entry for aria-query@5.3.0 in code/package.json.

Changes

Cohort / File(s) Summary
@testing-library/dom version relaxation
code/core/package.json
Changes @testing-library/dom from pinned "10.4.0" to caret range "^10.4.1", permitting compatible minor/patch upgrades.
aria-query resolution override
code/package.json
Adds a new resolutions entry mapping aria-query@5.3.0 to ^5.3.0, affecting dependency resolution precedence.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Potential attention points:

  • Verify intended semantics of the aria-query resolution entry and that the caret range is correct for the project.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd49265 and 521ff29.

⛔ Files ignored due to path filters (1)
  • code/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • code/core/package.json (1 hunks)
  • code/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • code/package.json
  • code/core/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: normal
  • GitHub Check: Core Unit Tests, windows-latest

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Oct 23, 2025

View your CI Pipeline Execution ↗ for commit 5e75e42

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 45s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-26 10:40:02 UTC

@yannbf yannbf changed the title Dedupe aria-query and @testing-library/dom Core: Dedupe aria-query and @testing-library/dom packages Oct 24, 2025
@yannbf yannbf added performance issue core ci:normal Run our default set of CI jobs (choose this for most PRs). labels Oct 24, 2025
@storybook-app-bot
Copy link
Copy Markdown

storybook-app-bot Bot commented Oct 24, 2025

Package Benchmarks

Commit: 5e75e42, ran on 26 October 2025 at 10:30:52 UTC

The following packages have significant changes to their size or dependencies:

storybook

Before After Difference
Dependency count 43 43 0
Self size 24.15 MB 23.50 MB 🎉 -648 KB 🎉
Dependency size 17.36 MB 17.36 MB 0 B
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 187 187 0
Self size 928 KB 928 KB 🚨 +84 B 🚨
Dependency size 74.10 MB 73.45 MB 🎉 -647 KB 🎉
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 169 169 0
Self size 35 KB 35 KB 🚨 +42 B 🚨
Dependency size 70.53 MB 69.88 MB 🎉 -648 KB 🎉
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 44 44 0
Self size 1.55 MB 1.55 MB 0 B
Dependency size 41.51 MB 40.86 MB 🎉 -648 KB 🎉
Bundle Size Analyzer node node

@ndelangen ndelangen self-assigned this Oct 26, 2025
@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Oct 26, 2025
@ndelangen ndelangen merged commit 950fdaa into storybookjs:next Oct 26, 2025
54 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 26, 2025
11 tasks
@mrginglymus mrginglymus deleted the one-aria-query-to-rule-them-all branch October 26, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal Run our default set of CI jobs (choose this for most PRs). core maintenance User-facing maintenance tasks performance issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants