xcraft-core-utils 4.3.1 → 4.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.
Files changed (2) hide show
  1. package/lib/modules.js +11 -3
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -169,9 +169,17 @@ exports.extractAllJs = (libDir, modules) => {
169
169
  const location = path.join(libDir, mod);
170
170
  const files = xFs
171
171
  .lsall(location, true)
172
- .filter(
173
- (file) => !/node_modules/.test(file.substring(location.length + 1))
174
- )
172
+ .filter((file) => {
173
+ const relativePath = file.substring(location.length + 1);
174
+ const items = relativePath.split(path.sep);
175
+ if (items.includes('node_modules')) {
176
+ return false;
177
+ }
178
+ if (items[0] === 'test' || items[0] === 'species') {
179
+ return false;
180
+ }
181
+ return true;
182
+ })
175
183
  .filter((file) => /\.js$/.test(file));
176
184
  list = list.concat(files);
177
185
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcraft-core-utils",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "description": "Xcraft utils",
5
5
  "main": "index.js",
6
6
  "engines": {