@stencil/core 3.0.0-alpha.2 → 3.0.0-beta.0

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) v3.0.0-alpha.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v3.0.0-beta.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  'use strict';
5
5
 
@@ -987,7 +987,7 @@ const dereferenceAlias = (maybeAlias) => {
987
987
  const dependencies = [
988
988
  {
989
989
  name: "@stencil/core",
990
- version: "3.0.0-alpha.2",
990
+ version: "3.0.0-beta.0",
991
991
  main: "compiler/stencil.js",
992
992
  resources: [
993
993
  "package.json",
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v3.0.0-alpha.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v3.0.0-beta.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  /**
5
5
  * Convert a string from dash-case / kebab-case to PascalCase (or CamelCase,
@@ -963,7 +963,7 @@ const dereferenceAlias = (maybeAlias) => {
963
963
  const dependencies = [
964
964
  {
965
965
  name: "@stencil/core",
966
- version: "3.0.0-alpha.2",
966
+ version: "3.0.0-beta.0",
967
967
  main: "compiler/stencil.js",
968
968
  resources: [
969
969
  "package.json",
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/cli",
3
- "version": "3.0.0-alpha.2",
3
+ "version": "3.0.0-beta.0",
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": "3.0.0-alpha.2",
3
+ "version": "3.0.0-beta.0",
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 v3.0.0-alpha.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Compiler v3.0.0-beta.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  (function(exports) {
5
5
  'use strict';
@@ -1368,6 +1368,7 @@ const getDependencies = (buildCtx) => {
1368
1368
  const hasDependency = (buildCtx, depName) => {
1369
1369
  return getDependencies(buildCtx).includes(depName);
1370
1370
  };
1371
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
1371
1372
  const getDynamicImportFunction$1 = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
1372
1373
  const readPackageJson = async (config, compilerCtx, buildCtx) => {
1373
1374
  try {
@@ -2097,7 +2098,7 @@ const process$3 = /*#__PURE__*/Object.assign(/*#__PURE__*/Object.create(null), p
2097
2098
  'default': process_1
2098
2099
  });
2099
2100
 
2100
- const buildId = '20221212181524';
2101
+ const buildId = '20221219175822';
2101
2102
  const minfyJsId = 'terser5.16.1_7';
2102
2103
  const optimizeCssId = 'autoprefixer10.4.13_postcss8.4.20_7';
2103
2104
  const parse5Version = '7.1.2';
@@ -2105,8 +2106,8 @@ const rollupVersion = '2.42.3';
2105
2106
  const sizzleVersion = '2.42.3';
2106
2107
  const terserVersion = '5.16.1';
2107
2108
  const typescriptVersion = '4.9.4';
2108
- const vermoji = '🐙';
2109
- const version$3 = '3.0.0-alpha.2';
2109
+ const vermoji = '👑';
2110
+ const version$3 = '3.0.0-beta.0';
2110
2111
  const versions = {
2111
2112
  stencil: version$3,
2112
2113
  parse5: parse5Version,
@@ -10112,7 +10113,8 @@ const optimizeModule = async (config, compilerCtx, opts) => {
10112
10113
  const getTerserOptions = (config, sourceTarget, prettyOutput) => {
10113
10114
  const opts = {
10114
10115
  ie8: false,
10115
- safari10: !!config.extras.safari10,
10116
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
10117
+ safari10: !!config.extras.__deprecated__safari10,
10116
10118
  format: {},
10117
10119
  sourceMap: config.sourceMap,
10118
10120
  };
@@ -10573,7 +10575,8 @@ const optimizeJs = async (inputOpts) => {
10573
10575
  const prettyOutput = !!inputOpts.pretty;
10574
10576
  const config = {
10575
10577
  extras: {
10576
- safari10: true,
10578
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
10579
+ __deprecated__safari10: true,
10577
10580
  },
10578
10581
  };
10579
10582
  const sourceTarget = inputOpts.target === 'es5' ? 'es5' : 'latest';
@@ -30869,8 +30872,7 @@ function json(options) {
30869
30872
  };
30870
30873
  } catch (err) {
30871
30874
  var message = 'Could not parse JSON file';
30872
- var position = parseInt(/[\d]/.exec(err.message)[0], 10);
30873
- this.warn({ message: message, id: id, position: position });
30875
+ this.error({ message: message, id: id, cause: err });
30874
30876
  return null;
30875
30877
  }
30876
30878
  }
@@ -54012,7 +54014,8 @@ export const Build = {
54012
54014
  return null;
54013
54015
  },
54014
54016
  resolveImportMeta(prop, { format }) {
54015
- if (config.extras.dynamicImportShim && prop === 'url' && format === 'es') {
54017
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
54018
+ if (config.extras.__deprecated__dynamicImportShim && prop === 'url' && format === 'es') {
54016
54019
  return '""';
54017
54020
  }
54018
54021
  return null;
@@ -55952,7 +55955,7 @@ const bundleOutput = async (config, compilerCtx, buildCtx, bundleOpts) => {
55952
55955
  * @returns the rollup options to be used
55953
55956
  */
55954
55957
  const getRollupOptions = (config, compilerCtx, buildCtx, bundleOpts) => {
55955
- var _a;
55958
+ var _a, _b;
55956
55959
  const customResolveOptions = createCustomResolverAsync(config.sys, compilerCtx.fs, [
55957
55960
  '.tsx',
55958
55961
  '.ts',
@@ -55993,6 +55996,9 @@ const getRollupOptions = (config, compilerCtx, buildCtx, bundleOpts) => {
55993
55996
  const afterPlugins = config.rollupPlugins.after || [];
55994
55997
  const rollupOptions = {
55995
55998
  input: bundleOpts.inputs,
55999
+ output: {
56000
+ inlineDynamicImports: (_a = bundleOpts.inlineDynamicImports) !== null && _a !== void 0 ? _a : false,
56001
+ },
55996
56002
  plugins: [
55997
56003
  coreResolvePlugin(config, compilerCtx, bundleOpts.platform, bundleOpts.externalRuntime),
55998
56004
  appDataPlugin(config, compilerCtx, buildCtx, bundleOpts.conditionals, bundleOpts.platform),
@@ -56024,8 +56030,7 @@ const getRollupOptions = (config, compilerCtx, buildCtx, bundleOpts) => {
56024
56030
  fileLoadPlugin(compilerCtx.fs),
56025
56031
  ],
56026
56032
  treeshake: getTreeshakeOption(config, bundleOpts),
56027
- inlineDynamicImports: bundleOpts.inlineDynamicImports,
56028
- preserveEntrySignatures: (_a = bundleOpts.preserveEntrySignatures) !== null && _a !== void 0 ? _a : 'strict',
56033
+ preserveEntrySignatures: (_b = bundleOpts.preserveEntrySignatures) !== null && _b !== void 0 ? _b : 'strict',
56029
56034
  onwarn: createOnWarnFn(buildCtx.diagnostics),
56030
56035
  cache: compilerCtx.rollupCache.get(bundleOpts.id),
56031
56036
  };
@@ -57085,14 +57090,18 @@ const updateBuildConditionals = (config, b) => {
57085
57090
  b.appendChildSlotFix = config.extras.appendChildSlotFix;
57086
57091
  b.slotChildNodesFix = config.extras.slotChildNodesFix;
57087
57092
  b.cloneNodeFix = config.extras.cloneNodeFix;
57088
- b.dynamicImportShim = config.extras.dynamicImportShim;
57093
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
57094
+ b.dynamicImportShim = config.extras.__deprecated__dynamicImportShim;
57089
57095
  b.lifecycleDOMEvents = !!(b.isDebug || config._isTesting || config.extras.lifecycleDOMEvents);
57090
- b.safari10 = config.extras.safari10;
57096
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
57097
+ b.safari10 = config.extras.__deprecated__safari10;
57091
57098
  b.scopedSlotTextContentFix = !!config.extras.scopedSlotTextContentFix;
57092
57099
  b.scriptDataOpts = config.extras.scriptDataOpts;
57093
- b.shadowDomShim = config.extras.shadowDomShim;
57100
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
57101
+ b.shadowDomShim = config.extras.__deprecated__shadowDomShim;
57094
57102
  b.attachStyles = true;
57095
57103
  b.invisiblePrehydration = typeof config.invisiblePrehydration === 'undefined' ? true : config.invisiblePrehydration;
57104
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
57096
57105
  if (b.shadowDomShim) {
57097
57106
  b.slotRelocation = b.slot;
57098
57107
  }
@@ -57172,7 +57181,6 @@ const getBundleOptions = (config, buildCtx, compilerCtx, outputTarget) => ({
57172
57181
  index: '\0core',
57173
57182
  },
57174
57183
  loader: {},
57175
- inlineDynamicImports: outputTarget.inlineDynamicImports,
57176
57184
  preserveEntrySignatures: 'allow-extension',
57177
57185
  });
57178
57186
  /**
@@ -57390,7 +57398,6 @@ const bundleCustomElements = async (config, compilerCtx, buildCtx, outputTarget)
57390
57398
  loader: {
57391
57399
  '\0core': generateEntryPoint(outputTarget, buildCtx),
57392
57400
  },
57393
- inlineDynamicImports: outputTarget.inlineDynamicImports,
57394
57401
  preserveEntrySignatures: 'allow-extension',
57395
57402
  };
57396
57403
  const build = await bundleOutput(config, compilerCtx, buildCtx, bundleOpts);
@@ -57668,6 +57675,7 @@ const addHydrateRuntimeCmpMeta = (classMembers, cmp) => {
57668
57675
  };
57669
57676
  // We always need shadow-dom shim in hydrate runtime
57670
57677
  if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
57678
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
57671
57679
  cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
57672
57680
  }
57673
57681
  const staticMember = createStaticGetter('cmpMeta', convertValueToLiteral(cmpMeta));
@@ -57731,6 +57739,7 @@ const getHydrateBuildConditionals$1 = (cmps) => {
57731
57739
  build.slotRelocation = true;
57732
57740
  build.lazyLoad = true;
57733
57741
  build.hydrateServerSide = true;
57742
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
57734
57743
  build.cssVarShim = false;
57735
57744
  build.hydrateClientSide = true;
57736
57745
  build.isDebug = false;
@@ -57748,11 +57757,14 @@ const getHydrateBuildConditionals$1 = (cmps) => {
57748
57757
  build.slotChildNodesFix = false;
57749
57758
  build.cloneNodeFix = false;
57750
57759
  build.cssAnnotations = true;
57760
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
57751
57761
  build.shadowDomShim = true;
57762
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
57752
57763
  build.safari10 = false;
57753
57764
  build.hydratedAttribute = false;
57754
57765
  build.hydratedClass = true;
57755
57766
  build.scriptDataOpts = false;
57767
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
57756
57768
  build.dynamicImportShim = false;
57757
57769
  build.attachStyles = true;
57758
57770
  return build;
@@ -58126,7 +58138,9 @@ const getHydrateBuildConditionals = (config, cmps) => {
58126
58138
  build.cloneNodeFix = false;
58127
58139
  build.appendChildSlotFix = false;
58128
58140
  build.slotChildNodesFix = false;
58141
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
58129
58142
  build.safari10 = false;
58143
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
58130
58144
  build.shadowDomShim = false;
58131
58145
  return build;
58132
58146
  };
@@ -58874,7 +58888,8 @@ const generateEsmBrowser = async (config, compilerCtx, buildCtx, rollupBuild, ou
58874
58888
  preferConst: true,
58875
58889
  sourcemap: config.sourceMap,
58876
58890
  };
58877
- if (config.extras.dynamicImportShim) {
58891
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
58892
+ if (config.extras.__deprecated__dynamicImportShim) {
58878
58893
  // for Edge 16-18
58879
58894
  esmOpts.dynamicImportFunction = getDynamicImportFunction$1(config.fsNamespace);
58880
58895
  }
@@ -58894,7 +58909,8 @@ const getClientPolyfill = async (config, compilerCtx, polyfillFile) => {
58894
58909
  const getAppBrowserCorePolyfills = async (config, compilerCtx) => {
58895
58910
  // read all the polyfill content, in this particular order
58896
58911
  const polyfills = INLINE_POLYFILLS.slice();
58897
- if (config.extras.cssVarsShim) {
58912
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
58913
+ if (config.extras.__deprecated__cssVarsShim) {
58898
58914
  polyfills.push(INLINE_CSS_SHIM);
58899
58915
  }
58900
58916
  const results = await Promise.all(polyfills.map((polyfillFile) => getClientPolyfill(config, compilerCtx, polyfillFile)));
@@ -58985,7 +59001,8 @@ const getLazyBuildConditionals = (config, cmps) => {
58985
59001
  const build = getBuildFeatures(cmps);
58986
59002
  build.lazyLoad = true;
58987
59003
  build.hydrateServerSide = false;
58988
- build.cssVarShim = config.extras.cssVarsShim;
59004
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
59005
+ build.cssVarShim = config.extras.__deprecated__cssVarsShim;
58989
59006
  build.transformTagName = config.extras.tagNameTransform;
58990
59007
  build.asyncQueue = config.taskQueue === 'congestionAsync';
58991
59008
  build.taskQueue = config.taskQueue !== 'immediate';
@@ -69040,12 +69057,16 @@ const validateConfig = (userConfig = {}, bootstrapConfig) => {
69040
69057
  validatedConfig.extras = validatedConfig.extras || {};
69041
69058
  validatedConfig.extras.appendChildSlotFix = !!validatedConfig.extras.appendChildSlotFix;
69042
69059
  validatedConfig.extras.cloneNodeFix = !!validatedConfig.extras.cloneNodeFix;
69043
- validatedConfig.extras.cssVarsShim = !!validatedConfig.extras.cssVarsShim;
69044
- validatedConfig.extras.dynamicImportShim = !!validatedConfig.extras.dynamicImportShim;
69060
+ // TODO(STENCIL-659): Remove code implementing the CSS variable shim
69061
+ validatedConfig.extras.__deprecated__cssVarsShim = !!validatedConfig.extras.__deprecated__cssVarsShim;
69062
+ // TODO(STENCIL-661): Remove code related to the dynamic import shim
69063
+ validatedConfig.extras.__deprecated__dynamicImportShim = !!validatedConfig.extras.__deprecated__dynamicImportShim;
69045
69064
  validatedConfig.extras.lifecycleDOMEvents = !!validatedConfig.extras.lifecycleDOMEvents;
69046
- validatedConfig.extras.safari10 = !!validatedConfig.extras.safari10;
69065
+ // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.
69066
+ validatedConfig.extras.__deprecated__safari10 = !!validatedConfig.extras.__deprecated__safari10;
69047
69067
  validatedConfig.extras.scriptDataOpts = !!validatedConfig.extras.scriptDataOpts;
69048
- validatedConfig.extras.shadowDomShim = !!validatedConfig.extras.shadowDomShim;
69068
+ // TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
69069
+ validatedConfig.extras.__deprecated__shadowDomShim = !!validatedConfig.extras.__deprecated__shadowDomShim;
69049
69070
  validatedConfig.extras.slotChildNodesFix = !!validatedConfig.extras.slotChildNodesFix;
69050
69071
  validatedConfig.extras.initializeNextTick = !!validatedConfig.extras.initializeNextTick;
69051
69072
  validatedConfig.extras.tagNameTransform = !!validatedConfig.extras.tagNameTransform;
@@ -69956,7 +69977,7 @@ const getComponentPathContent = (componentGraph, outputTarget) => {
69956
69977
  const dependencies = [
69957
69978
  {
69958
69979
  name: "@stencil/core",
69959
- version: "3.0.0-alpha.2",
69980
+ version: "3.0.0-beta.0",
69960
69981
  main: "compiler/stencil.js",
69961
69982
  resources: [
69962
69983
  "package.json",