@stencil/core 4.18.2 → 4.18.3

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 (40) hide show
  1. package/cli/index.cjs +27 -12
  2. package/cli/index.js +27 -12
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +828 -662
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +52 -40
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/client/index.js +34 -16
  14. package/internal/client/package.json +1 -1
  15. package/internal/client/patch-browser.js +1 -1
  16. package/internal/hydrate/index.js +32 -16
  17. package/internal/hydrate/package.json +1 -1
  18. package/internal/hydrate/runner.js +66 -58
  19. package/internal/package.json +1 -1
  20. package/internal/stencil-private.d.ts +3 -3
  21. package/internal/stencil-public-compiler.d.ts +3 -3
  22. package/internal/testing/index.js +31 -15
  23. package/internal/testing/package.json +1 -1
  24. package/mock-doc/index.cjs +66 -58
  25. package/mock-doc/index.d.ts +36 -30
  26. package/mock-doc/index.js +66 -58
  27. package/mock-doc/package.json +1 -1
  28. package/package.json +14 -17
  29. package/screenshot/index.js +1 -1
  30. package/screenshot/package.json +1 -1
  31. package/screenshot/pixel-match.js +4 -1
  32. package/sys/node/autoprefixer.js +2 -2
  33. package/sys/node/glob.js +1 -1
  34. package/sys/node/index.js +2 -2
  35. package/sys/node/node-fetch.js +10 -2
  36. package/sys/node/package.json +1 -1
  37. package/sys/node/worker.js +1 -1
  38. package/testing/index.js +6 -3
  39. package/testing/mock-fetch.d.ts +4 -4
  40. package/testing/package.json +1 -1
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil Mock Doc v4.18.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Mock Doc v4.18.3 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -8149,67 +8149,75 @@ var MockUListElement = class extends MockHTMLElement {
8149
8149
  super(ownerDocument, "ul");
8150
8150
  }
8151
8151
  };
8152
+ var CanvasRenderingContext = class {
8153
+ constructor(context, contextAttributes) {
8154
+ this.context = context;
8155
+ this.contextAttributes = contextAttributes;
8156
+ }
8157
+ fillRect() {
8158
+ return;
8159
+ }
8160
+ clearRect() {
8161
+ }
8162
+ getImageData(_, __, w, h) {
8163
+ return {
8164
+ data: new Array(w * h * 4)
8165
+ };
8166
+ }
8167
+ toDataURL() {
8168
+ return "data:,";
8169
+ }
8170
+ putImageData() {
8171
+ }
8172
+ createImageData() {
8173
+ return {};
8174
+ }
8175
+ setTransform() {
8176
+ }
8177
+ drawImage() {
8178
+ }
8179
+ save() {
8180
+ }
8181
+ fillText() {
8182
+ }
8183
+ restore() {
8184
+ }
8185
+ beginPath() {
8186
+ }
8187
+ moveTo() {
8188
+ }
8189
+ lineTo() {
8190
+ }
8191
+ closePath() {
8192
+ }
8193
+ stroke() {
8194
+ }
8195
+ translate() {
8196
+ }
8197
+ scale() {
8198
+ }
8199
+ rotate() {
8200
+ }
8201
+ arc() {
8202
+ }
8203
+ fill() {
8204
+ }
8205
+ measureText() {
8206
+ return { width: 0 };
8207
+ }
8208
+ transform() {
8209
+ }
8210
+ rect() {
8211
+ }
8212
+ clip() {
8213
+ }
8214
+ };
8152
8215
  var MockCanvasElement = class extends MockHTMLElement {
8153
8216
  constructor(ownerDocument) {
8154
8217
  super(ownerDocument, "canvas");
8155
8218
  }
8156
- getContext() {
8157
- return {
8158
- fillRect() {
8159
- return;
8160
- },
8161
- clearRect() {
8162
- },
8163
- getImageData: function(_, __, w, h) {
8164
- return {
8165
- data: new Array(w * h * 4)
8166
- };
8167
- },
8168
- putImageData() {
8169
- },
8170
- createImageData: function() {
8171
- return [];
8172
- },
8173
- setTransform() {
8174
- },
8175
- drawImage() {
8176
- },
8177
- save() {
8178
- },
8179
- fillText() {
8180
- },
8181
- restore() {
8182
- },
8183
- beginPath() {
8184
- },
8185
- moveTo() {
8186
- },
8187
- lineTo() {
8188
- },
8189
- closePath() {
8190
- },
8191
- stroke() {
8192
- },
8193
- translate() {
8194
- },
8195
- scale() {
8196
- },
8197
- rotate() {
8198
- },
8199
- arc() {
8200
- },
8201
- fill() {
8202
- },
8203
- measureText() {
8204
- return { width: 0 };
8205
- },
8206
- transform() {
8207
- },
8208
- rect() {
8209
- },
8210
- clip() {
8211
- }
8212
- };
8219
+ getContext(context, contextAttributes) {
8220
+ return new CanvasRenderingContext(context, contextAttributes);
8213
8221
  }
8214
8222
  };
8215
8223
  function fullUrl(elm, attrName) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/mock-doc",
3
- "version": "4.18.2",
3
+ "version": "4.18.3",
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": "4.18.2",
3
+ "version": "4.18.3",
4
4
  "license": "MIT",
5
5
  "main": "./internal/stencil-core/index.cjs",
6
6
  "module": "./internal/stencil-core/index.js",
@@ -23,28 +23,26 @@
23
23
  "testing/"
24
24
  ],
