@stencil/core 2.9.0 → 2.12.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.
Files changed (70) hide show
  1. package/cli/index.cjs +16 -5
  2. package/cli/index.js +16 -5
  3. package/cli/package.json +1 -1
  4. package/compiler/lib.dom.d.ts +263 -648
  5. package/compiler/lib.dom.iterable.d.ts +1 -5
  6. package/compiler/lib.es2015.core.d.ts +2 -2
  7. package/compiler/lib.es2015.iterable.d.ts +1 -1
  8. package/compiler/lib.es2015.symbol.wellknown.d.ts +10 -10
  9. package/compiler/lib.es2018.asynciterable.d.ts +1 -1
  10. package/compiler/lib.es2020.bigint.d.ts +1 -1
  11. package/compiler/lib.es2020.intl.d.ts +6 -7
  12. package/compiler/lib.es2020.symbol.wellknown.d.ts +1 -1
  13. package/compiler/lib.es2021.d.ts +24 -0
  14. package/compiler/lib.es2021.full.d.ts +25 -0
  15. package/compiler/lib.es2021.promise.d.ts +43 -0
  16. package/compiler/lib.es2021.string.d.ts +35 -0
  17. package/compiler/lib.es2021.weakref.d.ts +75 -0
  18. package/compiler/lib.es5.d.ts +9 -9
  19. package/compiler/lib.esnext.d.ts +1 -4
  20. package/compiler/lib.esnext.promise.d.ts +26 -26
  21. package/compiler/lib.esnext.string.d.ts +18 -18
  22. package/compiler/lib.esnext.weakref.d.ts +58 -58
  23. package/compiler/lib.webworker.d.ts +98 -153
  24. package/compiler/lib.webworker.iterable.d.ts +1 -1
  25. package/compiler/package.json +1 -1
  26. package/compiler/stencil.js +497 -725
  27. package/compiler/stencil.min.js +2 -2
  28. package/dependencies.json +6 -1
  29. package/dev-server/client/index.js +1 -1
  30. package/dev-server/client/package.json +1 -1
  31. package/dev-server/connector.html +2 -2
  32. package/dev-server/index.js +1 -1
  33. package/dev-server/package.json +1 -1
  34. package/dev-server/server-process.js +2 -2
  35. package/internal/app-data/package.json +1 -1
  36. package/internal/client/css-shim.js +1 -1
  37. package/internal/client/dom.js +1 -1
  38. package/internal/client/index.js +119 -102
  39. package/internal/client/package.json +1 -1
  40. package/internal/client/patch-browser.js +1 -1
  41. package/internal/client/patch-esm.js +1 -1
  42. package/internal/client/shadow-css.js +9 -10
  43. package/internal/hydrate/index.js +44 -40
  44. package/internal/hydrate/package.json +1 -1
  45. package/internal/hydrate/shadow-css.js +59 -62
  46. package/internal/index.js +1 -0
  47. package/internal/package.json +1 -1
  48. package/internal/stencil-public-compiler.d.ts +1 -1
  49. package/internal/testing/index.js +54 -47
  50. package/internal/testing/package.json +1 -1
  51. package/internal/testing/shadow-css.js +54 -57
  52. package/mock-doc/index.cjs +5 -2
  53. package/mock-doc/index.d.ts +6 -6
  54. package/mock-doc/index.js +5 -2
  55. package/mock-doc/package.json +1 -1
  56. package/package.json +17 -9
  57. package/screenshot/index.js +1 -1
  58. package/screenshot/package.json +1 -1
  59. package/sys/node/autoprefixer.js +2 -2
  60. package/sys/node/index.js +1 -1
  61. package/sys/node/package.json +1 -1
  62. package/sys/node/worker.js +1 -1
  63. package/testing/index.js +84 -73
  64. package/testing/jest/jest-environment.d.ts +1 -0
  65. package/testing/jest/jest-preprocessor.d.ts +56 -8
  66. package/testing/jest-preset.js +5 -0
  67. package/testing/mocks.d.ts +1 -5
  68. package/testing/package.json +1 -1
  69. package/testing/testing-sys.d.ts +6 -1
  70. package/screenshot/index.js.map +0 -1
