@vercel/node 5.3.21 → 5.3.23

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 +18 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -69504,7 +69504,9 @@ function register(opts = {}) {
69504
69504
  getCompilationSettings: () => config.options,
69505
69505
  getDefaultLibFileName: () => ts.getDefaultLibFilePath(config.options),
69506
69506
  getCustomTransformers: () => transformers,
69507
- resolveModuleNames: (moduleNames, containingFile) => {
69507
+ // This hurts performance, but for Express, type checking will fail to find @types/express without it
69508
+ // so keeping it on for now for Express/Hono projects
69509
+ resolveModuleNames: process.env.EXPERIMENTAL_NODE_TYPESCRIPT_ERRORS ? (moduleNames, containingFile) => {
69508
69510
  return moduleNames.map((moduleName) => {
69509
69511
  const result = ts.resolveModuleName(
69510
69512
  moduleName,
@@ -69514,7 +69516,7 @@ function register(opts = {}) {
69514
69516
  );
69515
69517
  return result.resolvedModule;
69516
69518
  });
69517
- }
69519
+ } : void 0
69518
69520
  };
69519
69521
  const registry = ts.createDocumentRegistry(
69520
69522
  ts.sys.useCaseSensitiveFileNames,
@@ -70099,7 +70101,20 @@ var build = async ({
70099
70101
  );
70100
70102
  }
70101
70103
  if (entrypointCallback) {
70102
- entrypointPath = (0, import_path3.join)(entrypointFsDirname, await entrypointCallback());
70104
+ const entrypoint2 = await entrypointCallback();
70105
+ entrypointPath = (0, import_path3.join)(entrypointFsDirname, entrypoint2);
70106
+ const functionConfig = config.functions?.[entrypoint2];
70107
+ if (functionConfig) {
70108
+ const normalizeArray = (value2) => Array.isArray(value2) ? value2 : value2 ? [value2] : [];
70109
+ config.includeFiles = [
70110
+ ...normalizeArray(config.includeFiles),
70111
+ ...normalizeArray(functionConfig.includeFiles)
70112
+ ];
70113
+ config.excludeFiles = [
70114
+ ...normalizeArray(config.excludeFiles),
70115
+ ...normalizeArray(functionConfig.excludeFiles)
70116
+ ];
70117
+ }
70103
70118
  }
70104
70119
  const isMiddleware = config.middleware === true;
70105
70120
  let isEdgeFunction = isMiddleware;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/node",
3
- "version": "5.3.21",
3
+ "version": "5.3.23",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -59,7 +59,7 @@
59
59
  "tree-kill": "1.2.2",
60
60
  "vite": "^5.1.6",
61
61
  "vitest": "^2.0.1",
62
- "@vercel/functions": "3.0.0"
62
+ "@vercel/functions": "3.1.0"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "node build.mjs",