@stencil/core 2.22.2 → 2.22.3-dev.1685477255.0a23805

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/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI (CommonJS) v2.22.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v2.22.3-dev.1685477255.0a23805 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  'use strict';
5
5
 
@@ -989,7 +989,7 @@ const dereferenceAlias = (maybeAlias) => {
989
989
  const dependencies = [
990
990
  {
991
991
  name: "@stencil/core",
992
- version: "2.22.2",
992
+ version: "2.22.3-dev.1685477255.0a23805",
993
993
  main: "compiler/stencil.js",
994
994
  resources: [
995
995
  "package.json",
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v2.22.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v2.22.3-dev.1685477255.0a23805 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  /**
5
5
  * Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
@@ -965,7 +965,7 @@ const dereferenceAlias = (maybeAlias) => {
965
965
  const dependencies = [
966
966
  {
967
967
  name: "@stencil/core",
968
- version: "2.22.2",
968
+ version: "2.22.3-dev.1685477255.0a23805",
969
969
  main: "compiler/stencil.js",
970
970
  resources: [
971
971
  "package.json",
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/cli",
3
- "version": "2.22.2",
3
+ "version": "2.22.3-dev.1685477255.0a23805",
4
4
  "description": "Stencil CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/compiler",
3
- "version": "2.22.2",
3
+ "version": "2.22.3-dev.1685477255.0a23805",
4
4
  "description": "Stencil Compiler.",
5
5
  "main": "./stencil.js",
6
6
  "types": "./stencil.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Compiler v2.22.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Compiler v2.22.3-dev.1685477255.0a23805 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  (function(exports) {
5
5
  'use strict';
@@ -2097,7 +2097,7 @@ const process$3 = /*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), p
2097
2097
  'default': process_1
2098
2098
  });
2099
2099
 
2100
- const buildId = '20230123155931';
2100
+ const buildId = '1685477255';
2101
2101
  const minfyJsId = 'terser5.16.1_7';
2102
2102
  const optimizeCssId = 'autoprefixer10.4.13_postcss8.4.21_7';
2103
2103
  const parse5Version = '7.1.2';
@@ -2105,8 +2105,8 @@ const rollupVersion = '2.42.3';
2105
2105
  const sizzleVersion = '2.42.3';
2106
2106
  const terserVersion = '5.16.1';
2107
2107
  const typescriptVersion = '4.9.4';
2108
- const vermoji = '🎈';
2109
- const version$3 = '2.22.2';
2108
+ const vermoji = '🐬';
2109
+ const version$3 = '2.22.3-dev.1685477255.0a23805';
2110
2110
  const versions = {
2111
2111
  stencil: version$3,
2112
2112
  parse5: parse5Version,
@@ -56241,22 +56241,25 @@ const createComponentMetadataProxy = (compilerMeta) => {
56241
56241
  return t.factory.createCallExpression(t.factory.createIdentifier(PROXY_CUSTOM_ELEMENT), [], [literalCmpClassName, literalMeta]);
56242
56242
  };
56243
56243
  /**
56244
- * Create a call expression for wrapping a component represented as an anonymous class in a proxy. This call expression
56245
- * takes a form:
56244
+ * Create a call expression for wrapping a component represented as a class
56245
+ * expression in a proxy. This call expression takes the form:
56246
+ *
56246
56247
  * ```ts
56247
56248
  * PROXY_CUSTOM_ELEMENT(Clazz, Metadata);
56248
56249
  * ```
56250
+ *
56249
56251
  * where
56250
- * - `PROXY_CUSTOM_ELEMENT` is a Stencil internal identifier that will be replaced with the name of the actual function
56251
- * name at compile name
56252
- * - `Clazz` is an anonymous class to be proxied
56252
+ * - `PROXY_CUSTOM_ELEMENT` is a Stencil internal identifier that will be
56253
+ * replaced with the name of the actual function name at compile name
56254
+ * - `Clazz` is a class expression to be proxied
56253
56255
  * - `Metadata` is the compiler metadata associated with the Stencil component
56254
56256
  *
56255
- * @param compilerMeta compiler metadata associated with the component to be wrapped in a proxy
56256
- * @param clazz the anonymous class to proxy
56257
+ * @param compilerMeta compiler metadata associated with the component to be
56258
+ * wrapped in a proxy
56259
+ * @param clazz the class expression to proxy
56257
56260
  * @returns the generated call expression
56258
56261
  */
56259
- const createAnonymousClassMetadataProxy = (compilerMeta, clazz) => {
56262
+ const createClassMetadataProxy = (compilerMeta, clazz) => {
56260
56263
  const compactMeta = formatComponentRuntimeMeta(compilerMeta, true);
56261
56264
  const literalMeta = convertValueToLiteral(compactMeta);
56262
56265
  return t.factory.createCallExpression(t.factory.createIdentifier(PROXY_CUSTOM_ELEMENT), [], [clazz, literalMeta]);
@@ -56315,8 +56318,13 @@ const proxyCustomElement = (compilerCtx, transformOpts) => {
56315
56318
  if (declaration.name.getText() !== principalComponent.componentClassName) {
56316
56319
  continue;
56317
56320
  }
56321
+ // to narrow the type of `declaration.initializer` to `ts.ClassExpression`
56322
+ if (!t.isClassExpression(declaration.initializer)) {
56323
+ continue;
56324
+ }
56325
+ const renamedClassExpression = t.factory.updateClassExpression(declaration.initializer, t.getModifiers(declaration.initializer), t.factory.createIdentifier(principalComponent.componentClassName), declaration.initializer.typeParameters, declaration.initializer.heritageClauses, declaration.initializer.members);
56318
56326
  // wrap the Stencil component's class declaration in a component proxy
56319
- const proxyCreationCall = createAnonymousClassMetadataProxy(principalComponent, declaration.initializer);
56327
+ const proxyCreationCall = createClassMetadataProxy(principalComponent, renamedClassExpression);
56320
56328
  t.addSyntheticLeadingComment(proxyCreationCall, t.SyntaxKind.MultiLineCommentTrivia, '@__PURE__', false);
56321
56329
  // update the component's variable declaration to use the new initializer
56322
56330
  const proxiedComponentDeclaration = t.factory.updateVariableDeclaration(declaration, declaration.name, declaration.exclamationToken, declaration.type, proxyCreationCall);
@@ -70093,7 +70101,7 @@ const getComponentPathContent = (componentGraph, outputTarget) => {
70093
70101
  const dependencies = [
70094
70102
  {
70095
70103
  name: "@stencil/core",
70096
- version: "2.22.2",
70104
+ version: "2.22.3-dev.1685477255.0a23805",
70097
70105
  main: "compiler/stencil.js",
70098
70106
  resources: [
70099
70107
  "package.json",