@contentful/experience-design-system-cli 2.11.4-dev-build-3c16094.0 → 2.11.4-dev-build-3e1df30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.11.4-dev-build-3c16094.0",
3
+ "version": "2.11.4-dev-build-3e1df30.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -202,12 +202,11 @@ async function retryComponentWithProject(component, ctx, project, warnings) {
202
202
  }
203
203
  if (!members || members.length === 0)
204
204
  return false;
205
- // Snippet-only resolution is still useful it confirms the slot surface
206
- // and lets us replace the original (which may have had fewer slot entries
207
- // because the cold AST-only pass missed members declared in heritage).
208
- // Apply the recovered slots, but DON'T drop `props-type-unresolved` from
209
- // reasons (the prop side genuinely has no resolvable members).
210
- const onlySnippets = members.every((m) => m.isSnippet);
205
+ // If the resolver returned a complete member list even when it's
206
+ // Snippet-only that's a real answer, not a partial one. Apply it and
207
+ // drop `props-type-unresolved`. Whether the resulting component still
208
+ // needs review will be decided by the standard heuristics
209
+ // (no-props-or-slots, infra-fetch, etc.) downstream.
211
210
  const { props, snippetSlots } = extractFromTypeMembersOnly(members);
212
211
  // Merge any template <slot> entries that survived the original pass — we
213
212
  // can't easily re-derive those without re-parsing the fragment, but the
@@ -220,23 +219,18 @@ async function retryComponentWithProject(component, ctx, project, warnings) {
220
219
  const slotNames = new Set(finalSlots.map((s) => s.name));
221
220
  component.props = props.filter((p) => !slotNames.has(p.name));
222
221
  component.slots = finalSlots;
223
- // Recompute confidence. When only Snippets came back, keep the
224
- // `props-type-unresolved` reason slot surface is real but the prop side
225
- // is still legitimately unresolved (the extends-from-node_modules failed).
226
- // When real props came back, drop the reason: full recovery.
227
- const remainingReasons = onlySnippets
228
- ? (component.reviewReasons ?? [])
229
- : (component.reviewReasons ?? []).filter((r) => r !== 'props-type-unresolved');
222
+ // Drop `props-type-unresolved` from reasons: the type DID resolve. Other
223
+ // heuristics (no-props-or-slots, infra-fetch, etc.) decide whether the
224
+ // recovered component still needs review.
225
+ const remainingReasons = (component.reviewReasons ?? []).filter((r) => r !== 'props-type-unresolved');
230
226
  const score = computeExtractionScore(component, {
231
227
  additionalIssueCount: remainingReasons.length,
232
228
  additionalReasons: remainingReasons,
233
229
  });
234
230
  component.extractionConfidence = score.confidence;
235
231
  component.reviewReasons = score.reasons;
236
- component.needsReview = deriveNeedsReview(score.confidence) || remainingReasons.includes('props-type-unresolved');
237
- // Remove the per-component unresolved-type warning. The `props-type-unresolved`
238
- // reason on the component itself still carries the signal for TUI drill-down;
239
- // the warnings array is replaced by the collapsed summary upstream.
232
+ component.needsReview = deriveNeedsReview(score.confidence);
233
+ // Remove the per-component unresolved-type warning recovery is complete.
240
234
  const componentName = component.name;
241
235
  const idx = warnings.findIndex((w) => w.startsWith(`${componentName}: declared Props type `) && /resolved to /.test(w));
242
236
  if (idx >= 0)
@@ -1180,7 +1174,7 @@ function extractJsdocText(comments) {
1180
1174
  // ---------------------------------------------------------------------------
1181
1175
  // Extraction: ObjectPattern destructure + type-members
1182
1176
  // ---------------------------------------------------------------------------
1183
- function extractFromDestructure(propsCall, ctx, typeMembers, warnings, additionalReasons) {
1177
+ function extractFromDestructure(propsCall, _ctx, typeMembers, warnings, additionalReasons) {
1184
1178
  const id = propsCall['id'];
1185
1179
  const properties = id['properties'] ?? [];
1186
1180
  const typeByName = new Map();
@@ -1236,9 +1230,14 @@ function extractFromDestructure(propsCall, ctx, typeMembers, warnings, additiona
1236
1230
  // are collected into the rest binding and are not individually addressable. Authoring
1237
1231
  // contract = the destructure list. (Type-members-only path runs separately for the
1238
1232
  // `const props: Props = $props()` no-destructure case.)
1239
- if (dropsRest) {
1240
- warnings.push(`${ctx.componentName}: rest element in $props() destructure dropped (${ctx.filePath}); cannot enumerate`);
1241
- }
1233
+ // Note: a `...rest` element in the destructure is intentionally NOT warned on.
1234
+ // Nearly every Svelte 5 component in real libraries uses rest-spread to pass
1235
+ // arbitrary HTML attributes through to the underlying element, so this would
1236
+ // fire on most components. The downstream pipeline already strips DOM/a11y
1237
+ // pass-through attributes globally (see `project_dsi-dom-prop-exclusion-decision`),
1238
+ // and the named props we DID extract from the destructure are the meaningful
1239
+ // authoring API. Tracking the rest spread isn't useful signal.
1240
+ void dropsRest;
1242
1241
  return {
1243
1242
  props: props.sort((a, b) => sortStable(a.name, b.name, propertyOrder(properties))),
1244
1243
  snippetNames,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.11.4-dev-build-3c16094.0",
3
+ "version": "2.11.4-dev-build-3e1df30.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "svelte": "^5.56.4",
38
38
  "ts-morph": "^27.0.2",
39
39
  "typescript": "^5.9.3",
40
- "@contentful/experience-design-system-types": "2.11.4-dev-build-3c16094.0"
40
+ "@contentful/experience-design-system-types": "2.11.4-dev-build-3e1df30.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@tsconfig/node24": "^24.0.3",