g-ui-web 1.4.43 → 1.4.44

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.
@@ -100,6 +100,7 @@ function componentUsagePlugin(options = {}) {
100
100
  // 总引用次数
101
101
  totalImports: 0
102
102
  };
103
+ const excludeNames = /* @__PURE__ */ new Set(["GuiWeb", "DataSource", "useDataSource"]);
103
104
  let isBuild = false;
104
105
  let hasReported = false;
105
106
  return {
@@ -143,7 +144,7 @@ function componentUsagePlugin(options = {}) {
143
144
  return parts[0].trim();
144
145
  });
145
146
  components.forEach((comp) => {
146
- if (comp) {
147
+ if (comp && !excludeNames.has(comp)) {
147
148
  const currentCount = importStats.componentCount.get(comp) || 0;
148
149
  importStats.componentCount.set(comp, currentCount + 1);
149
150
  componentsInFile.push(comp);
@@ -154,10 +155,12 @@ function componentUsagePlugin(options = {}) {
154
155
  const defaultImportMatch = importStatement.match(/import\s+(\w+)\s+from/);
155
156
  if (defaultImportMatch && !importStatement.includes("{")) {
156
157
  const comp = defaultImportMatch[1];
157
- const currentCount = importStats.componentCount.get(comp) || 0;
158
- importStats.componentCount.set(comp, currentCount + 1);
159
- componentsInFile.push(comp);
160
- importStats.totalImports++;
158
+ if (!excludeNames.has(comp)) {
159
+ const currentCount = importStats.componentCount.get(comp) || 0;
160
+ importStats.componentCount.set(comp, currentCount + 1);
161
+ componentsInFile.push(comp);
162
+ importStats.totalImports++;
163
+ }
161
164
  }
162
165
  }
163
166
  });
@@ -74,6 +74,7 @@ function componentUsagePlugin(options = {}) {
74
74
  // 总引用次数
75
75
  totalImports: 0
76
76
  };
77
+ const excludeNames = /* @__PURE__ */ new Set(["GuiWeb", "DataSource", "useDataSource"]);
77
78
  let isBuild = false;
78
79
  let hasReported = false;
79
80
  return {
@@ -117,7 +118,7 @@ function componentUsagePlugin(options = {}) {
117
118
  return parts[0].trim();
118
119
  });
119
120
  components.forEach((comp) => {
120
- if (comp) {
121
+ if (comp && !excludeNames.has(comp)) {
121
122
  const currentCount = importStats.componentCount.get(comp) || 0;
122
123
  importStats.componentCount.set(comp, currentCount + 1);
123
124
  componentsInFile.push(comp);
@@ -128,10 +129,12 @@ function componentUsagePlugin(options = {}) {
128
129
  const defaultImportMatch = importStatement.match(/import\s+(\w+)\s+from/);
129
130
  if (defaultImportMatch && !importStatement.includes("{")) {
130
131
  const comp = defaultImportMatch[1];
131
- const currentCount = importStats.componentCount.get(comp) || 0;
132
- importStats.componentCount.set(comp, currentCount + 1);
133
- componentsInFile.push(comp);
134
- importStats.totalImports++;
132
+ if (!excludeNames.has(comp)) {
133
+ const currentCount = importStats.componentCount.get(comp) || 0;
134
+ importStats.componentCount.set(comp, currentCount + 1);
135
+ componentsInFile.push(comp);
136
+ importStats.totalImports++;
137
+ }
135
138
  }
136
139
  }
137
140
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "g-ui-web",
3
3
  "private": false,
4
4
  "description": "可视化组件库",
5
- "version": "1.4.43",
5
+ "version": "1.4.44",
6
6
  "author": "wyu",
7
7
  "license": "MIT",
8
8
  "type": "module",