monocart-reporter 2.9.14 → 2.9.16

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/lib/utils/util.js CHANGED
@@ -145,13 +145,19 @@ const Util = {
145
145
  },
146
146
 
147
147
  // empty or create dir
148
- initDir: (dirPath) => {
149
- if (fs.existsSync(dirPath)) {
150
- Util.rmSync(dirPath);
148
+ initDir: (dirPath, clean) => {
149
+
150
+ if (clean) {
151
+ if (fs.existsSync(dirPath)) {
152
+ Util.rmSync(dirPath);
153
+ }
154
+ }
155
+
156
+ if (!fs.existsSync(dirPath)) {
157
+ fs.mkdirSync(dirPath, {
158
+ recursive: true
159
+ });
151
160
  }
152
- fs.mkdirSync(dirPath, {
153
- recursive: true
154
- });
155
161
  },
156
162
 
157
163
  getEOL: function(content) {
@@ -199,22 +205,15 @@ const Util = {
199
205
  },
200
206
 
201
207
  jsonString: function(obj, spaces) {
202
-
203
208
  if (typeof obj === 'string') {
204
209
  return obj;
205
210
  }
206
-
207
- if (!spaces) {
208
- spaces = 4;
209
- }
210
-
211
211
  let str = '';
212
212
  try {
213
213
  str = JSON.stringify(obj, null, spaces);
214
214
  } catch (e) {
215
215
  console.log(e);
216
216
  }
217
-
218
217
  return str;
219
218
  },
220
219
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monocart-reporter",
3
- "version": "2.9.14",
3
+ "version": "2.9.16",
4
4
  "description": "A playwright test reporter. Shows suites/cases/steps with tree style, markdown annotations, custom columns/formatters/data collection visitors, console logs, style tags, send email.",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -44,46 +44,46 @@
44
44
  "dependencies": {
45
45
  "console-grid": "^2.2.3",
46
46
  "eight-colors": "^1.3.1",
47
- "koa": "^2.15.3",
47
+ "koa": "^2.16.0",
48
48
  "koa-static-resolver": "^1.0.6",
49
49
  "lz-utils": "^2.1.0",
50
- "monocart-coverage-reports": "^2.12.1",
50
+ "monocart-coverage-reports": "^2.12.3",
51
51
  "monocart-locator": "^1.0.2",
52
52
  "nodemailer": "^6.10.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@babel/code-frame": "^7.26.2",
56
- "@playwright/test": "^1.50.1",
56
+ "@playwright/test": "^1.51.0",
57
57
  "ansi-to-html": "^0.7.2",
58
58
  "async-tick": "^1.0.0",
59
59
  "autolinker": "^4.1.0",
60
- "axios": "^1.7.9",
60
+ "axios": "^1.8.3",
61
61
  "commander": "^13.1.0",
62
62
  "dotenv": "^16.4.7",
63
- "eslint": "^9.20.0",
63
+ "eslint": "^9.22.0",
64
64
  "eslint-config-plus": "^2.0.2",
65
65
  "eslint-plugin-html": "^8.1.2",
66
- "eslint-plugin-vue": "^9.32.0",
66
+ "eslint-plugin-vue": "^10.0.0",
67
67
  "file-saver": "^2.0.5",
68
68
  "find-up": "^7.0.0",
69
69
  "github-markdown-css": "^5.8.1",
70
70
  "glob": "^11.0.1",
71
71
  "marked": "^15.0.7",
72
- "mermaid": "^11.4.1",
72
+ "mermaid": "^11.5.0",
73
73
  "mitt": "^3.0.1",
74
- "monocart-code-viewer": "^1.1.4",
75
- "monocart-formatter": "^3.0.0",
74
+ "monocart-code-viewer": "^1.1.5",
75
+ "monocart-formatter": "^3.0.1",
76
76
  "nice-ticks": "^1.0.2",
77
77
  "node-stream-zip": "^1.15.0",
78
78
  "open": "8.4.2",
79
79
  "sanitize-filename": "^1.6.3",
80
80
  "stack-utils": "^2.0.6",
81
- "stylelint": "^16.14.1",
81
+ "stylelint": "^16.15.0",
82
82
  "stylelint-config-plus": "^1.1.3",
83
83
  "supports-color": "^10.0.0",
84
84
  "turbogrid": "^3.2.0",
85
85
  "vine-ui": "^3.1.16",
86
- "ws": "^8.18.0",
86
+ "ws": "^8.18.1",
87
87
  "yazl": "^3.3.1"
88
88
  }
89
89
  }