Skip to content

feat: emit Custom Elements Manifest 2.1 - #345

Open
SisyphusZheng wants to merge 1 commit into
open-wc:masterfrom
SisyphusZheng:codex/cem-2.1
Open

SisyphusZheng wants to merge 1 commit into
open-wc:masterfrom
SisyphusZheng:codex/cem-2.1

Conversation

@SisyphusZheng

Copy link
Copy Markdown

Summary

Aligns the analyzer's declared output version, schema type dependency, fixtures, and current documentation with Custom Elements Manifest 2.1.

The analyzer already emits the CEM 2.1 readonly and cssStates fields, but currently declares every generated manifest as schemaVersion: "1.0.0" and depends on the 1.0 schema types.

Closes #344.

Changes

  • Emits schemaVersion: "2.1.0" from the analyzer and browser bundle.
  • Updates the custom-elements-manifest dependency and root documentation dependency to 2.1.0.
  • Updates all 27 generated/expected analyzer fixture pairs and current documentation examples.
  • Limits the fixture-version updater to analyzer-generated results so dependency-input manifests keep their own declared versions.
  • Adds CEM 2.1 Schema validation to every analyzer integration result.
  • Adds targeted semantic assertions for boolean readonly values and the cssStates structure instead of treating Schema acceptance alone as complete conformance proof.
  • Keeps four external dependency fixtures at CEM 1.0 and asserts that their inherited members, attributes, declarations, and exports are incorporated into the CEM 2.1 result.
  • Records the observable output-contract change in the analyzer changelog.

Compatibility boundary

This PR verifies that the upgraded analyzer can read the tested CEM 1.0 dependency manifests and produce a CEM 2.1 result. It does not imply that consumers which only accept 1.0 will accept the new output. The schemaVersion change is intentionally documented as an observable contract change; the appropriate analyzer release level is left to the maintainers.

Schema validation is used as positive migration coverage, not as the sole semantic guarantee. webcomponents/custom-elements-manifest#138 tracks an existing declaration-union / anyOf ambiguity, so the 2.1-specific fields also have direct assertions.

Verification

  • corepack yarn test — all workspaces passed.
  • corepack yarn workspace @custom-elements-manifest/analyzer build:browser — passed.
  • tsc packages/analyzer/index.d.ts --noEmit --skipLibCheck --moduleResolution node --module esnext --target es2020 — passed.
  • Documentation build with the repository's CI Node 16 baseline — passed; all 579 internal links valid.
  • Analyzer fixtures: 27/27 generated results validate against CEM 2.1.
  • Legacy dependency inputs: 4 remain declared as CEM 1.0 and are exercised by explicit data-flow assertions.

@netlify

netlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for custom-elements-manifest-analyzer ready!

Name Link
🔨 Latest commit de6e976
🔍 Latest deploy log https://app.netlify.com/projects/custom-elements-manifest-analyzer/deploys/6aa26b6c011c9c00087687c3
😎 Deploy Preview https://deploy-preview-345--custom-elements-manifest-analyzer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Analyzer emits CEM 2.1 fields while declaring schemaVersion 1.0.0

1 participant