@multiplatform.one/utils 10.7.1 → 10.7.3

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/dev.cjs CHANGED
@@ -181,7 +181,8 @@ function runtimeExports(root, requireFrom) {
181
181
  }
182
182
  const names = /* @__PURE__ */ new Set();
183
183
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) for (const clause of match[1].split(",")) {
184
- const name = clause.trim().split(/\s+as\s+/).pop()?.trim();
184
+ const words = clause.trim().split(/\s+/);
185
+ const name = words[words.length - 1];
185
186
  if (name) names.add(name);
186
187
  }
187
188
  for (const match of source.matchAll(/^export\s+(?:const|let|var|function|class)\s+(\w+)/gm)) names.add(match[1]);
package/lib/dev.mjs CHANGED
@@ -149,7 +149,8 @@ function runtimeExports(root, requireFrom) {
149
149
  }
150
150
  const names = /* @__PURE__ */ new Set();
151
151
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) for (const clause of match[1].split(",")) {
152
- const name = clause.trim().split(/\s+as\s+/).pop()?.trim();
152
+ const words = clause.trim().split(/\s+/);
153
+ const name = words[words.length - 1];
153
154
  if (name) names.add(name);
154
155
  }
155
156
  for (const match of source.matchAll(/^export\s+(?:const|let|var|function|class)\s+(\w+)/gm)) names.add(match[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/utils",
3
- "version": "10.7.1",
3
+ "version": "10.7.3",
4
4
  "description": "utilities for multiplatform.one",
5
5
  "keywords": [
6
6
  "multiplatform.one",
@@ -166,11 +166,8 @@ function runtimeExports(root: string, requireFrom: NodeRequire): Set<string> | u
166
166
  const names = new Set<string>();
167
167
  for (const match of source.matchAll(/^export\s*\{([^}]*)\}/gm)) {
168
168
  for (const clause of match[1]!.split(",")) {
169
- const name = clause
170
- .trim()
171
- .split(/\s+as\s+/)
172
- .pop()
173
- ?.trim();
169
+ const words = clause.trim().split(/\s+/);
170
+ const name = words[words.length - 1];
174
171
  if (name) names.add(name);
175
172
  }
176
173
  }