@vercel/python 6.20.0 → 6.20.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 +16 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2872,7 +2872,8 @@ var import_util2 = require("util");
2872
2872
  var import_path10 = require("path");
2873
2873
 
2874
2874
  // src/package-versions.ts
2875
- var VERCEL_RUNTIME_VERSION = "0.5.4";
2875
+ var VERCEL_RUNTIME_VERSION = "0.5.5";
2876
+ var VERCEL_WORKERS_VERSION = "0.0.11";
2876
2877
 
2877
2878
  // src/index.ts
2878
2879
  var import_build_utils12 = require("@vercel/build-utils");
@@ -5382,6 +5383,7 @@ var build = async ({
5382
5383
  }) => {
5383
5384
  const builderSpan = parentSpan ?? new import_build_utils12.Span({ name: "vc.builder" });
5384
5385
  const framework = config?.framework;
5386
+ const shouldInstallVercelWorkers = config?.hasWorkerServices === true;
5385
5387
  let spawnEnv;
5386
5388
  let projectInstallCommand;
5387
5389
  let hasCustomCommand = false;
@@ -5668,6 +5670,15 @@ ${pipfileLockContent}`
5668
5670
  projectDir: (0, import_path10.join)(workPath, entryDirectory),
5669
5671
  args: ["install", runtimeDep]
5670
5672
  });
5673
+ if (shouldInstallVercelWorkers) {
5674
+ const workersDep = baseEnv.VERCEL_WORKERS_PYTHON || `vercel-workers==${VERCEL_WORKERS_VERSION}`;
5675
+ (0, import_build_utils12.debug)(`Installing ${workersDep}`);
5676
+ await uv.pip({
5677
+ venvPath,
5678
+ projectDir: (0, import_path10.join)(workPath, entryDirectory),
5679
+ args: ["install", workersDep]
5680
+ });
5681
+ }
5671
5682
  const quirksResult = await runQuirks({ venvPath, pythonEnv, workPath });
5672
5683
  if (quirksResult.buildEnv) {
5673
5684
  Object.assign(pythonEnv, quirksResult.buildEnv);
@@ -5752,7 +5763,10 @@ from vercel_runtime.vc_init import vc_handler
5752
5763
  noBuildCheckFailed,
5753
5764
  pythonPath: pythonVersion.pythonPath,
5754
5765
  hasCustomCommand,
5755
- alwaysBundlePackages: quirksResult.alwaysBundlePackages
5766
+ alwaysBundlePackages: [
5767
+ ...quirksResult.alwaysBundlePackages,
5768
+ ...shouldInstallVercelWorkers ? ["vercel-workers", "vercel_workers"] : []
5769
+ ]
5756
5770
  });
5757
5771
  await builderSpan.child("vc.builder.python.bundle").trace(async (bundleSpan) => {
5758
5772
  const depAnalysis = await depExternalizer.analyze(files);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "6.20.0",
3
+ "version": "6.20.1",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -36,8 +36,8 @@
36
36
  "get-port": "5.1.1",
37
37
  "is-port-reachable": "3.1.0",
38
38
  "@vercel/build-utils": "13.6.2",
39
- "@vercel/error-utils": "2.0.3",
40
- "@vercel/python-runtime": "0.5.4"
39
+ "@vercel/python-runtime": "0.5.5",
40
+ "@vercel/error-utils": "2.0.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "node ../../utils/build-builder.mjs",