-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(deps): update dependency @stencil/core to v4.8.1 j:kit-282 * update patch --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Louis Bompart <[email protected]>
- Loading branch information
1 parent
dcfbe70
commit b5874d6
Showing
6 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
diff --git a/node_modules/@stencil/core/compiler/stencil.js b/node_modules/@stencil/core/compiler/stencil.js | ||
index 1342593..4d8cbfc 100644 | ||
--- a/node_modules/@stencil/core/compiler/stencil.js | ||
+++ b/node_modules/@stencil/core/compiler/stencil.js | ||
@@ -251814,7 +251814,7 @@ const visitClassDeclaration = (config, diagnostics, typeChecker, program, classN | ||
// We call the `handleClassFields` method which handles transforming any | ||
// class fields, removing them from the class and adding statements to the | ||
// class' constructor which instantiate them there instead. | ||
- const updatedClassFields = handleClassFields(classNode, filteredMethodsAndFields, typeChecker); | ||
+ const updatedClassFields = handleClassFields(classNode, decoratedMembers, typeChecker, filteredMethodsAndFields); | ||
validateMethods(diagnostics, classMembers); | ||
const currentDecorators = retrieveTsDecorators(classNode); | ||
return ts.factory.updateClassDeclaration(classNode, [ | ||
@@ -251848,19 +251848,8 @@ const removeStencilMethodDecorators = (classMembers, diagnostics) => { | ||
return ts.factory.updateMethodDeclaration(member, [...(newDecorators !== null && newDecorators !== void 0 ? newDecorators : []), ...((_a = retrieveTsModifiers(member)) !== null && _a !== void 0 ? _a : [])], member.asteriskToken, member.name, member.questionToken, member.typeParameters, member.parameters, member.type, member.body); | ||
} | ||
else if (ts.isPropertyDeclaration(member)) { | ||
- if (shouldInitializeInConstructor(member)) { | ||
- // if the current class member is decorated with either 'State' or | ||
- // 'Prop' we need to modify the property declaration to transform it | ||
- // from a class field but we handle this in the `handleClassFields` | ||
- // method below, so we just want to return the class member here | ||
- // untouched. | ||
- return member; | ||
- } | ||
- else { | ||
- // update the property to remove decorators | ||
- const modifiers = retrieveTsModifiers(member); | ||
- return ts.factory.updatePropertyDeclaration(member, [...(newDecorators !== null && newDecorators !== void 0 ? newDecorators : []), ...(modifiers !== null && modifiers !== void 0 ? modifiers : [])], member.name, member.questionToken, member.type, member.initializer); | ||
- } | ||
+ const modifiers = retrieveTsModifiers(member); | ||
+ return ts.factory.updatePropertyDeclaration(member, [...(newDecorators !== null && newDecorators !== void 0 ? newDecorators : []), ...(modifiers !== null && modifiers !== void 0 ? modifiers : [])], member.name, member.questionToken, member.type, member.initializer); | ||
} | ||
else { | ||
const err = buildError(diagnostics); | ||
@@ -251999,10 +251988,9 @@ const filterDecorators = (decorators, excludeList) => { | ||
* @param typeChecker a reference to the {@link ts.TypeChecker} | ||
* @returns a list of updated class elements which can be inserted into the class | ||
*/ | ||
-function handleClassFields(classNode, classMembers, typeChecker) { | ||
+function handleClassFields(classNode, classMembers, typeChecker, updatedClassMembers) { | ||
var _a; | ||
const statements = []; | ||
- const updatedClassMembers = []; | ||
for (const member of classMembers) { | ||
if (shouldInitializeInConstructor(member) && ts.isPropertyDeclaration(member)) { | ||
const memberName = tsPropDeclNameAsString(member, typeChecker); | ||
@@ -252013,11 +252001,6 @@ function handleClassFields(classNode, classMembers, typeChecker) { | ||
// just 'undefined' | ||
(_a = member.initializer) !== null && _a !== void 0 ? _a : ts.factory.createIdentifier('undefined')))); | ||
} | ||
- else { | ||
- // if it's not a class field that is decorated with a Stencil decorator then | ||
- // we just push it onto our class member list | ||
- updatedClassMembers.push(member); | ||
- } | ||
} | ||
if (statements.length === 0) { | ||
// we didn't encounter any class fields we need to update, so we can |