@stencil/core 2.13.0 → 2.14.2

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.
Files changed (58) hide show
  1. package/bin/stencil +8 -1
  2. package/cli/index.cjs +15 -6
  3. package/cli/index.js +15 -6
  4. package/cli/package.json +1 -1
  5. package/compiler/lib.dom.d.ts +2855 -4909
  6. package/compiler/lib.dom.iterable.d.ts +42 -66
  7. package/compiler/lib.es2015.core.d.ts +60 -18
  8. package/compiler/lib.es2015.iterable.d.ts +3 -11
  9. package/compiler/lib.es2015.promise.d.ts +2 -74
  10. package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
  11. package/compiler/lib.es2018.intl.d.ts +23 -11
  12. package/compiler/lib.es2019.string.d.ts +8 -2
  13. package/compiler/lib.es2020.bigint.d.ts +2 -2
  14. package/compiler/lib.es2020.intl.d.ts +173 -114
  15. package/compiler/lib.es2020.promise.d.ts +2 -3
  16. package/compiler/lib.es2021.d.ts +1 -0
  17. package/compiler/lib.es2021.intl.d.ts +44 -0
  18. package/compiler/lib.es2021.promise.d.ts +8 -1
  19. package/compiler/lib.es5.d.ts +112 -52
  20. package/compiler/lib.esnext.intl.d.ts +1 -10
  21. package/compiler/lib.webworker.d.ts +1013 -1267
  22. package/compiler/lib.webworker.iterable.d.ts +28 -34
  23. package/compiler/package.json +1 -1
  24. package/compiler/stencil.js +395 -78
  25. package/compiler/stencil.min.js +2 -2
  26. package/dependencies.json +2 -1
  27. package/dev-server/client/index.js +1 -1
  28. package/dev-server/client/package.json +1 -1
  29. package/dev-server/connector.html +3 -3
  30. package/dev-server/index.js +1 -1
  31. package/dev-server/package.json +1 -1
  32. package/dev-server/server-process.js +16 -5
  33. package/internal/app-data/package.json +1 -1
  34. package/internal/client/css-shim.js +2 -2
  35. package/internal/client/dom.js +1 -1
  36. package/internal/client/index.js +28 -2
  37. package/internal/client/package.json +1 -1
  38. package/internal/client/patch-browser.js +5 -1
  39. package/internal/client/patch-esm.js +1 -1
  40. package/internal/client/polyfills/css-shim.js +1 -1
  41. package/internal/client/shadow-css.js +1 -1
  42. package/internal/hydrate/index.js +3 -1
  43. package/internal/hydrate/package.json +1 -1
  44. package/internal/hydrate/runner.js +1 -1
  45. package/internal/package.json +1 -1
  46. package/internal/testing/index.js +3 -1
  47. package/internal/testing/package.json +1 -1
  48. package/mock-doc/index.cjs +14 -2
  49. package/mock-doc/index.d.ts +3 -3
  50. package/mock-doc/index.js +14 -2
  51. package/mock-doc/package.json +1 -1
  52. package/package.json +4 -4
  53. package/screenshot/package.json +1 -1
  54. package/sys/node/index.js +6 -3
  55. package/sys/node/package.json +1 -1
  56. package/sys/node/worker.js +1 -1
  57. package/testing/index.js +18 -19
  58. package/testing/package.json +1 -1
package/bin/stencil CHANGED
@@ -2,6 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var minimumVersion = '12.10';
5
+ var futureDeprecationMinVersion = '14.0';
5
6
  var recommendedVersion = '14.5';
6
7
  var currentVersion = process.versions.node;
7
8
 
@@ -22,7 +23,13 @@ if (isNodeLT(minimumVersion)) {
22
23
  process.exit(1);
23
24
  }
24
25
 
