@vercel/python 6.31.0 → 6.32.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4312,6 +4312,7 @@ var import_python_analysis3 = require("@vercel/python-analysis");
4312
4312
  var readFile = (0, import_util.promisify)(import_fs5.default.readFile);
4313
4313
  var LAMBDA_SIZE_THRESHOLD_BYTES = 245 * 1024 * 1024;
4314
4314
  var LAMBDA_EPHEMERAL_STORAGE_BYTES = 500 * 1024 * 1024;
4315
+ var HIVE_LAMBDA_SIZE_BYTES = 1 * 1024 * 1024 * 1024;
4315
4316
  var PythonDependencyExternalizer = class {
4316
4317
  constructor(options) {
4317
4318
  // Populated by analyze()
@@ -4377,6 +4378,15 @@ To resolve this, either:
4377
4378
  action: "Learn More"
4378
4379
  });
4379
4380
  }
4381
+ if (pythonOnHiveEnabled && this.totalBundleSize > HIVE_LAMBDA_SIZE_BYTES) {
4382
+ const limitMB = (HIVE_LAMBDA_SIZE_BYTES / (1024 * 1024)).toFixed(0);
4383
+ throw new import_build_utils5.NowBuildError({
4384
+ code: "LAMBDA_SIZE_EXCEEDED",
4385
+ message: `Total bundle size (${totalBundleSizeMB} MB) exceeds the extended function size limit (${limitMB} MB). Consider removing unused dependencies or splitting your application into smaller functions.`,
4386
+ link: "https://vercel.com/docs/functions/runtimes/python#controlling-what-gets-bundled",
4387
+ action: "Learn More"
4388
+ });
4389
+ }
4380
4390
  return {
4381
4391
  runtimeInstallEnabled,
4382
4392
  allVendorFiles: this.allVendorFiles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "6.31.0",
3
+ "version": "6.32.0",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -36,7 +36,7 @@
36
36
  "smol-toml": "1.5.2",
37
37
  "vitest": "2.1.4",
38
38
  "which": "3.0.0",
39
- "@vercel/build-utils": "13.15.0",
39
+ "@vercel/build-utils": "13.16.0",
40
40
  "@vercel/python-runtime": "0.12.0",
41
41
  "@vercel/error-utils": "2.0.3"
42
42
  },