@vercel/node 5.5.32 → 5.5.33

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 +8 -20
  2. package/package.json +5 -6
package/dist/index.js CHANGED
@@ -70051,10 +70051,10 @@ function register(opts = {}) {
70051
70051
  paths: [options.project || cwd]
70052
70052
  });
70053
70053
  } catch (e) {
70054
- compiler = opts.useTypescript5 ? "typescript5" : "typescript";
70054
+ compiler = "typescript";
70055
70055
  }
70056
70056
  const ts = require_(compiler);
70057
- if (compiler === "typescript" || compiler === "typescript5") {
70057
+ if (compiler === "typescript") {
70058
70058
  console.log(
70059
70059
  `Using built-in TypeScript ${ts.version} since "typescript" is missing from "devDependencies"`
70060
70060
  );
@@ -70486,7 +70486,7 @@ function renameTStoJS(path) {
70486
70486
  }
70487
70487
  return path;
70488
70488
  }
70489
- async function compile2(workPath, baseDir, entrypointPath, config, meta, nodeVersion, isEdgeFunction, useTypescript5 = false) {
70489
+ async function compile2(workPath, baseDir, entrypointPath, config, meta, nodeVersion, isEdgeFunction) {
70490
70490
  const inputFiles = /* @__PURE__ */ new Set([entrypointPath]);
70491
70491
  const preparedFiles = {};
70492
70492
  const sourceCache = /* @__PURE__ */ new Map();
@@ -70519,8 +70519,7 @@ async function compile2(workPath, baseDir, entrypointPath, config, meta, nodeVer
70519
70519
  // Resolve tsconfig.json from entrypoint dir
70520
70520
  files: true,
70521
70521
  // Include all files such as global `.d.ts`
70522
- nodeVersionMajor: nodeVersion.major,
70523
- useTypescript5
70522
+ nodeVersionMajor: nodeVersion.major
70524
70523
  });
70525
70524
  }
70526
70525
  const { code, map } = tsCompile(source, path);
@@ -70769,7 +70768,6 @@ var build = async ({
70769
70768
  config,
70770
70769
  isBun: (0, import_build_utils3.isBunVersion)(nodeVersion)
70771
70770
  });
70772
- const useTypescript5 = considerBuildCommand;
70773
70771
  (0, import_build_utils3.debug)("Tracing input files...");
70774
70772
  const traceTime = Date.now();
70775
70773
  const { preparedFiles, shouldAddSourcemapSupport } = await compile2(
@@ -70779,8 +70777,7 @@ var build = async ({
70779
70777
  config,
70780
70778
  meta,
70781
70779
  nodeVersion,
70782
- isEdgeFunction,
70783
- useTypescript5
70780
+ isEdgeFunction
70784
70781
  );
70785
70782
  (0, import_build_utils3.debug)(`Trace complete [${Date.now() - traceTime}ms]`);
70786
70783
  let routes;
@@ -71007,17 +71004,10 @@ async function forkDevServer(options) {
71007
71004
  if (!nodeOptions.includes("--no-warnings")) {
71008
71005
  nodeOptions += " --no-warnings";
71009
71006
  }
71010
- const tsNodePath = options.require_.resolve("ts-node");
71011
- const esmLoader = (0, import_url.pathToFileURL)((0, import_path5.join)(tsNodePath, "..", "..", "esm.mjs"));
71012
- const cjsLoader = (0, import_path5.join)(tsNodePath, "..", "..", "register", "index.js");
71007
+ const tsxPath = (0, import_url.pathToFileURL)(options.require_.resolve("tsx"));
71013
71008
  if (options.maybeTranspile) {
71014
- if (options.isTypeScript) {
71015
- nodeOptions = `--require ${cjsLoader} --loader ${esmLoader} ${nodeOptions || ""}`;
71016
- } else {
71017
- if (options.isEsm) {
71018
- } else {
71019
- nodeOptions = `--require ${cjsLoader} ${nodeOptions || ""}`;
71020
- }
71009
+ if (options.isTypeScript || !options.isEsm) {
71010
+ nodeOptions = `--import ${tsxPath} ${nodeOptions || ""}`;
71021
71011
  }
71022
71012
  }
71023
71013
  const forkOptions = {
@@ -71028,8 +71018,6 @@ async function forkDevServer(options) {
71028
71018
  VERCEL_DEV_CONFIG: JSON.stringify(options.config),
71029
71019
  VERCEL_DEV_BUILD_ENV: JSON.stringify(options.meta.buildEnv || {}),
71030
71020
  VERCEL_DEV_PUBLIC_DIR: options.publicDir || "",
71031
- TS_NODE_TRANSPILE_ONLY: "1",
71032
- TS_NODE_COMPILER_OPTIONS: options.tsConfig?.compilerOptions ? JSON.stringify(options.tsConfig.compilerOptions) : void 0,
71033
71021
  NODE_OPTIONS: nodeOptions
71034
71022
  }),
71035
71023
  stdio: options.printLogs ? "pipe" : void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/node",
3
- "version": "5.5.32",
3
+ "version": "5.5.33",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -29,13 +29,12 @@
29
29
  "path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
30
30
  "path-to-regexp": "6.1.0",
31
31
  "ts-morph": "12.0.0",
32
- "ts-node": "10.9.1",
33
- "typescript": "4.9.5",
34
- "typescript5": "npm:typescript@5.9.3",
32
+ "tsx": "4.21.0",
33
+ "typescript": "npm:typescript@5.9.3",
35
34
  "undici": "5.28.4",
35
+ "@vercel/build-utils": "13.3.3",
36
36
  "@vercel/error-utils": "2.0.3",
37
- "@vercel/static-config": "3.1.2",
38
- "@vercel/build-utils": "13.3.2"
37
+ "@vercel/static-config": "3.1.2"
39
38
  },
40
39
  "devDependencies": {
41
40
  "@babel/core": "7.24.4",