Skip to content

Commit 4263384

Browse files
Bug fix for StencilJS compatibility (#2026)
* bug fix for stencil * updated based on feedback * updated formatting to pass prettier test * added opton to jsx plugin * added option to jsx plugin * reverted build js * updated changelog * Update packages/webawesome/docs/docs/resources/changelog.md Co-authored-by: Konnor Rogers <konnor5456@gmail.com> --------- Co-authored-by: Konnor Rogers <konnor5456@gmail.com>
1 parent 39e1fa2 commit 4263384

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

packages/webawesome/custom-elements-manifest.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,27 @@ export default {
194194
},
195195
}),
196196

197+
// Filter out events without names (these come from code analysis detecting
198+
// dispatchEvent() calls, but lack the event name that comes from @event JSDoc tags)
199+
{
200+
name: 'wa-filter-unnamed-events',
201+
packageLinkPhase({ customElementsManifest }) {
202+
customElementsManifest?.modules?.forEach(mod => {
203+
mod.declarations?.forEach(dec => {
204+
if (dec.kind === 'class' && dec.events) {
205+
dec.events = dec.events.filter(event => event.name);
206+
}
207+
});
208+
});
209+
},
210+
},
211+
197212
// Generate JSX types (see https://wc-toolkit.com/integrations/jsx/)
198213
jsxTypesPlugin({
199214
fileName: 'custom-elements-jsx.d.ts',
200215
outdir,
201216
defaultExport: true,
217+
includeDefaultDOMEvents: true,
202218
componentTypePath: (_name, _tag, modulePath) => {
203219
return `./${modulePath}`;
204220
},

packages/webawesome/docs/docs/resources/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
1313
<small>TBD</small>
1414

1515
- Added `wa-button` class for styling `<a>` elements as buttons [pr:2040]
16+
- Fixed a bug in the custom elements manifest where events may not have a name. [pr:2026]
1617
- Fixed a bug in `<wa-select>` where options with `selected` set via framework property binding (e.g., Vue's `:selected`) were not respected when `with-clear` was present [pr:1985]
1718
- Fixed a bug `<wa-color-picker>` that prevented it from flipping horizontally when position to the right of the viewport. [pr:2024]
1819
- Fixed a bug by adding `color: inherit` to the `<wa-dialog>` and `<wa-drawer>` styles so they inherit the text color from the document context rather than the browser default. [pr:2064]

packages/webawesome/scripts/build.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ export async function build(options = {}) {
121121
}
122122

123123
spinner.succeed();
124-
125124
return Promise.resolve();
126125
}
127126

0 commit comments

Comments
 (0)