@vercel/fs-detectors 5.8.9 → 5.8.10

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.
@@ -38,6 +38,9 @@ const APPS_WEB_DIR = "apps/web";
38
38
  const BACKEND_DIR = "backend";
39
39
  const SERVICES_DIR = "services";
40
40
  const FRONTEND_LOCATIONS = [FRONTEND_DIR, APPS_WEB_DIR];
41
+ const DETECTION_FRAMEWORKS = import_frameworks.default.filter(
42
+ (framework) => !framework.experimental || framework.runtimeFramework
43
+ );
41
44
  async function autoDetectServices(options) {
42
45
  const { fs } = options;
43
46
  const rootFrameworks = await (0, import_detect_framework.detectFrameworks)({
@@ -198,7 +201,8 @@ async function detectServiceInDir(fs, dirPath, serviceName) {
198
201
  const serviceFs = fs.chdir(dirPath);
199
202
  const frameworks = await (0, import_detect_framework.detectFrameworks)({
200
203
  fs: serviceFs,
201
- frameworkList: import_frameworks.default
204
+ frameworkList: DETECTION_FRAMEWORKS,
205
+ useExperimentalFrameworks: true
202
206
  });
203
207
  if (frameworks.length > 1) {
204
208
  const frameworkNames = frameworks.map((f) => f.name).join(", ");
@@ -22,9 +22,10 @@ export declare function isRouteOwningBuilder(service: ResolvedService): boolean;
22
22
  *
23
23
  * Priority (highest to lowest):
24
24
  * 1. Explicit runtime (user specified in config)
25
- * 2. Framework detection (fastapipython, expressnode)
26
- * 3. Builder detection (@vercel/python → python)
27
- * 4. Entrypoint extension (.py → python, .ts → node)
25
+ * 2. Runtime framework slug (rubyruby, gogo)
26
+ * 3. Framework detection (fastapi → python, express node)
27
+ * 4. Builder detection (@vercel/python → python)
28
+ * 5. Entrypoint extension (.py → python, .ts → node)
28
29
  *
29
30
  * @returns The inferred runtime, or undefined if none can be determined.
30
31
  */
@@ -58,6 +58,9 @@ function inferServiceRuntime(config) {
58
58
  if (config.runtime && config.runtime in import_types.RUNTIME_BUILDERS) {
59
59
  return config.runtime;
60
60
  }
61
+ if (config.framework && config.framework in import_types.RUNTIME_BUILDERS) {
62
+ return config.framework;
63
+ }
61
64
  if ((0, import_framework_helpers.isPythonFramework)(config.framework)) {
62
65
  return "python";
63
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/fs-detectors",
3
- "version": "5.8.9",
3
+ "version": "5.8.10",
4
4
  "description": "Vercel filesystem detectors",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "minimatch": "3.1.2",
21
21
  "semver": "6.3.1",
22
22
  "@vercel/error-utils": "2.0.3",
23
- "@vercel/routing-utils": "5.3.3",
24
- "@vercel/frameworks": "3.18.0"
23
+ "@vercel/frameworks": "3.19.0",
24
+ "@vercel/routing-utils": "5.3.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/glob": "7.2.0",
@@ -32,7 +32,7 @@
32
32
  "@types/semver": "7.3.10",
33
33
  "jest-junit": "16.0.0",
34
34
  "typescript": "4.9.5",
35
- "@vercel/build-utils": "13.4.3"
35
+ "@vercel/build-utils": "13.5.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "node ../../utils/build.mjs",