pkgbld 1.33.0 → 1.33.1

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/dist/index.mjs +4 -4
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -949,7 +949,7 @@ async function writeJson(path, json) {
949
949
  await fs.writeFile(path, toFormattedJson(json));
950
950
  }
951
951
 
952
- var version = "1.33.0";
952
+ var version = "1.33.1";
953
953
  var name = "pkgbld";
954
954
  var license = "MIT";
955
955
  var author = "Konstantin Shutkin";
@@ -1223,7 +1223,7 @@ async function prunePkg(pkg, options, logger) {
1223
1223
  await flatten(pkg, options.flatten, logger);
1224
1224
  }
1225
1225
  if (options.removeSourcemaps) {
1226
- const sourceMaps = await walkDir('.').then(files => files.filter(file => file.endsWith('.map')));
1226
+ const sourceMaps = await walkDir('.', ['node_modules']).then(files => files.filter(file => file.endsWith('.map')));
1227
1227
  for (const sourceMap of sourceMaps) {
1228
1228
  // find corresponding file
1229
1229
  const sourceFile = sourceMap.slice(0, -4);
@@ -1489,12 +1489,12 @@ async function isDirectory(file) {
1489
1489
  const fileStat = await stat(file);
1490
1490
  return fileStat.isDirectory();
1491
1491
  }
1492
- async function walkDir(dir) {
1492
+ async function walkDir(dir, ignoreDirs = []) {
1493
1493
  const entries = await readdir(dir, { withFileTypes: true });
1494
1494
  const files = [];
1495
1495
  await Promise.all(entries.map(entry => {
1496
1496
  const childPath = path.join(dir, entry.name);
1497
- if (entry.isDirectory()) {
1497
+ if (entry.isDirectory() && !ignoreDirs.includes(entry.name)) {
1498
1498
  return walkDir(childPath)
1499
1499
  .then(childFiles => {
1500
1500
  files.push(...childFiles);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.33.0",
2
+ "version": "1.33.1",
3
3
  "name": "pkgbld",
4
4
  "license": "MIT",
5
5
  "author": "Konstantin Shutkin",