@stencil/core 2.15.1 → 2.16.1-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 (50) hide show
  1. package/cli/index.cjs +115 -27
  2. package/cli/index.js +115 -27
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +821 -291
  6. package/compiler/stencil.min.js +2 -2
  7. package/dependencies.json +1 -1
  8. package/dev-server/client/index.js +1 -1
  9. package/dev-server/client/package.json +1 -1
  10. package/dev-server/client/test/hmr-util.spec.d.ts +1 -0
  11. package/dev-server/client/test/status.spec.d.ts +1 -0
  12. package/dev-server/connector.html +3 -3
  13. package/dev-server/index.js +1 -1
  14. package/dev-server/package.json +1 -1
  15. package/dev-server/server-process.js +5 -3
  16. package/internal/app-data/package.json +1 -1
  17. package/internal/client/css-shim.js +1 -1
  18. package/internal/client/dom.js +1 -1
  19. package/internal/client/index.js +11 -9
  20. package/internal/client/package.json +1 -1
  21. package/internal/client/patch-browser.js +1 -1
  22. package/internal/client/patch-esm.js +1 -1
  23. package/internal/client/shadow-css.js +2 -3
  24. package/internal/hydrate/index.js +37 -32
  25. package/internal/hydrate/package.json +1 -1
  26. package/internal/hydrate/shadow-css.js +9 -9
  27. package/internal/package.json +1 -1
  28. package/internal/stencil-private.d.ts +39 -3
  29. package/internal/stencil-public-compiler.d.ts +70 -3
  30. package/internal/stencil-public-docs.d.ts +3 -0
  31. package/internal/testing/index.js +35 -30
  32. package/internal/testing/package.json +1 -1
  33. package/internal/testing/shadow-css.js +9 -9
  34. package/mock-doc/index.cjs +8 -2
  35. package/mock-doc/index.d.ts +9 -2
  36. package/mock-doc/index.js +8 -2
  37. package/mock-doc/package.json +1 -1
  38. package/package.json +22 -16
  39. package/screenshot/index.js +2 -0
  40. package/screenshot/package.json +1 -1
  41. package/sys/node/autoprefixer.js +1 -1
  42. package/sys/node/index.js +2038 -1330
  43. package/sys/node/package.json +1 -1
  44. package/sys/node/worker.js +1 -1
  45. package/testing/index.js +335 -331
  46. package/testing/jest/test/jest-config.spec.d.ts +1 -0
  47. package/testing/jest/test/jest-preprocessor.spec.d.ts +1 -0
  48. package/testing/jest/test/jest-runner.spec.d.ts +1 -0
  49. package/testing/jest/test/jest-serializer.spec.d.ts +1 -0
  50. package/testing/package.json +1 -1
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v2.15.1 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v2.16.1-0 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  const CONTENT_REF_ID = 'r';
5
5
  const ORG_LOCATION_ID = 'o';
@@ -1525,7 +1525,11 @@ class MockNode {
1525
1525
  if (otherNode === this) {
1526
1526
  return true;
1527
1527
  }
1528
- return this.childNodes.includes(otherNode);
1528
+ const childNodes = Array.from(this.childNodes);
1529
+ if (childNodes.includes(otherNode)) {
1530
+ return true;
1531
+ }
1532
+ return childNodes.some((node) => this.contains.bind(node)(otherNode));
1529
1533
  }
