@vercel/fs-detectors 5.6.3 → 5.7.0

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.
@@ -26,6 +26,7 @@ export interface Options {
26
26
  cleanUrls?: boolean;
27
27
  trailingSlash?: boolean;
28
28
  featHandleMiss?: boolean;
29
+ bunVersion?: string;
29
30
  }
30
31
  export declare function sortFiles(fileA: string, fileB: string): number;
31
32
  export declare function detectApiExtensions(builders: Builder[]): Set<string>;
@@ -315,6 +315,9 @@ function maybeGetApiBuilder(fileName, apiMatches, options) {
315
315
  config.excludeFiles = func.excludeFiles;
316
316
  }
317
317
  }
318
+ if (options.bunVersion) {
319
+ config.bunVersion = options.bunVersion;
320
+ }
318
321
  const builder = {
319
322
  use,
320
323
  src: fileName,
@@ -371,6 +374,9 @@ function detectFrontBuilder(pkg, files, usedFunctions, fallbackEntrypoint, optio
371
374
  if (projectSettings.outputDirectory) {
372
375
  config.outputDirectory = projectSettings.outputDirectory;
373
376
  }
377
+ if (options.bunVersion) {
378
+ config.bunVersion = options.bunVersion;
379
+ }
374
380
  if (pkg && (framework === void 0 || framework !== "storybook" && createdAt < Date.parse("2020-03-01"))) {
375
381
  const deps = {
376
382
  ...pkg.dependencies,
@@ -491,7 +497,7 @@ function checkUnusedFunctions(frontendBuilder, usedFunctions, options) {
491
497
  }
492
498
  if (frontendBuilder && (0, import_is_official_runtime.isOfficialRuntime)("next", frontendBuilder.use)) {
493
499
  for (const fnKey of unusedFunctions.values()) {
494
- if (fnKey.startsWith("pages/") || fnKey.startsWith("src/pages") || fnKey.startsWith("app/") || fnKey.startsWith("src/app/")) {
500
+ if (fnKey.startsWith("pages/") || fnKey.startsWith("src/pages") || fnKey.startsWith("app/") || fnKey.startsWith("src/app/") || fnKey.startsWith("middleware") || fnKey.startsWith("src/middleware")) {
495
501
  unusedFunctions.delete(fnKey);
496
502
  } else {
497
503
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/fs-detectors",
3
- "version": "5.6.3",
3
+ "version": "5.7.0",
4
4
  "description": "Vercel filesystem detectors",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "license": "Apache-2.0",
16
16
  "dependencies": {
17
17
  "@vercel/error-utils": "2.0.3",
18
- "@vercel/frameworks": "3.13.0",
18
+ "@vercel/frameworks": "3.14.0",
19
19
  "@vercel/routing-utils": "5.2.0",
20
20
  "glob": "8.0.3",
21
21
  "js-yaml": "4.1.0",
@@ -30,7 +30,7 @@
30
30
  "@types/minimatch": "3.0.5",
31
31
  "@types/node": "14.18.33",
32
32
  "@types/semver": "7.3.10",
33
- "@vercel/build-utils": "12.1.3",
33
+ "@vercel/build-utils": "12.2.0",
34
34
  "jest-junit": "16.0.0",
35
35
  "typescript": "4.9.5"
36
36
  },