Skip to content

[x-license] add cross-major license format compatibility tests#22335

Open
aemartos wants to merge 7 commits intomui:masterfrom
aemartos:feature/sto-156-x-license-improve-tests
Open

[x-license] add cross-major license format compatibility tests#22335
aemartos wants to merge 7 commits intomui:masterfrom
aemartos:feature/sto-156-x-license-improve-tests

Conversation

@aemartos
Copy link
Copy Markdown
Member

@aemartos aemartos commented May 5, 2026

Summary

Adds a test workspace at test/x-license-compat/ that pins every published x-license major (v5/v6/v7/v8/v9) and runs each currently-issued license-key format through every older verifyLicense. The matrix exists to catch backwards-compat regressions early, if a future change makes a new license format unreadable by an older major, this suite fails.

What's covered

Three axes:

  • x-license major: v5–v9, each pinned to a specific published version via npm-aliased devDeps.
  • License format: KV=1 perpetual, KV=2 subscription, KV=2 annual (Q3-2024 / Q1-2026), KV=3 annual.
  • Commercial pro package: x-data-grid-pro, x-charts-pro, x-tree-view-pro.

Cells that exercise known historical limitations (v5 lacks annual; v7+ gates charts/tree-view on Q3-2024+) are filtered with explanatory comments.

KV=3 cells on v5–v8 are marked it.fails.each(...) because we can't roll back KV=3 (~36 keys already issued) and older majors can't decode it. The marker keeps the suite green while documenting the bite.

Notes

  • A small Vite transform plugin patches the inlined __ALLOW_TEST_LICENSES__=false guard in pinned v9's compiled source so test fixtures aren't rejected. Scoped to verifyLicense.{m,}js, nothing else is affected.
  • A new TEST_KEY_PRO_ANNUAL_Q1_2026 (KV=2) fixture is added in packages/x-license/src/test-keys.ts to cover the Q1-2026 annual case in the matrix.
  • Zero impact on the published @mui/x-license bundle, pinned older majors are devDeps of the test workspace.

@aemartos aemartos self-assigned this May 5, 2026
@aemartos aemartos added internal Behind-the-scenes enhancement. Formerly called “core”. scope: x-license Changes related to @mui/x-license. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. labels May 5, 2026
@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 5, 2026

Deploy preview

https://deploy-preview-22335--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

aemartos added 2 commits May 5, 2026 18:13
…aemartos/mui-x into feature/sto-156-x-license-improve-tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”. scope: x-license Changes related to @mui/x-license. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant