@cypress/webpack-dev-server 3.8.0 → 3.10.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.
|
@@ -9,7 +9,7 @@ export interface CypressCTWebpackPluginOptions {
|
|
|
9
9
|
webpack: Function;
|
|
10
10
|
indexHtmlFile: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type CypressCTContextOptions = Omit<CypressCTWebpackPluginOptions, 'devServerEvents' | 'webpack'>;
|
|
13
13
|
export interface CypressCTWebpackContext {
|
|
14
14
|
_cypress: CypressCTContextOptions;
|
|
15
15
|
}
|
package/dist/devServer.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import type { Configuration } from 'webpack';
|
|
4
4
|
import { SourceRelativeWebpackResult } from './helpers/sourceRelativeWebpackModules';
|
|
5
|
-
export
|
|
5
|
+
export type Frameworks = Extract<Cypress.DevServerConfigOptions, {
|
|
6
6
|
bundler: 'webpack';
|
|
7
7
|
}>['framework'];
|
|
8
|
-
|
|
8
|
+
type FrameworkConfig = {
|
|
9
9
|
framework?: Exclude<Frameworks, 'angular'>;
|
|
10
10
|
} | {
|
|
11
11
|
framework: 'angular';
|
|
@@ -13,8 +13,8 @@ declare type FrameworkConfig = {
|
|
|
13
13
|
projectConfig: Cypress.AngularDevServerProjectConfig;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type ConfigHandler = Partial<Configuration> | (() => Partial<Configuration> | Promise<Partial<Configuration>>);
|
|
17
|
+
export type WebpackDevServerConfig = {
|
|
18
18
|
specs: Cypress.Spec[];
|
|
19
19
|
cypressConfig: Cypress.PluginConfigOptions;
|
|
20
20
|
devServerEvents: NodeJS.EventEmitter;
|
|
@@ -37,7 +37,7 @@ export declare namespace devServer {
|
|
|
37
37
|
version: 3 | 4 | 5;
|
|
38
38
|
}>;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type PresetHandlerResult = {
|
|
41
41
|
frameworkConfig: Configuration;
|
|
42
42
|
sourceWebpackModulesResult: SourceRelativeWebpackResult;
|
|
43
43
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
2
|
import type { PresetHandlerResult, WebpackDevServerConfig } from '../devServer';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type BuildOptions = Record<string, any>;
|
|
4
|
+
export type AngularWebpackDevServerConfig = Extract<WebpackDevServerConfig, {
|
|
5
5
|
framework: 'angular';
|
|
6
6
|
}>;
|
|
7
|
-
|
|
7
|
+
type Configurations = {
|
|
8
8
|
configurations?: {
|
|
9
9
|
[configuration: string]: BuildOptions;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type AngularJsonProjectConfig = {
|
|
13
13
|
projectType: string;
|
|
14
14
|
root: string;
|
|
15
15
|
sourceRoot: string;
|
|
@@ -19,7 +19,7 @@ export declare type AngularJsonProjectConfig = {
|
|
|
19
19
|
} & Configurations;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type AngularJson = {
|
|
23
23
|
defaultProject?: string;
|
|
24
24
|
projects: {
|
|
25
25
|
[project: string]: AngularJsonProjectConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import Module from 'module';
|
|
3
3
|
import type { WebpackDevServerConfig } from '../devServer';
|
|
4
|
-
export
|
|
4
|
+
export type ModuleClass = typeof Module & {
|
|
5
5
|
_load(id: string, parent: Module, isMain: boolean): any;
|
|
6
6
|
_resolveFilename(request: string, parent: Module, isMain: boolean, options?: {
|
|
7
7
|
paths: string[];
|
|
@@ -148,7 +148,7 @@ function sourceWebpackDevServer(config, webpackMajorVersion, framework) {
|
|
|
148
148
|
if (webpackMajorVersion < 5 && webpackDevServer.majorVersion === 5) {
|
|
149
149
|
const json = webpackDevServer.packageJson;
|
|
150
150
|
throw new CypressWebpackDevServerError(`Incompatible major versions of webpack and webpack-dev-server!
|
|
151
|
-
webpack-dev-server major version ${webpackDevServer.majorVersion} only works with major versions of webpack
|
|
151
|
+
webpack-dev-server major version ${webpackDevServer.majorVersion} only works with major versions of webpack 5 - saw webpack-dev-server version ${json.version}.
|
|
152
152
|
If using webpack major version 4, please install webpack-dev-server version 4 to be used with @cypress/webpack-dev-server or upgrade to webpack 5.`);
|
|
153
153
|
}
|
|
154
154
|
return webpackDevServer;
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/webpack-dev-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "Launches Webpack Dev Server for Component Testing",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prebuild": "rimraf dist",
|
|
8
8
|
"build": "tsc || echo 'built, with type errors'",
|
|
9
9
|
"check-ts": "tsc --noEmit",
|
|
10
|
-
"dev": "tsc --watch",
|
|
11
10
|
"clean": "rimraf dist",
|
|
11
|
+
"cypress:open": "yarn cypress:run-cypress-in-cypress gulp open --project .",
|
|
12
12
|
"cypress:run": "yarn cypress:run-cypress-in-cypress node ../../scripts/cypress run --project . --browser chrome",
|
|
13
13
|
"cypress:run-cypress-in-cypress": "cross-env CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT=1 HTTP_PROXY_TARGET_FOR_ORIGIN_REQUESTS=http://localhost:4455 CYPRESS_REMOTE_DEBUGGING_PORT=6666 TZ=America/New_York",
|
|
14
|
-
"
|
|
14
|
+
"dev": "tsc --watch",
|
|
15
|
+
"lint": "eslint --ext .js,.ts,.json, .",
|
|
15
16
|
"test": "yarn test-unit",
|
|
16
|
-
"test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js"
|
|
17
|
-
"lint": "eslint --ext .js,.ts,.json, ."
|
|
17
|
+
"test-unit": "mocha -r ts-node/register/transpile-only --config ./test/.mocharc.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"find-up": "6.3.0",
|