@@ -400,17 +400,17 @@ declare class MockNode {
400
400
  prepend(...items: (MockNode | string)[]): void;
401
401
  cloneNode(deep?: boolean): MockNode;
402
402
  compareDocumentPosition(_other: MockNode): number;
403
- get firstChild(): MockNode;
403
+ get firstChild(): MockNode | null;
404
404
  insertBefore(newNode: MockNode, referenceNode: MockNode): MockNode;
405
405
  get isConnected(): boolean;
406
406
  isSameNode(node: any): boolean;
407
- get lastChild(): MockNode;
408
- get nextSibling(): MockNode;
407
+ get lastChild(): MockNode | null;
408
+ get nextSibling(): MockNode | null;
409
409
  get nodeValue(): string;
410
410
  set nodeValue(value: string);
411
411
  get parentElement(): any;
412
412
  set parentElement(value: any);
413
- get previousSibling(): MockNode;
413
+ get previousSibling(): MockNode | null;
414
414
  contains(otherNode: MockNode): boolean;
415
415
  removeChild(childNode: MockNode): MockNode;
416
416
  remove(): void;
@@ -452,7 +452,7 @@ declare class MockElement extends MockNode {
452
452
  get dir(): string;
453
453
  set dir(value: string);
454
454
  dispatchEvent(ev: MockEvent): boolean;
455
- get firstElementChild(): MockElement;
455
+ get firstElementChild(): MockElement | null;
456
456
  getAttribute(attrName: string): any;
457
457
  getAttributeNS(namespaceURI: string, attrName: string): string;
458
458
  getBoundingClientRect(): {
@@ -487,7 +487,7 @@ declare class MockElement extends MockNode {
487
487
  set hidden(isHidden: boolean);
488
488
  get lang(): string;
489
489
  set lang(value: string);
490
- get lastElementChild(): MockElement;
490
+ get lastElementChild(): MockElement | null;
491
491
  matches(selector: string): boolean;
492
492
  get nextElementSibling(): any;
493
493
  get outerHTML(): string;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v2.9.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v2.12.0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -544,7 +544,7 @@ class MockCSSStyleDeclaration {
544
544
  const splt = rule.split(':');
545
545
  if (splt.length > 1) {
546
546
  const prop = splt[0].trim();
547
- const value = splt[1].trim();
547
+ const value = splt.slice(1).join(':').trim();
548
548
  if (prop !== '' && value !== '') {
549
549
  this._styles.set(jsCaseToCssCase(prop), value);
550
550
  }
@@ -1507,6 +1507,9 @@ class MockNode {
1507
1507
  return null;
1508
1508
  }
1509
1509
  contains(otherNode) {
1510
+ if (otherNode === this) {
1511
+ return true;
1512
+ }
1510
1513
  return this.childNodes.includes(otherNode);
1511
1514
  }
1512
1515
  removeChild(childNode) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "2.9.0",
3
+ "version": "2.12.0",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core",
3
- "version": "2.9.0",
3
+ "version": "2.12.0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -9,6 +9,7 @@
9
9
  "stencil": "bin/stencil"
10
10
  },
11
11
  "files": [
12
+ "!**/*.map",
12
13
  "bin/",
13
14
  "cli/",
14
15
  "compiler/",
@@ -21,9 +22,10 @@
21
22
  "testing/"
22
23
  ],
23
24
  "scripts": {
25
+ "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
26
+ "clean-scripts": "rm -rf scripts/build",
24
27
  "start": "npm run watch",
25
- "build": "node scripts && npm run tsc.prod && npm run rollup.prod.ci",
26
- "build.prod": "node scripts && npm run tsc.scripts && npm run tsc.prod && npm run rollup.prod.ci",
28
+ "build": "node scripts --prepare && npm run tsc.prod && npm run rollup.prod.ci",
27
29
  "watch": "node scripts && npm run tsc && concurrently \"npm run rollup.watch\" \"npm run tsc.watch\"",
28
30
  "release": "node scripts --release --publish",
29
31
  "release.prepare": "node scripts --release --prepare",
@@ -42,7 +44,8 @@
42
44
  "test": "jest --coverage",
43
45
  "test.analysis": "cd test && npm run build",
44
46
  "test.dist": "node scripts --validate-build",
45
- "test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
47
+ "//": "TODO(STENCIL-71): Add 'npm test &&' to the 'test.end-to-end' test",
48
+ "test.end-to-end": "cd test/end-to-end && npm ci && npm run test.dist",
46
49
  "test.jest": "jest",
47
50
  "test.karma": "cd test/karma && npm ci && npm run karma",
48
51
  "test.karma.prod": "cd test/karma && npm ci && npm run karma.prod",
@@ -96,9 +99,9 @@
96
99
  "graceful-fs": "~4.2.6",
97
100
  "hash.js": "^1.1.7",
98
101
  "inquirer": "^7.3.3",
99
- "jest": "^26.6.3",
100
- "jest-cli": "^26.6.3",
101
- "jest-environment-node": "^26.6.2",
102
+ "jest": "^27.4.3",
103
+ "jest-cli": "^27.4.3",
104
+ "jest-environment-node": "^27.4.2",
102
105
  "listr": "^0.14.3",
103
106
  "magic-string": "^0.25.7",
104
107
  "merge-source-map": "^1.1.0",
@@ -115,12 +118,13 @@
115
118
  "prompts": "2.4.0",
116
119
  "puppeteer": "~10.0.0",
117
120
  "rollup": "2.42.3",
121
+ "rollup-plugin-sourcemaps": "^0.6.3",
118
122
  "semiver": "^1.1.0",
119
123
  "semver": "7.3.4",
120
124
  "sizzle": "^2.3.6",
121
125
  "terser": "5.6.1",
122
126
  "tslib": "^2.1.0",
123
- "typescript": "4.2.3",
127
+ "typescript": "4.3.5",
124
128
  "webpack": "^4.46.0",
125
129
  "ws": "7.4.6"
126
130
  },
@@ -145,5 +149,9 @@
145
149
  "pwa",
146
150
  "progressive web app"
147
151
  ],
148
- "prettier": "@ionic/prettier-config"
152
+ "prettier": "@ionic/prettier-config",
153
+ "volta": {
154
+ "node": "16.13.0",
155
+ "npm": "8.1.1"
156
+ }
149
157
  }
@@ -636,7 +636,7 @@ function createLocalCompareApp(namespace, appSrcUrl, imagesUrl, jsonpUrl, a, b)
636
636
  <meta http-equiv="x-ua-compatible" content="IE=Edge">
637
637
  <link href="${appSrcUrl}/build/app.css" rel="stylesheet">
638
638
  <script type="module" src="${appSrcUrl}/build/app.esm.js"></script>
639
- <script nomodule src="${appSrcUrl}/build/app.js"></script>
639
+ <script nomodule src="${appSrcUrl}/build/app.js"></script>
640
640
  <link rel="icon" type="image/x-icon" href="${appSrcUrl}/assets/favicon.ico">
641
641
  </head>
642
642
  <body>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "2.9.0",
3
+ "version": "2.12.0",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",