@stencil/core 4.43.2 → 4.43.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 (38) hide show
  1. package/cli/index.cjs +379 -154
  2. package/cli/index.js +379 -154
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +2276 -2065
  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 +346 -137
  12. package/internal/app-data/package.json +1 -1
  13. package/internal/app-globals/package.json +1 -1
  14. package/internal/client/index.js +1 -1
  15. package/internal/client/package.json +1 -1
  16. package/internal/client/patch-browser.js +1 -1
  17. package/internal/hydrate/index.js +423 -214
  18. package/internal/hydrate/package.json +1 -1
  19. package/internal/hydrate/runner.js +396 -189
  20. package/internal/package.json +1 -1
  21. package/internal/stencil-private.d.ts +1 -1
  22. package/internal/stencil-public-compiler.d.ts +61 -6
  23. package/internal/testing/index.js +410 -201
  24. package/internal/testing/package.json +1 -1
  25. package/mock-doc/index.cjs +2 -4
  26. package/mock-doc/index.d.ts +1 -1
  27. package/mock-doc/index.js +2 -4
  28. package/mock-doc/package.json +1 -1
  29. package/package.json +2 -2
  30. package/screenshot/index.js +341 -132
  31. package/screenshot/package.json +1 -1
  32. package/screenshot/pixel-match.js +1 -1
  33. package/sys/node/glob.js +1 -1
  34. package/sys/node/index.js +44 -46
  35. package/sys/node/package.json +1 -1
  36. package/sys/node/worker.js +1 -1
  37. package/testing/index.js +420 -211
  38. package/testing/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/core/internal",
3
- "version": "4.43.2",
3
+ "version": "4.43.3",
4
4
  "description": "Stencil internals only to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -142,7 +142,7 @@ export interface BuildConditionals extends Partial<BuildFeatures> {
142
142
  attachStyles?: boolean;
143
143
  experimentalSlotFixes?: boolean;
144
144
  experimentalScopedSlotChanges?: boolean;
145
- addGlobalStyleToComponents?: boolean;
145
+ addGlobalStyleToComponents?: boolean | 'client';
146
146
  }
147
147
  export type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
148
148
  export interface RollupResultModule {
@@ -258,6 +258,15 @@ export interface StencilConfig {
258
258
  docs?: StencilDocsConfig;
259
259
  globalScript?: string;
260
260
  srcIndexHtml?: string;
261
+ /**
262
+ * Configuration for Stencil's integrated testing (Jest + Puppeteer).
263
+ *
264
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
265
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
266
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
267
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
268
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
269
+ */
261
270
  testing?: TestingConfig;
262
271
  maxConcurrentWorkers?: number;
263
272
  preamble?: string;
@@ -381,15 +390,18 @@ interface ConfigExtrasBase {
381
390
  experimentalScopedSlotChanges?: boolean;
382
391
  /**
383
392
  * By default Stencil turns the stylesheet provided to `globalStyle` into a constructable stylesheet
384
- * and adds it to each component which can be useful for sharing styles efficiently across components.
385
- * In some cases this can be undesirable:
386
- * - If `globalStyle` is intended to configure the lightDOM only
387
- * - If `globalStyle` is large it can bloat the size of SSR output when using declarative-shadow-dom
393
+ * and adds it to each component when rendered on the client which can be useful for sharing styles
394
+ * efficiently across components.
395
+ *
396
+ * If you want Stencil to also add the `globalStyle` to each component when rendering on the server
397
+ * then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
398
+ * of your SSR output when using declarative-shadow-dom.
399
+ *
388
400
  * Setting this to `false` will prevent Stencil from adding any `globalStyle` to each component.
389
401
  *
390
- * Defaults to `true`.
402
+ * Defaults to `'client'`.
391
403
  */
392
- addGlobalStyleToComponents?: boolean;
404
+ addGlobalStyleToComponents?: boolean | 'client';
393
405
  }
394
406
  type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
395
407
  /**
@@ -1735,6 +1747,13 @@ export interface RollupOutputOptions {
1735
1747
  [name: string]: string;
1736
1748
  } | ((name: string) => string);
1737
1749
  }
1750
+ /**
1751
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
1752
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
1753
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
1754
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
1755
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
1756
+ */
1738
1757
  export interface Testing {
1739
1758
  run(opts: TestingRunOptions): Promise<boolean>;
1740
1759
  destroy(): Promise<void>;
@@ -1743,6 +1762,12 @@ export declare type Path = string;
1743
1762
  export declare type TransformerConfig = [string, Record<string, unknown>];
1744
1763
  /**
1745
1764
  * Options for initiating a run of Stencil tests (spec and/or end-to-end)
1765
+ *
1766
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
1767
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
1768
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
1769
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
1770
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
1746
1771
  */
1747
1772
  export interface TestingRunOptions {
1748
1773
  /**
@@ -1762,6 +1787,13 @@ export interface TestingRunOptions {
1762
1787
  */
1763
1788
  updateScreenshot?: boolean;
1764
1789
  }
1790
+ /**
1791
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
1792
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
1793
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
1794
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
1795
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
1796
+ */
1765
1797
  export interface JestConfig {
1766
1798
  /**
1767
1799
  * This option tells Jest that all imported modules in your tests should be mocked automatically.
@@ -1877,6 +1909,15 @@ export interface JestConfig {
1877
1909
  verbose?: boolean;
1878
1910
  watchPathIgnorePatterns?: any[];
1879
1911
  }
1912
+ /**
1913
+ * Configuration for Stencil's integrated testing (Jest + Puppeteer).
1914
+ *
1915
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
1916
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
1917
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
1918
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
1919
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
1920
+ */
1880
1921
  export interface TestingConfig extends JestConfig {
1881
1922
  /**
1882
1923
  * The `allowableMismatchedPixels` value is used to determine an acceptable
@@ -1969,6 +2010,13 @@ export interface TestingConfig extends JestConfig {
1969
2010
  */
1970
2011
  waitBeforeScreenshot?: number;
1971
2012
  }
2013
+ /**
2014
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
2015
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
2016
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
2017
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
2018
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
2019
+ */
1972
2020
  export interface EmulateConfig {
1973
2021
  /**
1974
2022
  * Predefined device descriptor name, such as "iPhone X" or "Nexus 10".
@@ -1981,6 +2029,13 @@ export interface EmulateConfig {
1981
2029
  userAgent?: string;
1982
2030
  viewport?: EmulateViewport;
1983
2031
  }
2032
+ /**
2033
+ * @deprecated Integrated testing support will be removed in Stencil v5. Migrate spec tests to
2034
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) and e2e / browser tests to either
2035
+ * [`@stencil/vitest`](https://github.com/stenciljs/vitest) or
2036
+ * [`@stencil/playwright`](https://github.com/stenciljs/playwright).
2037
+ * See https://github.com/stenciljs/core/issues/6584 for full discussion and migration guidance.
2038
+ */
1984
2039
  export interface EmulateViewport {
1985
2040
  /**
1986
2041
  * Page width in pixels.