25
25
  "scripts": {
26
- "build": "npm run clean && npm run tsc.scripts && npm run tsc.prod && node scripts/build --prod --ci",
26
+ "build": "npm run clean && npm run tsc.prod && npm run ts scripts/index.ts -- --prod --ci",
27
27
  "build.watch": "npm run build -- --watch",
28
- "build.updateSelectorEngine": "node scripts/build/updateSelectorEngine.js",
29
- "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean.scripts && npm run clean.screenshots",
30
- "clean.scripts": "rm -rf scripts/build",
28
+ "build.updateSelectorEngine": "npm run ts scripts/updateSelectorEngine.ts",
29
+ "clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean:scripts && npm run clean.screenshots",
31
30
  "clean.screenshots": "rm -rf test/end-to-end/screenshot/builds test/end-to-end/screenshot/images",
31
+ "clean:scripts": "rm -rf scripts/build",
32
32
  "lint": "eslint 'bin/*' 'scripts/*.ts' 'scripts/**/*.ts' 'src/*.ts' 'src/**/*.ts' 'src/**/*.tsx' 'test/wdio/**/*.tsx'",
33
33
  "install.jest": "bash ./src/testing/jest/install-dependencies.sh",
34
34
  "prettier": "npm run prettier.base -- --write",
35
35
  "prettier.base": "prettier --cache \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil|.github/(**/)?*.(yml|yaml)|*.js\"",
36
36
  "prettier.dry-run": "npm run prettier.base -- --list-different",
37
- "release.ci.prepare": "npm run tsc.scripts && node scripts/build --release --ci-prepare",
38
- "release.ci": "npm run tsc.scripts && NODE_OPTIONS=--max-old-space-size=4096 node scripts/build --release --ci-publish",
39
- "rollup.prod.ci": "rollup --config --config-prod --config-ci",
40
- "rollup.watch": "rollup --watch --config",
37
+ "release.ci.prepare": "npm run ts scripts/index.ts -- --release --ci-prepare",
38
+ "release.ci": "NODE_OPTIONS=--max-old-space-size=4096 npm run ts scripts/index.ts -- --release --ci-publish",
41
39
  "spellcheck": "npm run spellcheck.code && npm run spellcheck.markdown",
42
40
  "spellcheck.code": "cspell --config cspell-code.json --no-progress \"src/**/*.ts\" \"src/**/*.tsx\" \"scripts/**/*.ts\"",
43
41
  "spellcheck.markdown": "cspell --config cspell-markdown.json --no-progress \"*.md\" \"**/*.md\"",
44
42
  "test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --coverage",
45
43
  "test.analysis": "cd test && npm run analysis.build-and-analyze",
46
44
  "test.bundlers": "cd test && npm run bundlers",
47
- "test.dist": "node scripts/build --validate-build",
45
+ "test.dist": "npm run ts scripts/index.ts -- --validate-build",
48
46
  "test.end-to-end": "cd test/end-to-end && npm ci && npm test && npm run test.dist",
49
47
  "test.jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
50
48
  "test.wdio": "cd test/wdio && npm ci && npm run test",
@@ -54,10 +52,8 @@
54
52
  "test.docs-build": "cd test && npm run build.docs-json && npm run build.docs-readme",
55
53
  "test.watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
56
54
  "test.watch-all": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watchAll --coverage",
57
- "tsc": "tsc --incremental",
58
55
  "tsc.prod": "tsc",
59
- "tsc.scripts": "tsc --build --force scripts/tsconfig.json",
60
- "tsc.watch": "tsc --incremental --watch"
56
+ "ts": "tsc --noEmit --project scripts/tsconfig.json && tsx"
61
57
  },
