@jsenv/snapshot 2.9.9 → 2.9.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/snapshot",
3
- "version": "2.9.9",
3
+ "version": "2.9.11",
4
4
  "description": "Snapshot testing",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -38,7 +38,7 @@
38
38
  "@jsenv/exception": "1.1.2",
39
39
  "@jsenv/humanize": "1.2.8",
40
40
  "@jsenv/filesystem": "4.10.2",
41
- "@jsenv/terminal-recorder": "1.4.5",
41
+ "@jsenv/terminal-recorder": "1.4.6",
42
42
  "@jsenv/urls": "2.5.2",
43
43
  "@jsenv/utils": "2.1.2",
44
44
  "ansi-regex": "6.0.1",
@@ -56,6 +56,12 @@ export const replaceFluctuatingValues = (
56
56
  );
57
57
  return string;
58
58
  };
59
+ const replaceTimestamps = (string) => {
60
+ string = string.replace(/\?hot=\d+/g, () => {
61
+ return "?hot=now()";
62
+ });
63
+ return string;
64
+ };
59
65
  const replaceSizes = (string) => {
60
66
  // the size of files might slighly differ from an OS to an other
61
67
  // we round the floats to make them predictable
@@ -81,6 +87,7 @@ export const replaceFluctuatingValues = (
81
87
  if (stringType === "filesystem") {
82
88
  return replaceFilesystemWellKnownValues(string);
83
89
  }
90
+ string = replaceTimestamps(string);
84
91
  if (!preserveAnsi) {
85
92
  string = stripAnsi(string);
86
93
  }