pruny 1.8.0 → 1.9.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.js +22 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9205,6 +9205,7 @@ async function scanUnusedFiles(config) {
9205
9205
  "**/error.{ts,tsx,js,jsx}",
9206
9206
  "**/not-found.{ts,tsx,js,jsx}",
9207
9207
  "**/middleware.{ts,js}",
9208
+ "**/proxy.{ts,js}",
9208
9209
  "**/instrumentation.{ts,js}",
9209
9210
  "next.config.{js,mjs,ts}",
9210
9211
  "tailwind.config.{js,ts}",
@@ -9356,9 +9357,10 @@ async function scanUnusedExports(config) {
9356
9357
  for (const file of allFiles) {
9357
9358
  try {
9358
9359
  processedFiles++;
9359
- if (processedFiles % 50 === 0) {
9360
+ if (processedFiles % 10 === 0 || processedFiles === allFiles.length) {
9360
9361
  const percent = Math.round(processedFiles / allFiles.length * 100);
9361
- process.stdout.write(`\r Progress: ${processedFiles}/${allFiles.length} files (${percent}%)...`);
9362
+ const shortFile = file.length > 50 ? "..." + file.slice(-47) : file;
9363
+ process.stdout.write(`\r Progress: ${processedFiles}/${allFiles.length} (${percent}%) - ${shortFile}${" ".repeat(10)}`);
9362
9364
  }
9363
9365
  const content = readFileSync3(join3(cwd, file), "utf-8");
9364
9366
  totalContents.set(file, content);
@@ -9700,7 +9702,22 @@ var DEFAULT_CONFIG = {
9700
9702
  dir: "./",
9701
9703
  ignore: {
9702
9704
  routes: [],
9703
- folders: ["node_modules", ".next", "dist", ".git", "coverage", ".turbo", "build", "out", ".cache", ".vercel", ".contentlayer", ".docusaurus", "target", "vendor"],
9705
+ folders: [
9706
+ "**/node_modules/**",
9707
+ "**/.next/**",
9708
+ "**/dist/**",
9709
+ "**/.git/**",
9710
+ "**/coverage/**",
9711
+ "**/.turbo/**",
9712
+ "**/build/**",
9713
+ "**/out/**",
9714
+ "**/.cache/**",
9715
+ "**/.vercel/**",
9716
+ "**/.contentlayer/**",
9717
+ "**/.docusaurus/**",
9718
+ "**/target/**",
9719
+ "**/vendor/**"
9720
+ ],
9704
9721
  files: [
9705
9722
  "*.test.ts",
9706
9723
  "*.spec.ts",
@@ -9715,8 +9732,8 @@ var DEFAULT_CONFIG = {
9715
9732
  "public/opengraph-image.*",
9716
9733
  "public/apple-icon.*",
9717
9734
  "public/icon.*",
9718
- "proxy.*",
9719
- "middleware.*"
9735
+ "**/proxy.*",
9736
+ "**/middleware.*"
9720
9737
  ]
9721
9738
  },
9722
9739
  extensions: [".ts", ".tsx", ".js", ".jsx"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pruny",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "Find and remove unused Next.js API routes & Nest.js Controllers",
5
5
  "type": "module",
6
6
  "files": [