62
58
  "devDependencies": {
63
59
  "@ionic/prettier-config": "^4.0.0",
@@ -84,7 +80,7 @@
84
80
  "@yarnpkg/lockfile": "^1.1.0",
85
81
  "ansi-colors": "4.1.3",
86
82
  "autoprefixer": "10.4.19",
87
- "conventional-changelog-cli": "^4.0.0",
83
+ "conventional-changelog-cli": "^5.0.0",
88
84
  "cspell": "^8.0.0",
89
85
  "dts-bundle-generator": "~9.5.0",
90
86
  "esbuild": "^0.21.0",
@@ -98,7 +94,7 @@
98
94
  "execa": "8.0.1",
99
95
  "exit": "^0.1.2",
100
96
  "fs-extra": "^11.0.0",
101
- "glob": "10.3.15",
97
+ "glob": "10.4.1",
102
98
  "graceful-fs": "~4.2.6",
103
99
  "jest": "^27.4.5",
104
100
  "jest-cli": "^27.4.5",
@@ -121,6 +117,7 @@
121
117
  "rollup": "2.56.3",
122
118
  "semver": "^7.3.7",
123
119
  "terser": "5.31.0",
120
+ "tsx": "^4.10.3",
124
121
  "typescript": "~5.4.0",
125
122
  "webpack": "^5.75.0",
126
123
  "ws": "8.17.0"
@@ -148,7 +145,7 @@
148
145
  ],
149
146
  "prettier": "@ionic/prettier-config",
150
147
  "volta": {
151
- "node": "22.1.0",
152
- "npm": "10.7.0"
148
+ "node": "22.2.0",
149
+ "npm": "10.8.0"
153
150
  }
154
151
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot v4.18.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot v4.18.3 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/screenshot",
3
- "version": "4.18.2",
3
+ "version": "4.18.3",
4
4
  "description": "Stencil Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Stencil Screenshot Pixel Match v4.18.2 | MIT Licensed | https://stenciljs.com
2
+ Stencil Screenshot Pixel Match v4.18.3 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -2306,6 +2306,9 @@ function getMismatchedPixels(pixelMatchInput) {
2306
2306
  threshold: pixelMatchInput.pixelmatchThreshold,
2307
2307
  includeAA: false
2308
2308
  });
2309
+ if (typeof process.send !== "function") {
2310
+ throw new Error("`getMismatchedPixels` must be run in a child process.");
2311
+ }
2309
2312
  process.send(mismatchedPixels);
2310
2313
  }
2311
2314
  }