monocart-reporter 2.3.1 → 2.3.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/lib/utils/util.js CHANGED
@@ -13,10 +13,12 @@ const defaultOptions = require('../default/options.js');
13
13
  const assetsName = 'assets';
14
14
 
15
15
  const Util = {
16
+ ... Share,
16
17
 
17
- root: process.cwd(),
18
+ EC,
19
+ CG,
18
20
 
19
- ... Share,
21
+ root: process.cwd(),
20
22
 
21
23
  relativePath: function(p, root) {
22
24
  p = `${p}`;
package/lib/visitor.js CHANGED
@@ -7,6 +7,19 @@ const {
7
7
  const Util = require('./utils/util.js');
8
8
  const commentsPlugin = require('./plugins/comments.js');
9
9
  const defaultColumns = require('./default/columns.js');
10
+
11
+ // retired, just warning for old babel parser
12
+ let collectWarning = '"collect.comments()" has been deprecated (replaced with new option "customFieldsInComments: true/false" in version 2.2.0), please remove the code related to "collect.comments()" in custom "visitor".';
13
+ const collect = new Proxy({}, {
14
+ get: function(obj, prop) {
15
+ if (collectWarning) {
16
+ Util.logError(collectWarning);
17
+ collectWarning = null;
18
+ }
19
+ return () => {};
20
+ }
21
+ });
22
+
10
23
  class Visitor {
11
24
  constructor(root, options) {
12
25
  this.root = root;
@@ -111,13 +124,13 @@ class Visitor {
111
124
 
112
125
  // for all data
113
126
  if (this.customCommonVisitor) {
114
- await this.customCommonVisitor.call(this, data, metadata);
127
+ await this.customCommonVisitor.call(this, data, metadata, collect);
115
128
  }
116
129
 
117
130
  // for single column data (high priority)
118
131
  if (this.customVisitors) {
119
132
  for (const item of this.customVisitors) {
120
- const res = await item.visitor.call(this, data, metadata);
133
+ const res = await item.visitor.call(this, data, metadata, collect);
121
134
  if (typeof res !== 'undefined') {
122
135
  data[item.id] = res;
123
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monocart-reporter",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
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": {
@@ -47,7 +47,7 @@
47
47
  "koa": "~2.15.0",
48
48
  "koa-static-resolver": "~1.0.5",
49
49
  "lz-utils": "~2.0.2",
50
- "monocart-coverage-reports": "~2.4.2",
50
+ "monocart-coverage-reports": "~2.4.3",
51
51
  "monocart-formatter": "~2.3.1",
52
52
  "nodemailer": "~6.9.9",
53
53
  "open": "~10.0.3",
@@ -56,10 +56,10 @@
56
56
  "devDependencies": {
57
57
  "@playwright/test": "^1.41.2",
58
58
  "axios": "^1.6.7",
59
- "dotenv": "^16.4.1",
59
+ "dotenv": "^16.4.4",
60
60
  "eslint": "^8.56.0",
61
61
  "eslint-config-plus": "^1.0.6",
62
- "eslint-plugin-html": "^7.1.0",
62
+ "eslint-plugin-html": "^8.0.0",
63
63
  "eslint-plugin-vue": "^9.21.1",
64
64
  "stylelint": "^15.11.0",
65
65
  "stylelint-config-plus": "^1.0.4",