@lwc/ssr-compiler 8.16.3 → 8.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -692,7 +692,10 @@ const bCallWiredMethod = (esTemplate `
692
692
  instance.${ /*wire-decorated method*/estreeToolkit.is.identifier}(newValue)
693
693
  `);
694
694
  const bWireAdapterPlumbing = (esTemplate `{
695
- const wireInstance = new ${ /*wire adapter constructor*/estreeToolkit.is.expression}((newValue) => {
695
+ // Callable adapters are expressed as a function having an 'adapter' property, which
696
+ // is the actual wire constructor.
697
+ const AdapterCtor = ${ /*wire adapter constructor*/estreeToolkit.is.expression}?.adapter ?? ${ /*wire adapter constructor*/0};
698
+ const wireInstance = new AdapterCtor((newValue) => {
696
699
  ${ /*update the decorated property or call the decorated method*/estreeToolkit.is.expressionStatement};
697
700
  });
698
701
  wireInstance.connect?.();
@@ -705,7 +708,7 @@ const bWireAdapterPlumbing = (esTemplate `{
705
708
  // this preserves the behavior of the browser-side wire implementation as well as the
706
709
  // original SSR implementation.
707
710
  wireInstance.update(getLiveConfig(), undefined);
708
- __connectContext(${ /*wire adapter constructor*/0}, instance, (newContextValue) => {
711
+ __connectContext(AdapterCtor, instance, (newContextValue) => {
709
712
  wireInstance.update(getLiveConfig(), newContextValue);
710
713
  });
711
714
  }
@@ -2567,5 +2570,5 @@ function compileTemplateForSSR(src, filename, options, mode = shared.DEFAULT_SSR
2567
2570
 
2568
2571
  exports.compileComponentForSSR = compileComponentForSSR;
2569
2572
  exports.compileTemplateForSSR = compileTemplateForSSR;
2570
- /** version: 8.16.3 */
2573
+ /** version: 8.16.4 */
2571
2574
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.js CHANGED
@@ -688,7 +688,10 @@ const bCallWiredMethod = (esTemplate `
688
688
  instance.${ /*wire-decorated method*/is.identifier}(newValue)
689
689
  `);
690
690
  const bWireAdapterPlumbing = (esTemplate `{
691
- const wireInstance = new ${ /*wire adapter constructor*/is.expression}((newValue) => {
691
+ // Callable adapters are expressed as a function having an 'adapter' property, which
692
+ // is the actual wire constructor.
693
+ const AdapterCtor = ${ /*wire adapter constructor*/is.expression}?.adapter ?? ${ /*wire adapter constructor*/0};
694
+ const wireInstance = new AdapterCtor((newValue) => {
692
695
  ${ /*update the decorated property or call the decorated method*/is.expressionStatement};
693
696
  });
694
697
  wireInstance.connect?.();
@@ -701,7 +704,7 @@ const bWireAdapterPlumbing = (esTemplate `{
701
704
  // this preserves the behavior of the browser-side wire implementation as well as the
702
705
  // original SSR implementation.
703
706
  wireInstance.update(getLiveConfig(), undefined);
704
- __connectContext(${ /*wire adapter constructor*/0}, instance, (newContextValue) => {
707
+ __connectContext(AdapterCtor, instance, (newContextValue) => {
705
708
  wireInstance.update(getLiveConfig(), newContextValue);
706
709
  });
707
710
  }
@@ -2562,5 +2565,5 @@ function compileTemplateForSSR(src, filename, options, mode = DEFAULT_SSR_MODE)
2562
2565
  }
2563
2566
 
2564
2567
  export { compileComponentForSSR, compileTemplateForSSR };
2565
- /** version: 8.16.3 */
2568
+ /** version: 8.16.4 */
2566
2569
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
5
5
  ],
6
6
  "name": "@lwc/ssr-compiler",
7
- "version": "8.16.3",
7
+ "version": "8.16.4",
8
8
  "description": "Compile component for use during server-side rendering",
9
9
  "keywords": [
10
10
  "compiler",
@@ -49,9 +49,9 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/types": "7.26.10",
52
- "@lwc/errors": "8.16.3",
53
- "@lwc/shared": "8.16.3",
54
- "@lwc/template-compiler": "8.16.3",
52
+ "@lwc/errors": "8.16.4",
53
+ "@lwc/shared": "8.16.4",
54
+ "@lwc/template-compiler": "8.16.4",
55
55
  "acorn": "8.14.1",
56
56
  "astring": "^1.9.0",
57
57
  "estree-toolkit": "^1.7.8",
@@ -59,7 +59,7 @@
59
59
  "meriyah": "^5.0.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@lwc/babel-plugin-component": "8.16.3",
62
+ "@lwc/babel-plugin-component": "8.16.4",
63
63
  "@types/estree": "^1.0.6"
64
64
  }
65
65
  }