1530
1534
  removeChild(childNode) {
1531
1535
  const index = this.childNodes.indexOf(childNode);
@@ -4260,9 +4264,11 @@ function cloneDocument(srcDoc) {
4260
4264
  const dstWin = cloneWindow(srcDoc.defaultView);
4261
4265
  return dstWin.document;
4262
4266
  }
4267
+ // TODO(STENCIL-345) - Evaluate reconciling MockWindow, Window differences
4263
4268
  /**
4264
4269
  * Constrain setTimeout() to 1ms, but still async. Also
4265
4270
  * only allow setInterval() to fire once, also constrained to 1ms.
4271
+ * @param win the mock window instance to update
4266
4272
  */
4267
4273
  function constrainTimeouts(win) {
4268
4274
  win.__allowInterval = false;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "2.15.1",
3
+ "version": "2.16.1-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.15.1",
3
+ "version": "2.16.1-0",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -24,37 +24,38 @@
24
24
  "testing/"
25
25
  ],
26
26
  "scripts": {
27
+ "build": "node scripts --prepare && npm run tsc.prod && npm run rollup.prod.ci",
27
28
  "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean-scripts",
28
29
  "clean-scripts": "rm -rf scripts/build",
29
- "start": "npm run watch",
30
- "build": "node scripts --prepare && npm run tsc.prod && npm run rollup.prod.ci",
31
- "watch": "node scripts && npm run tsc && concurrently \"npm run rollup.watch\" \"npm run tsc.watch\"",
30
+ "license": "node scripts --license",
31
+ "lint": "eslint \"src/*.ts\" \"src/**/*.ts\" \"src/**/*.tsx\"",
32
+ "prettier": "npm run prettier.base -- --write",
33
+ "prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil\"",
34
+ "prettier.dry-run": "npm run prettier.base -- --list-different",
32
35
  "release": "node scripts --release --publish",
33
36
  "release.prepare": "node scripts --release --prepare",
34
- "tsc": "tsc --incremental",
35
- "tsc.prod": "tsc",
36
- "tsc.scripts": "tsc -p scripts/tsconfig.json",
37
- "tsc.watch": "tsc --incremental --watch",
38
37
  "rollup": "rollup --config",
39
38
  "rollup.prod": "rollup --config --config-prod",
40
39
  "rollup.prod.ci": "rollup --config --config-prod --config-ci",
41
40
  "rollup.watch": "rollup --watch --config",
42
- "license": "node scripts --license",
43
- "prettier": "npm run prettier.base -- --write",
44
- "prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil\"",
45
- "prettier.dry-run": "npm run prettier.base -- --list-different",
41
+ "start": "npm run watch",
46
42
  "test": "jest --coverage",
47
43
  "test.analysis": "cd test && npm run analysis.build-and-analyze",
44
+ "test.bundlers": "cd test && npm run bundlers",
48
45
  "test.dist": "node scripts --validate-build",
49
46
  "test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
50
47
  "test.jest": "jest",
51
48
  "test.karma": "cd test/karma && npm ci && npm run karma",
52
49
  "test.karma.prod": "cd test/karma && npm ci && npm run karma.prod",
53
- "test.testing": "node scripts/test/validate-testing.js",
54
- "test.sys.node": "echo test.sys.node",
55
50
  "test.prod": "npm run test.dist && npm run test.end-to-end && npm run test.jest && npm run test.karma && npm run test.sys.node && npm run test.testing && npm run test.analysis",
51
+ "test.testing": "node scripts/test/validate-testing.js",
56
52
  "test.watch": "jest --watch",
57
- "test.watch-all": "jest --watchAll --coverage"
53
+ "test.watch-all": "jest --watchAll --coverage",
54
+ "tsc": "tsc --incremental",
55
+ "tsc.prod": "tsc",
56
+ "tsc.scripts": "tsc -p scripts/tsconfig.json",
57
+ "tsc.watch": "tsc --incremental --watch",
58
+ "watch": "node scripts && npm run tsc && concurrently \"npm run rollup.watch\" \"npm run tsc.watch\""
58
59
  },
59
60
  "devDependencies": {
60
61
  "@ionic/prettier-config": "^2.0.0",
@@ -64,6 +65,7 @@
64
65
  "@rollup/plugin-replace": "2.3.4",
65
66
  "@rollup/pluginutils": "4.1.0",
66
67
  "@types/autoprefixer": "^10.2.0",
68
+ "@types/eslint": "^8.4.2",
67
69
  "@types/exit": "^0.1.31",
68
70
  "@types/fs-extra": "^9.0.8",
69
71
  "@types/glob": "^7.1.2",
@@ -84,6 +86,8 @@
84
86
  "@types/webpack": "^4.41.26",
85
87
  "@types/ws": "^7.4.0",
86
88
  "@types/yarnpkg__lockfile": "^1.1.5",
89
+ "@typescript-eslint/eslint-plugin": "^5.20.0",
90
+ "@typescript-eslint/parser": "^5.20.0",
87
91
  "@yarnpkg/lockfile": "^1.1.0",
88
92
  "ansi-colors": "4.1.1",
89
93
  "autoprefixer": "10.2.5",
@@ -92,6 +96,9 @@
92
96
  "core-js-builder": "~3.6.5",
93
97
  "css": "^3.0.0",
94
98
  "dts-bundle-generator": "~5.3.0",
99
+ "eslint": "^8.13.0",
100
+ "eslint-config-prettier": "^8.5.0",
101
+ "eslint-plugin-jsdoc": "^39.3.1",
95
102
  "execa": "4.1.0",
96
103
  "exit": "^0.1.2",
97
104
  "fast-deep-equal": "3.1.3",
@@ -120,7 +127,6 @@
120
127
  "puppeteer": "~10.0.0",
121
128
  "rollup": "2.42.3",
122
129
  "rollup-plugin-sourcemaps": "^0.6.3",
123
- "semiver": "^1.1.0",
124
130
  "semver": "7.3.4",
125
131
  "sizzle": "^2.3.6",
126
132
  "terser": "5.6.1",
@@ -437,6 +437,8 @@ class ScreenshotConnector {
437
437
  * Forward-slash paths can be used in Windows as long as they're not
438
438
  * extended-length paths and don't contain any non-ascii characters.
439
439
  * This was created since the path methods in Node.js outputs \\ paths on Windows.
440
+ * @param path the Windows-based path to convert
441
+ * @returns the converted path
440
442
  */
441
443
  const normalizePath = (path) => {
442
444
  if (typeof path !== 'string') {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "2.15.1",
3
+ "version": "2.16.1-0",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",