@cypress/webpack-dev-server 5.0.0 → 5.1.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.
|
@@ -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
|
-
|
|
96
|
-
|
|
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 });
|