@vercel/build-utils 13.8.1 → 13.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [services] allow services to share builder source ([#15631](https://github.com/vercel/vercel/pull/15631))
8
+
9
+ - Updated dependencies [[`8e8110d2eca5832e109f5efb64b192690100927d`](https://github.com/vercel/vercel/commit/8e8110d2eca5832e109f5efb64b192690100927d)]:
10
+ - @vercel/python-analysis@0.10.1
11
+
3
12
  ## 13.8.1
4
13
 
5
14
  ### Patch Changes
@@ -18,8 +18,11 @@ export type BackendFramework = (typeof BACKEND_FRAMEWORKS)[number];
18
18
  export type PythonFramework = (typeof PYTHON_FRAMEWORKS)[number];
19
19
  /**
20
20
  * Checks if the given framework is a backend framework
21
+ * TODO: make this function generic to all runtimes' backend frameworks and
22
+ * update callers to use isNodeBackendFramework for Node-specific frameworks.
21
23
  */
22
24
  export declare function isBackendFramework(framework: string | null | undefined): framework is BackendFramework;
25
+ export declare function isNodeBackendFramework(framework: string | null | undefined): framework is BackendFramework;
23
26
  export declare function isPythonFramework(framework: string | null | undefined): framework is (typeof PYTHON_FRAMEWORKS)[number];
24
27
  export declare function isExperimentalBackendsWithoutIntrospectionEnabled(): boolean;
25
28
  export declare function isExperimentalBackendsEnabled(): boolean;
@@ -27,6 +27,7 @@ __export(framework_helpers_exports, {
27
27
  isBackendFramework: () => isBackendFramework,
28
28
  isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
29
29
  isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
30
+ isNodeBackendFramework: () => isNodeBackendFramework,
30
31
  isPythonFramework: () => isPythonFramework,
31
32
  shouldUseExperimentalBackends: () => shouldUseExperimentalBackends
32
33
  });
@@ -63,6 +64,11 @@ function isBackendFramework(framework) {
63
64
  return false;
64
65
  return BACKEND_FRAMEWORKS.includes(framework);
65
66
  }
67
+ function isNodeBackendFramework(framework) {
68
+ if (!framework)
69
+ return false;
70
+ return BACKEND_FRAMEWORKS.includes(framework);
71
+ }
66
72
  function isPythonFramework(framework) {
67
73
  if (!framework)
68
74
  return false;
@@ -97,6 +103,7 @@ function shouldUseExperimentalBackends(framework) {
97
103
  isBackendFramework,
98
104
  isExperimentalBackendsEnabled,
99
105
  isExperimentalBackendsWithoutIntrospectionEnabled,
106
+ isNodeBackendFramework,
100
107
  isPythonFramework,
101
108
  shouldUseExperimentalBackends
102
109
  });
package/dist/index.d.ts CHANGED
@@ -34,5 +34,5 @@ export { NODE_VERSIONS } from './fs/node-version';
34
34
  export { getInstalledPackageVersion } from './get-installed-package-version';
35
35
  export { defaultCachePathGlob } from './default-cache-path-glob';
36
36
  export { generateNodeBuilderFunctions } from './generate-node-builder-functions';
37
- export { BACKEND_FRAMEWORKS, BACKEND_BUILDERS, UNIFIED_BACKEND_BUILDER, BackendFramework, isBackendFramework, isBackendBuilder, isExperimentalBackendsEnabled, isExperimentalBackendsWithoutIntrospectionEnabled, shouldUseExperimentalBackends, PYTHON_FRAMEWORKS, PythonFramework, isPythonFramework, } from './framework-helpers';
37
+ export { BACKEND_FRAMEWORKS, BACKEND_BUILDERS, UNIFIED_BACKEND_BUILDER, BackendFramework, isBackendFramework, isNodeBackendFramework, isBackendBuilder, isExperimentalBackendsEnabled, isExperimentalBackendsWithoutIntrospectionEnabled, shouldUseExperimentalBackends, PYTHON_FRAMEWORKS, PythonFramework, isPythonFramework, } from './framework-helpers';
38
38
  export * from './python';
package/dist/index.js CHANGED
@@ -21879,6 +21879,7 @@ __export(src_exports, {
21879
21879
  isDirectory: () => isDirectory,
21880
21880
  isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
21881
21881
  isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
21882
+ isNodeBackendFramework: () => isNodeBackendFramework,
21882
21883
  isPythonEntrypoint: () => isPythonEntrypoint,
21883
21884
  isPythonFramework: () => isPythonFramework,
21884
21885
  isSymbolicLink: () => isSymbolicLink,
@@ -25111,6 +25112,11 @@ function isBackendFramework(framework) {
25111
25112
  return false;
25112
25113
  return BACKEND_FRAMEWORKS.includes(framework);
25113
25114
  }
25115
+ function isNodeBackendFramework(framework) {
25116
+ if (!framework)
25117
+ return false;
25118
+ return BACKEND_FRAMEWORKS.includes(framework);
25119
+ }
25114
25120
  function isPythonFramework(framework) {
25115
25121
  if (!framework)
25116
25122
  return false;
@@ -25214,6 +25220,7 @@ async function isPythonEntrypoint(file) {
25214
25220
  isDirectory,
25215
25221
  isExperimentalBackendsEnabled,
25216
25222
  isExperimentalBackendsWithoutIntrospectionEnabled,
25223
+ isNodeBackendFramework,
25217
25224
  isPythonEntrypoint,
25218
25225
  isPythonFramework,
25219
25226
  isSymbolicLink,
package/dist/types.d.ts CHANGED
@@ -108,6 +108,8 @@ export interface BuildOptions {
108
108
  * multi-service project.
109
109
  */
110
110
  service?: {
111
+ /** The service name as declared in the project configuration. */
112
+ name?: string;
111
113
  /** URL path prefix where the service is mounted (e.g., "/api"). */
112
114
  routePrefix?: string;
113
115
  /** Optional subdomain this service is mounted on (e.g., "api"). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.8.1",
3
+ "version": "13.8.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -11,7 +11,7 @@
11
11
  "directory": "packages/now-build-utils"
12
12
  },
13
13
  "dependencies": {
14
- "@vercel/python-analysis": "0.10.0"
14
+ "@vercel/python-analysis": "0.10.1"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@iarna/toml": "2.2.3",
@@ -50,8 +50,8 @@
50
50
  "yazl": "2.5.1",
51
51
  "vitest": "2.0.1",
52
52
  "json5": "2.2.3",
53
- "@vercel/error-utils": "2.0.3",
54
- "@vercel/routing-utils": "6.0.2"
53
+ "@vercel/routing-utils": "6.0.2",
54
+ "@vercel/error-utils": "2.0.3"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "node build.mjs",