25
- if (isNodeLT(recommendedVersion)) {
26
+ if (isNodeLT(futureDeprecationMinVersion)) {
27
+ console.warn(
28
+ '\nIn an upcoming major release of Stencil, Node v' +
29
+ recommendedVersion +
30
+ '.0 or higher will be required.\n'
31
+ );
32
+ } else if (isNodeLT(recommendedVersion)) {
26
33
  console.warn(
27
34
  '\nYour current version of Node is v' +
28
35
  currentVersion +
package/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI (CommonJS) v2.13.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v2.14.2 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  'use strict';
5
5
 
@@ -58,6 +58,13 @@ const buildError = (diagnostics) => {
58
58
  }
59
59
  return diagnostic;
60
60
  };
61
+ /**
62
+ * Builds a diagnostic from an `Error`, appends it to the `diagnostics` parameter, and returns the created diagnostic
63
+ * @param diagnostics the series of diagnostics the newly created diagnostics should be added to
64
+ * @param err the error to derive information from in generating the diagnostic
65
+ * @param msg an optional message to use in place of `err` to generate the diagnostic
66
+ * @returns the generated diagnostic
67
+ */
61
68
  const catchError = (diagnostics, err, msg) => {
62
69
  const diagnostic = {
63
70
  level: 'error',
@@ -69,7 +76,7 @@ const catchError = (diagnostics, err, msg) => {
69
76
  lines: [],
70
77
  };
71
78
  if (isString(msg)) {
72
- diagnostic.messageText = msg;
79
+ diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';
73
80
  }
74
81
  else if (err != null) {
75
82
  if (err.stack != null) {
@@ -77,7 +84,7 @@ const catchError = (diagnostics, err, msg) => {
77
84
  }
78
85
  else {
79
86
  if (err.message != null) {
80
- diagnostic.messageText = err.message.toString();
87
+ diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
81
88
  }
82
89
  else {
83
90
  diagnostic.messageText = err.toString();
@@ -506,7 +513,7 @@ const getNpmConfigEnvArgs = (sys) => {
506
513
  const dependencies = [
507
514
  {
508
515
  name: "@stencil/core",
509
- version: "2.13.0",
516
+ version: "2.14.2",
510
517
  main: "compiler/stencil.js",
511
518
  resources: [
512
519
  "package.json",
@@ -556,6 +563,7 @@ const dependencies = [
556
563
  "compiler/lib.es2020.symbol.wellknown.d.ts",
557
564
  "compiler/lib.es2021.d.ts",
558
565
  "compiler/lib.es2021.full.d.ts",
566
+ "compiler/lib.es2021.intl.d.ts",
559
567
  "compiler/lib.es2021.promise.d.ts",
560
568
  "compiler/lib.es2021.string.d.ts",
561
569
  "compiler/lib.es2021.weakref.d.ts",
@@ -608,7 +616,7 @@ const dependencies = [
608
616
  },
609
617
  {
610
618
  name: "typescript",
611
- version: "4.3.5",
619
+ version: "4.5.4",
612
620
  main: "lib/typescript.js"
613
621
  }
614
622
  ];
@@ -1685,7 +1693,8 @@ const run = async (init) => {
1685
1693
  }
1686
1694
  catch (e) {
1687
1695
  if (!shouldIgnoreError(e)) {
1688
- logger.error(`uncaught cli error: ${e}${logger.getLevel() === 'debug' ? e.stack : ''}`);
1696
+ const details = `${logger.getLevel() === 'debug' && e instanceof Error ? e.stack : ''}`;
1697
+ logger.error(`uncaught cli error: ${e}${details}`);
1689
1698
  return sys.exit(1);
1690
1699
  }
1691
1700
  }
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v2.13.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v2.14.2 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const toLowerCase = (str) => str.toLowerCase();
5
5
  const dashToPascalCase = (str) => toLowerCase(str)
@@ -34,6 +34,13 @@ const buildError = (diagnostics) => {
34
34
  }
35
35
  return diagnostic;
36
36
  };
37
+ /**
38
+ * Builds a diagnostic from an `Error`, appends it to the `diagnostics` parameter, and returns the created diagnostic
39
+ * @param diagnostics the series of diagnostics the newly created diagnostics should be added to
40
+ * @param err the error to derive information from in generating the diagnostic
41
+ * @param msg an optional message to use in place of `err` to generate the diagnostic
42
+ * @returns the generated diagnostic
43
+ */
37
44
  const catchError = (diagnostics, err, msg) => {
38
45
  const diagnostic = {
39
46
  level: 'error',
@@ -45,7 +52,7 @@ const catchError = (diagnostics, err, msg) => {
45
52
  lines: [],
46
53
  };
47
54
  if (isString(msg)) {
48
- diagnostic.messageText = msg;
55
+ diagnostic.messageText = msg.length ? msg : 'UNKNOWN ERROR';
49
56
  }
50
57
  else if (err != null) {
51
58
  if (err.stack != null) {
@@ -53,7 +60,7 @@ const catchError = (diagnostics, err, msg) => {
53
60
  }
54
61
  else {
55
62
  if (err.message != null) {
56
- diagnostic.messageText = err.message.toString();
63
+ diagnostic.messageText = err.message.length ? err.message : 'UNKNOWN ERROR';
57
64
  }
58
65
  else {
59
66
  diagnostic.messageText = err.toString();
@@ -482,7 +489,7 @@ const getNpmConfigEnvArgs = (sys) => {
482
489
  const dependencies = [
483
490
  {
484
491
  name: "@stencil/core",
485
- version: "2.13.0",
492
+ version: "2.14.2",
486
493
  main: "compiler/stencil.js",
487
494
  resources: [
488
495
  "package.json",
@@ -532,6 +539,7 @@ const dependencies = [
532
539
  "compiler/lib.es2020.symbol.wellknown.d.ts",
533
540
  "compiler/lib.es2021.d.ts",
534
541
  "compiler/lib.es2021.full.d.ts",
542
+ "compiler/lib.es2021.intl.d.ts",
535
543
  "compiler/lib.es2021.promise.d.ts",
536
544
  "compiler/lib.es2021.string.d.ts",
537
545
  "compiler/lib.es2021.weakref.d.ts",
@@ -584,7 +592,7 @@ const dependencies = [
584
592
  },
585
593
  {
586
594
  name: "typescript",
587
- version: "4.3.5",
595
+ version: "4.5.4",
588
596
  main: "lib/typescript.js"
589
597
  }
590
598
  ];
@@ -1661,7 +1669,8 @@ const run = async (init) => {
1661
1669
  }
1662
1670
  catch (e) {
1663
1671
  if (!shouldIgnoreError(e)) {
1664
- logger.error(`uncaught cli error: ${e}${logger.getLevel() === 'debug' ? e.stack : ''}`);
1672
+ const details = `${logger.getLevel() === 'debug' && e instanceof Error ? e.stack : ''}`;
1673
+ logger.error(`uncaught cli error: ${e}${details}`);
1665
1674
  return sys.exit(1);
1666
1675
  }
1667
1676
  }
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/cli",
3
- "version": "2.13.0",
3
+ "version": "2.14.2",
4
4
  "description": "Stencil CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",