@vercel/python 6.44.0 → 6.44.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 +36 -12
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1890,9 +1890,9 @@ var require_end_of_stream = __commonJS({
1890
1890
  }
1891
1891
  });
1892
1892
 
1893
- // ../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js
1893
+ // ../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js
1894
1894
  var require_pump = __commonJS({
1895
- "../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports, module2) {
1895
+ "../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js"(exports, module2) {
1896
1896
  var once = require_once();
1897
1897
  var eos = require_end_of_stream();
1898
1898
  var fs13;
@@ -1902,7 +1902,7 @@ var require_pump = __commonJS({
1902
1902
  }
1903
1903
  var noop = function() {
1904
1904
  };
1905
- var ancient = /^v?\.0/.test(process.version);
1905
+ var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
1906
1906
  var isFn = function(fn) {
1907
1907
  return typeof fn === "function";
1908
1908
  };
@@ -3231,7 +3231,7 @@ var import_fs14 = __toESM(require("fs"));
3231
3231
  var import_path14 = require("path");
3232
3232
 
3233
3233
  // src/package-versions.ts
3234
- var VERCEL_RUNTIME_VERSION = "0.14.1";
3234
+ var VERCEL_RUNTIME_VERSION = "0.14.2";
3235
3235
  var VERCEL_WORKERS_VERSION = "0.0.24";
3236
3236
 
3237
3237
  // src/index.ts
@@ -4507,6 +4507,7 @@ async function runCompileAll({
4507
4507
  "-q",
4508
4508
  "-j",
4509
4509
  "0",
4510
+ "-f",
4510
4511
  "--invalidation-mode",
4511
4512
  "unchecked-hash",
4512
4513
  ...excludeRegex ? ["-x", excludeRegex] : [],
@@ -7664,6 +7665,25 @@ function getTargetPlatform(isDev) {
7664
7665
  }
7665
7666
  return { uvPlatform: UV_LINUX_TARGET, architecture: "x86_64" };
7666
7667
  }
7668
+ async function installInjectedPackage({
7669
+ name,
7670
+ pinned,
7671
+ envOverride,
7672
+ uv,
7673
+ venvPath,
7674
+ projectDir,
7675
+ pipPlatformArgs
7676
+ }) {
7677
+ const localDir = (0, import_path14.join)(__dirname, "..", "..", "..", "python", name);
7678
+ const isLocalDev = import_fs14.default.existsSync((0, import_path14.join)(localDir, "pyproject.toml"));
7679
+ const dep = envOverride || (isLocalDev ? localDir : pinned);
7680
+ (0, import_build_utils18.debug)(`Installing ${dep}`);
7681
+ await uv.pip({
7682
+ venvPath,
7683
+ projectDir,
7684
+ args: ["install", "--link-mode", "copy", ...pipPlatformArgs, dep]
7685
+ });
7686
+ }
7667
7687
  var build = async ({
7668
7688
  workPath,
7669
7689
  repoRootPath,
@@ -7914,21 +7934,25 @@ var build = async ({
7914
7934
  });
7915
7935
  }
7916
7936
  const djangoStatic = hookResult?.djangoStatic ?? null;
7917
- const runtimeDep = baseEnv.VERCEL_RUNTIME_PYTHON || `vercel-runtime==${VERCEL_RUNTIME_VERSION}`;
7918
- (0, import_build_utils18.debug)(`Installing ${runtimeDep}`);
7919
7937
  const pipPlatformArgs = target.uvPlatform ? ["--python-platform", target.uvPlatform] : [];
7920
- await uv.pip({
7938
+ await installInjectedPackage({
7939
+ name: "vercel-runtime",
7940
+ pinned: `vercel-runtime==${VERCEL_RUNTIME_VERSION}`,
7941
+ envOverride: baseEnv.VERCEL_RUNTIME_PYTHON,
7942
+ uv,
7921
7943
  venvPath,
7922
7944
  projectDir: (0, import_path14.join)(workPath, entryDirectory),
7923
- args: ["install", "--link-mode", "copy", ...pipPlatformArgs, runtimeDep]
7945
+ pipPlatformArgs
7924
7946
  });
7925
7947
  if (shouldInstallVercelWorkers) {
7926
- const workersDep = baseEnv.VERCEL_WORKERS_PYTHON || `vercel-workers==${VERCEL_WORKERS_VERSION}`;
7927
- (0, import_build_utils18.debug)(`Installing ${workersDep}`);
7928
- await uv.pip({
7948
+ await installInjectedPackage({
7949
+ name: "vercel-workers",
7950
+ pinned: `vercel-workers==${VERCEL_WORKERS_VERSION}`,
7951
+ envOverride: baseEnv.VERCEL_WORKERS_PYTHON,
7952
+ uv,
7929
7953
  venvPath,
7930
7954
  projectDir: (0, import_path14.join)(workPath, entryDirectory),
7931
- args: ["install", "--link-mode", "copy", ...pipPlatformArgs, workersDep]
7955
+ pipPlatformArgs
7932
7956
  });
7933
7957
  }
7934
7958
  const quirksResult = await runQuirks({ venvPath, pythonEnv, workPath });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "6.44.0",
3
+ "version": "6.44.1",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -34,9 +34,9 @@
34
34
  "smol-toml": "1.5.2",
35
35
  "vitest": "2.1.4",
36
36
  "which": "3.0.0",
37
- "@vercel/build-utils": "13.26.4",
38
- "@vercel/python-runtime": "0.14.1",
39
- "@vercel/error-utils": "2.1.0"
37
+ "@vercel/build-utils": "13.29.1",
38
+ "@vercel/python-runtime": "0.14.2",
39
+ "@vercel/error-utils": "2.2.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "node ../../utils/build-builder.mjs",