Skip to content

Commit 56342ae

Browse files
authored
Merge branch 'main' into fix/bundled-entrypoint
2 parents 3f4d318 + f43c1bc commit 56342ae

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

tools/pfe-tools/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# @patternfly/pfe-tools
22

3+
## 6.0.1
4+
### Patch Changes
5+
6+
- 135ecf6: React Wrappers Generator: skip module that have no exports
7+
38
## 6.0.0
49
### Major Changes
510

tools/pfe-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternfly/pfe-tools",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"type": "module",
55
"description": "Development and build tools for PatternFly Elements and related projects",
66
"keywords": [

tools/pfe-tools/react/generate-wrappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function getDeprefixedClassName(className: string, prefix: string) {
4343
* @param str string to convert to camelcase
4444
*/
4545
function camel(str: string): string {
46-
return str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (m, chr) => chr.toUpperCase());
46+
return str.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (_, chr) => chr.toUpperCase());
4747
}
4848

4949
function getEventReactPropName(event: CEM.Event) {
@@ -183,7 +183,7 @@ export async function generateReactWrappers(
183183
try {
184184
for (const module of manifest.modules) {
185185
if (!module.exports) {
186-
throw new Error(`module has no exports: ${module.path}`);
186+
continue;
187187
}
188188
const { js, ts, tagNames } = genWrapperModules(module, packageName, elPrefix, classPrefix);
189189
written.push(await writeReactWrappers(js, ts, tagNames, module.path, outDirPathOrURL));

0 commit comments

Comments
 (0)