Skip to content

Commit

Permalink
fix(deps): update dependency @stencil/core to v4.8.1 j:kit-282 (#3451)
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
renovate[bot] and louis-bompart authored Dec 5, 2023
1 parent dcfbe70 commit b5874d6
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 73 deletions.
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/atomic-hosted-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@coveo/bueno": "0.45.5",
"@coveo/headless": "2.41.0",
"@stencil/core": "4.7.2"
"@stencil/core": "4.8.1"
},
"devDependencies": {
"@coveo/release": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@coveo/bueno": "0.45.5",
"@popperjs/core": "^2.11.6",
"@salesforce-ux/design-system": "^2.16.1",
"@stencil/core": "4.7.2",
"@stencil/core": "4.8.1",
"@stencil/store": "2.0.11",
"dayjs": "1.11.10",
"dompurify": "3.0.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/samples/stencil/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@coveo/atomic": "2.51.0",
"@coveo/headless": "2.41.0",
"@stencil/core": "4.7.2",
"@stencil/core": "4.8.1",
"stencil-router-v2": "0.6.0"
},
"devDependencies": {
Expand Down
59 changes: 0 additions & 59 deletions patches/@stencil+core+4.7.2.patch

This file was deleted.

59 changes: 59 additions & 0 deletions patches/@stencil+core+4.8.1.patch
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

0 comments on commit b5874d6

Please sign in to comment.