From a6668424a9bad4d2b303d39fe3d97646b7baeed2 Mon Sep 17 00:00:00 2001 From: Alex Prudhomme <78121423+alexprudhomme@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:54:56 -0500 Subject: [PATCH] fix patches --- ...@stencil+angular-output-target+0.8.4.patch | 39 ------------------- ....20.0.patch => @stencil+core+4.22.2.patch} | 20 +++------- .../@stencil+react-output-target+0.5.3.patch | 13 ------- 3 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 patches/@stencil+angular-output-target+0.8.4.patch rename patches/{@stencil+core+4.20.0.patch => @stencil+core+4.22.2.patch} (78%) delete mode 100644 patches/@stencil+react-output-target+0.5.3.patch diff --git a/patches/@stencil+angular-output-target+0.8.4.patch b/patches/@stencil+angular-output-target+0.8.4.patch deleted file mode 100644 index 714f0642fe1..00000000000 --- a/patches/@stencil+angular-output-target+0.8.4.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/node_modules/@stencil/angular-output-target/dist/generate-angular-component.js b/node_modules/@stencil/angular-output-target/dist/generate-angular-component.js -index 16b41a9..a88f7b8 100644 ---- a/node_modules/@stencil/angular-output-target/dist/generate-angular-component.js -+++ b/node_modules/@stencil/angular-output-target/dist/generate-angular-component.js -@@ -134,7 +134,7 @@ export const createComponentTypeDefinition = (outputType, tagNameAsPascal, event - const eventTypes = publicEvents.map((event) => { - const comment = createDocComment(event.docs); - let eventName = event.name; -- if (event.name.includes('-')) { -+ if (/[\W_]/g.test(event.name)) { - // If an event name includes a dash, we need to wrap it in quotes. - // https://github.com/ionic-team/stencil-ds-output-targets/issues/212 - eventName = `'${event.name}'`; -diff --git a/node_modules/@stencil/angular-output-target/dist/index.cjs.js b/node_modules/@stencil/angular-output-target/dist/index.cjs.js -index a409a9e..291fa5d 100644 ---- a/node_modules/@stencil/angular-output-target/dist/index.cjs.js -+++ b/node_modules/@stencil/angular-output-target/dist/index.cjs.js -@@ -279,7 +279,7 @@ const createComponentTypeDefinition = (outputType, tagNameAsPascal, events, comp - const eventTypes = publicEvents.map((event) => { - const comment = createDocComment(event.docs); - let eventName = event.name; -- if (event.name.includes('-')) { -+ if (/[\W_]/g.test(event.name)) { - // If an event name includes a dash, we need to wrap it in quotes. - // https://github.com/ionic-team/stencil-ds-output-targets/issues/212 - eventName = `'${event.name}'`; -diff --git a/node_modules/@stencil/angular-output-target/dist/index.js b/node_modules/@stencil/angular-output-target/dist/index.js -index 66792ef..3ca0509 100644 ---- a/node_modules/@stencil/angular-output-target/dist/index.js -+++ b/node_modules/@stencil/angular-output-target/dist/index.js -@@ -271,7 +271,7 @@ const createComponentTypeDefinition = (outputType, tagNameAsPascal, events, comp - const eventTypes = publicEvents.map((event) => { - const comment = createDocComment(event.docs); - let eventName = event.name; -- if (event.name.includes('-')) { -+ if (/[\W_]/g.test(event.name)) { - // If an event name includes a dash, we need to wrap it in quotes. - // https://github.com/ionic-team/stencil-ds-output-targets/issues/212 - eventName = `'${event.name}'`; diff --git a/patches/@stencil+core+4.20.0.patch b/patches/@stencil+core+4.22.2.patch similarity index 78% rename from patches/@stencil+core+4.20.0.patch rename to patches/@stencil+core+4.22.2.patch index fe0f3062378..1434927088e 100644 --- a/patches/@stencil+core+4.20.0.patch +++ b/patches/@stencil+core+4.22.2.patch @@ -1,8 +1,8 @@ diff --git a/node_modules/@stencil/core/compiler/stencil.js b/node_modules/@stencil/core/compiler/stencil.js -index 05c98c9..1ae35e5 100644 +index 4f3a6e3..487f815 100644 --- a/node_modules/@stencil/core/compiler/stencil.js +++ b/node_modules/@stencil/core/compiler/stencil.js -@@ -234904,8 +234904,8 @@ var getTsOptionsToExtend = (config) => { +@@ -238083,8 +238083,8 @@ var getTsOptionsToExtend = (config) => { // if the `DIST_TYPES` output target is present then we'd like to emit // declaration files declaration: config.outputTargets.some(isOutputTargetDistTypes), @@ -13,7 +13,7 @@ index 05c98c9..1ae35e5 100644 noEmitOnError: false, outDir: config.cacheDir || config.sys.tmpDirSync(), sourceMap: config.sourceMap, -@@ -259592,7 +259592,7 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod +@@ -262850,7 +262850,7 @@ var visitClassDeclaration = (config, diagnostics, typeChecker, program, classNod importAliasMap.get("AttachInternals") ); } @@ -22,7 +22,7 @@ index 05c98c9..1ae35e5 100644 validateMethods(diagnostics, classMembers); const currentDecorators = retrieveTsDecorators(classNode); return import_typescript54.default.factory.updateClassDeclaration( -@@ -259632,9 +259632,6 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap) +@@ -262890,9 +262890,6 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap) member2.body ); } else if (import_typescript54.default.isPropertyDeclaration(member2)) { @@ -32,15 +32,7 @@ index 05c98c9..1ae35e5 100644 const modifiers = retrieveTsModifiers(member2); return import_typescript54.default.factory.updatePropertyDeclaration( member2, -@@ -259644,7 +259641,6 @@ var removeStencilMethodDecorators = (classMembers, diagnostics, importAliasMap) - member2.type, - member2.initializer - ); -- } - } else { - const err2 = buildError(diagnostics); - err2.messageText = "Unknown class member encountered!"; -@@ -259668,10 +259664,9 @@ var filterDecorators = (decorators, excludeList) => { +@@ -262926,10 +262923,9 @@ var filterDecorators = (decorators, excludeList) => { } return decorators; }; @@ -52,7 +44,7 @@ index 05c98c9..1ae35e5 100644 for (const member2 of classMembers) { if (shouldInitializeInConstructor(member2, importAliasMap) && import_typescript54.default.isPropertyDeclaration(member2)) { const memberName = tsPropDeclNameAsString(member2, typeChecker); -@@ -259686,8 +259681,6 @@ function handleClassFields(classNode, classMembers, typeChecker, importAliasMap) +@@ -262944,8 +262940,6 @@ function handleClassFields(classNode, classMembers, typeChecker, importAliasMap) ) ) ); diff --git a/patches/@stencil+react-output-target+0.5.3.patch b/patches/@stencil+react-output-target+0.5.3.patch deleted file mode 100644 index 83024a73790..00000000000 --- a/patches/@stencil+react-output-target+0.5.3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/@stencil/react-output-target/dist/index.cjs.js b/node_modules/@stencil/react-output-target/dist/index.cjs.js -index fd6fd4c..8959f0f 100644 ---- a/node_modules/@stencil/react-output-target/dist/index.cjs.js -+++ b/node_modules/@stencil/react-output-target/dist/index.cjs.js -@@ -142,7 +142,7 @@ async function reactProxyOutput(config, compilerCtx, outputTarget, components) { - * @returns the filtered list of components - */ - function getFilteredComponents(excludeComponents = [], cmps) { -- return sortBy(cmps, (cmp) => cmp.tagName).filter((c) => !excludeComponents.includes(c.tagName) && !c.internal); -+ return sortBy(cmps, (cmp) => cmp.tagName).filter((c) => !excludeComponents.includes(c.tagName) && (!c.internal || ['AtomicCommerce', 'AtomicProduct'].some(allowedCmpName=>c.componentClassName.startsWith(allowedCmpName)))); - } - /** - * Generate the code that will be responsible for creating the Stencil-React bindings