@cypress/webpack-dev-server 3.7.2 → 3.7.4
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.
|
@@ -18,7 +18,7 @@ async function getProjectConfig(projectRoot) {
|
|
|
18
18
|
if (!defaultProject) {
|
|
19
19
|
defaultProject = Object.keys(angularJson.projects).find((name) => angularJson.projects[name].projectType === 'application');
|
|
20
20
|
if (!defaultProject) {
|
|
21
|
-
throw new Error('Could not find a project with projectType "application" in "angular.json". Visit https://
|
|
21
|
+
throw new Error('Could not find a project with projectType "application" in "angular.json". Visit https://on.cypress.io/configuration to see how to pass in a custom project configuration');
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
const defaultProjectConfig = angularJson.projects[defaultProject];
|
|
@@ -76,7 +76,10 @@ function addCypressToWebpackEslintRulesInPlace(webpackConfig) {
|
|
|
76
76
|
const eslintPlugin = (_a = webpackConfig.plugins) === null || _a === void 0 ? void 0 : _a.find((plugin) => plugin.constructor.name === 'ESLintWebpackPlugin');
|
|
77
77
|
if (eslintPlugin) {
|
|
78
78
|
const cypressGlobalsRules = exports.cypressGlobals
|
|
79
|
-
.reduce((acc, global) =>
|
|
79
|
+
.reduce((acc, global) => {
|
|
80
|
+
acc[global] = 'writable';
|
|
81
|
+
return acc;
|
|
82
|
+
}, {});
|
|
80
83
|
eslintPlugin.options.baseConfig = Object.assign(Object.assign({}, eslintPlugin.options.baseConfig), { globals: Object.assign(Object.assign({}, (_b = eslintPlugin.options.baseConfig) === null || _b === void 0 ? void 0 : _b.globals), cypressGlobalsRules) });
|
|
81
84
|
debug('Found ESLintWebpackPlugin, modified eslint config %o', eslintPlugin.options.baseConfig);
|
|
82
85
|
}
|