@cypress/webpack-dev-server 1.8.1 → 1.8.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # [@cypress/webpack-dev-server-v1.8.4](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.8.3...@cypress/webpack-dev-server-v1.8.4) (2022-03-29)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** add 'lodash' to webpack-dev-server plugin dependencies ([#20815](https://github.com/cypress-io/cypress/issues/20815)) ([a472427](https://github.com/cypress-io/cypress/commit/a4724271601aff110c68ae4364e68764f22cd12c))
7
+
8
+ # [@cypress/webpack-dev-server-v1.8.3](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.8.2...@cypress/webpack-dev-server-v1.8.3) (2022-03-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **webpack-dev-server:** do not encodeUri in loader ([#20575](https://github.com/cypress-io/cypress/issues/20575)) ([1b152fc](https://github.com/cypress-io/cypress/commit/1b152fca1b9ed9894cf7a5b2a964c856f73fc685)), closes [#20593](https://github.com/cypress-io/cypress/issues/20593)
14
+
15
+ # [@cypress/webpack-dev-server-v1.8.2](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.8.1...@cypress/webpack-dev-server-v1.8.2) (2022-03-03)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * avoid nextjs unsafeCache and watchOptions ([#20440](https://github.com/cypress-io/cypress/issues/20440)) ([9f60901](https://github.com/cypress-io/cypress/commit/9f6090170b0675d25b26b98cd0f987a5e395ab78))
21
+ * error regression - strip ansi colors out of cy.fixture() error message ([#20335](https://github.com/cypress-io/cypress/issues/20335)) ([e0bd6ac](https://github.com/cypress-io/cypress/commit/e0bd6ac2aaf8d00b9233fffefed8f6ed2484bf45))
22
+
1
23
  # [@cypress/webpack-dev-server-v1.8.1](https://github.com/cypress-io/cypress/compare/@cypress/webpack-dev-server-v1.8.0...@cypress/webpack-dev-server-v1.8.1) (2022-02-08)
2
24
 
3
25
 
package/dist/loader.js CHANGED
@@ -37,7 +37,7 @@ const makeImport = (file, filename, chunkName, projectRoot) => {
37
37
  // If we want to rename the chunks, we can use this
38
38
  const magicComments = chunkName ? `/* webpackChunkName: "${chunkName}" */` : '';
39
39
  return `"${filename}": {
40
- shouldLoad: () => document.location.pathname.includes("${encodeURI(file.absolute)}"),
40
+ shouldLoad: () => decodeURI(document.location.pathname).includes("${file.absolute}"),
41
41
  load: () => import("${file.absolute}" ${magicComments}),
42
42
  chunkName: "${chunkName}",
43
43
  }`;
@@ -42,6 +42,7 @@ const removeList = ['HtmlWebpackPlugin', 'PreloadPlugin', 'HtmlPwaPlugin'];
42
42
  const OsSeparatorRE = RegExp(`\\${path.sep}`, 'g');
43
43
  const posixSeparator = '/';
44
44
  function makeWebpackConfig(userWebpackConfig, options) {
45
+ var _a;
45
46
  return __awaiter(this, void 0, void 0, function* () {
46
47
  const { projectRoot, devServerPublicPathRoute, files, supportFile, devServerEvents, template } = options;
47
48
  debug(`User passed in webpack config with values %o`, userWebpackConfig);
@@ -86,6 +87,12 @@ function makeWebpackConfig(userWebpackConfig, options) {
86
87
  return true;
87
88
  });
88
89
  }
90
+ if (typeof ((_a = userWebpackConfig === null || userWebpackConfig === void 0 ? void 0 : userWebpackConfig.module) === null || _a === void 0 ? void 0 : _a.unsafeCache) === 'function') {
91
+ const originalCachePredicate = userWebpackConfig.module.unsafeCache;
92
+ userWebpackConfig.module.unsafeCache = (module) => {
93
+ return originalCachePredicate(module) && !/[\\/]webpack-dev-server[\\/]dist[\\/]browser\.js/.test(module.resource);
94
+ };
95
+ }
89
96
  const mergedConfig = (0, webpack_merge_1.merge)(userWebpackConfig, (0, webpack_config_1.default)(template), dynamicWebpackConfig);
90
97
  mergedConfig.entry = entry;
91
98
  debug('Merged webpack config %o', mergedConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/webpack-dev-server",
3
- "version": "1.8.1",
3
+ "version": "1.8.4",
4
4
  "description": "Launches Webpack Dev Server for Component Testing",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "debug": "^4.3.2",
15
+ "lodash": "^4.17.21",
15
16
  "semver": "^7.3.4",
16
17
  "webpack-merge": "^5.4.0"
17
18
  },