@cypress/webpack-dev-server 5.0.0 → 5.1.1

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.
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const fs = tslib_1.__importStar(require("fs-extra"));
6
6
  const os_1 = require("os");
7
7
  const path = tslib_1.__importStar(require("path"));
8
- const semver_1 = require("semver");
9
8
  const dynamic_import_1 = require("../dynamic-import");
10
9
  const sourceRelativeWebpackModules_1 = require("./sourceRelativeWebpackModules");
11
10
  const debug_1 = tslib_1.__importDefault(require("debug"));
@@ -82,19 +81,11 @@ async function getTempDir(projectName) {
82
81
  }
83
82
  exports.getTempDir = getTempDir;
84
83
  async function getAngularCliModules(projectRoot) {
85
- let angularVersion;
86
- try {
87
- angularVersion = await getInstalledPackageVersion('@angular-devkit/core', projectRoot);
88
- }
89
- catch (_a) {
90
- throw new Error(`Could not resolve "@angular-devkit/core". Do you have it installed?`);
91
- }
92
84
  const angularCLiModules = [
93
85
  '@angular-devkit/build-angular/src/utils/webpack-browser-config.js',
94
86
  // in Angular 16.1 the locations of these files below were changed
95
- ...((0, semver_1.gte)(angularVersion, '16.1.0')
96
- ? ['@angular-devkit/build-angular/src/tools/webpack/configs/common.js', '@angular-devkit/build-angular/src/tools/webpack/configs/styles.js']
97
- : ['@angular-devkit/build-angular/src/webpack/configs/common.js', '@angular-devkit/build-angular/src/webpack/configs/styles.js']),
87
+ '@angular-devkit/build-angular/src/tools/webpack/configs/common.js',
88
+ '@angular-devkit/build-angular/src/tools/webpack/configs/styles.js',
98
89
  '@angular-devkit/core/src/index.js',
99
90
  ];
100
91
  const [{ generateBrowserWebpackConfigFromContext }, { getCommonConfig }, { getStylesConfig }, { logging },] = await Promise.all(angularCLiModules.map((dep) => {
@@ -114,11 +105,6 @@ async function getAngularCliModules(projectRoot) {
114
105
  };
115
106
  }
116
107
  exports.getAngularCliModules = getAngularCliModules;
117
- async function getInstalledPackageVersion(pkgName, projectRoot) {
118
- const packageJsonPath = require.resolve(`${pkgName}/package.json`, { paths: [projectRoot] });
119
- const { version } = JSON.parse(await fs.readFile(packageJsonPath, { encoding: 'utf-8' }));
120
- return version;
121
- }
122
108
  async function getAngularJson(projectRoot) {
123
109
  const { findUp } = await (0, dynamic_import_1.dynamicImport)('find-up');
124
110
  const angularJsonPath = await findUp('angular.json', { cwd: projectRoot });
@@ -191,6 +177,13 @@ async function getAngularCliWebpackConfig(devServerConfig) {
191
177
  });
192
178
  return [getCommonConfig(wco), stylesConfig];
193
179
  });
180
+ // @see https://github.com/cypress-io/cypress/issues/26456
181
+ // if verbose is not set, we set the stats to errors-only
182
+ // users can either override this stat by passing in a custom webpack config
183
+ // or by setting the verbose option to true
184
+ if (!buildOptions.verbose) {
185
+ config.stats = 'errors-only';
186
+ }
194
187
  delete config.entry.main;
195
188
  return config;
196
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/webpack-dev-server",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "description": "Launches Webpack Dev Server for Component Testing",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {