path-serializer 0.2.1 → 0.2.2

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/dist/cjs/index.js CHANGED
@@ -903,7 +903,7 @@ function __webpack_require__(moduleId) {
903
903
  if (transformWin32Path) replaced = transformCodeToPosixPath(replaced);
904
904
  replaced = applyMatcherReplacement(pathMatchers, replaced);
905
905
  if (escapeDoubleQuotes) replaced = replaced.replace(/"/g, '\\"');
906
- if (escapeEOL) replaced = replaced.replace(/\\r\\n/g, '\n');
906
+ if (escapeEOL) replaced = replaced.replace(/\\r\\n/g, '\\n');
907
907
  if (addDoubleQuotes) replaced = `"${replaced}"`;
908
908
  return replaced;
909
909
  }
@@ -878,7 +878,7 @@ function createSnapshotSerializer(options) {
878
878
  if (transformWin32Path) replaced = transformCodeToPosixPath(replaced);
879
879
  replaced = applyMatcherReplacement(pathMatchers, replaced);
880
880
  if (escapeDoubleQuotes) replaced = replaced.replace(/"/g, '\\"');
881
- if (escapeEOL) replaced = replaced.replace(/\\r\\n/g, '\n');
881
+ if (escapeEOL) replaced = replaced.replace(/\\r\\n/g, '\\n');
882
882
  if (addDoubleQuotes) replaced = `"${replaced}"`;
883
883
  return replaced;
884
884
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "path-serializer",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "path-serializer",
5
5
  "keywords": [
6
6
  "snapshot",