@stencil/core 4.8.0-dev.1701234106.8f03983 → 4.8.0-dev.1701320525.33f5158
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 +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +4 -4
- package/compiler/stencil.min.js +2 -2
- 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 +2 -2
- package/internal/app-data/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/client/shadow-css.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +9 -9
- package/testing/jest/jest-27-and-under/jest-environment.d.ts +2 -15
- package/testing/jest/jest-28/jest-environment.d.ts +2 -26
- package/testing/jest/jest-29/jest-environment.d.ts +2 -26
- package/testing/jest/jest-apis.d.ts +15 -1
- package/testing/jest/jest-facade.d.ts +2 -2
- package/testing/jest/jest-stencil-connector.d.ts +1 -1
- package/testing/package.json +1 -1
|
@@ -14,7 +14,21 @@
|
|
|
14
14
|
import type { TransformedSource } from '@jest/transform';
|
|
15
15
|
import type { Config } from '@jest/types';
|
|
16
16
|
import * as d from '@stencil/core/internal';
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* For Stencil's purposes, an instance of a Jest/Puppeteer environment only needs to have a handful of functions.
|
|
19
|
+
* This does not mean that Jest does not require additional functions on an environment. However, those requirements may
|
|
20
|
+
* change from version-to-version of Jest. Stencil overrides the functions below, and with our current design of
|
|
21
|
+
* integrating with Jest, require them to be overridden.
|
|
22
|
+
*/
|
|
23
|
+
export type JestPuppeteerEnvironment = {
|
|
24
|
+
setup(): Promise<void>;
|
|
25
|
+
teardown(): Promise<void>;
|
|
26
|
+
getVmContext(): any | null;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Helper type for describing a function that returns a {@link JestPuppeteerEnvironment}.
|
|
30
|
+
*/
|
|
31
|
+
export type JestPuppeteerEnvironmentConstructor = new (...args: any[]) => JestPuppeteerEnvironment;
|
|
18
32
|
export type JestPreprocessor = {
|
|
19
33
|
process(sourceText: string, sourcePath: string, ...args: any[]): string | TransformedSource;
|
|
20
34
|
getCacheKey(sourceText: string, sourcePath: string, ...args: any[]): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JestCliRunner, JestPreprocessor, JestPresetConfig,
|
|
1
|
+
import { JestCliRunner, JestPreprocessor, JestPresetConfig, JestPuppeteerEnvironmentConstructor, JestScreenshotRunner, JestTestRunnerConstructor } from './jest-apis';
|
|
2
2
|
/**
|
|
3
3
|
* Interface for Jest-version specific code implementations that interact with Stencil.
|
|
4
4
|
*
|
|
@@ -37,7 +37,7 @@ export interface JestFacade {
|
|
|
37
37
|
*
|
|
38
38
|
* @returns A function that builds an E2E testing environment.
|
|
39
39
|
*/
|
|
40
|
-
getCreateJestPuppeteerEnvironment(): () =>
|
|
40
|
+
getCreateJestPuppeteerEnvironment(): () => JestPuppeteerEnvironmentConstructor;
|
|
41
41
|
/**
|
|
42
42
|
* Create an object used to transform files as a part of running Jest.
|
|
43
43
|
*
|
|
@@ -38,7 +38,7 @@ export declare const getScreenshot: () => JestScreenshotRunner;
|
|
|
38
38
|
*
|
|
39
39
|
* @returns a function capable of creating a Jest-Puppeteer environment
|
|
40
40
|
*/
|
|
41
|
-
export declare const getCreateJestPuppeteerEnvironment: () => () =>
|
|
41
|
+
export declare const getCreateJestPuppeteerEnvironment: () => () => import("./jest-apis").JestPuppeteerEnvironmentConstructor;
|
|
42
42
|
/**
|
|
43
43
|
* Retrieve the Jest preprocessor, based on the version of Jest that is installed
|
|
44
44
|
*
|