@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.
- package/cli/index.cjs +379 -154
- package/cli/index.js +379 -154
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +2276 -2065
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +346 -137
- package/internal/app-data/package.json +1 -1
- package/internal/app-globals/package.json +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +423 -214
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +396 -189
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +1 -1
- package/internal/stencil-public-compiler.d.ts +61 -6
- package/internal/testing/index.js +410 -201
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +2 -4
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +2 -4
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/index.js +341 -132
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +44 -46
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +420 -211
- package/testing/package.json +1 -1
package/internal/package.json
CHANGED
|
@@ -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
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
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 `
|
|
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.
|