@vercel/node 2.6.3 → 2.7.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.
package/dist/index.js CHANGED
@@ -305090,7 +305090,7 @@ const startDevServer = async (opts) => {
305090
305090
  throw new Error(`Child Process has no "pid" when forking: "${devServerPath}"`);
305091
305091
  }
305092
305092
  const onMessage = once_1.default(child, 'message');
305093
- const onExit = once_1.default.spread(child, 'exit');
305093
+ const onExit = once_1.default.spread(child, 'close');
305094
305094
  const result = await Promise.race([onMessage, onExit]);
305095
305095
  onExit.cancel();
305096
305096
  onMessage.cancel();
@@ -305154,7 +305154,7 @@ async function doTypeCheck({ entrypoint, workPath, meta = {} }, projectTsConfig)
305154
305154
  cwd: workPath,
305155
305155
  stdio: 'inherit',
305156
305156
  });
305157
- await once_1.default.spread(child, 'exit');
305157
+ await once_1.default.spread(child, 'close');
305158
305158
  }
305159
305159
 
305160
305160
 
@@ -305253,6 +305253,10 @@ function cachedLookup(fn) {
305253
305253
  return cache.get(arg);
305254
305254
  };
305255
305255
  }
305256
+ /**
305257
+ * Maps the config path to a build func
305258
+ */
305259
+ const configFileToBuildMap = new Map();
305256
305260
  /**
305257
305261
  * Register TypeScript compiler.
305258
305262
  */
@@ -305313,10 +305317,8 @@ function register(opts = {}) {
305313
305317
  console.error('\x1b[31m%s\x1b[0m', error);
305314
305318
  }
305315
305319
  }
305316
- // we create a custom build per tsconfig.json instance
305317
- const builds = new Map();
305318
305320
  function getBuild(configFileName = '') {
305319
- let build = builds.get(configFileName);
305321
+ let build = configFileToBuildMap.get(configFileName);
305320
305322
  if (build)
305321
305323
  return build;
305322
305324
  const config = readConfig(configFileName);
@@ -305409,10 +305411,8 @@ function register(opts = {}) {
305409
305411
  };
305410
305412
  };
305411
305413
  }
305412
- builds.set(configFileName, (build = {
305413
- getOutput,
305414
- getOutputTypeCheck,
305415
- }));
305414
+ build = { getOutput, getOutputTypeCheck };
305415
+ configFileToBuildMap.set(configFileName, build);
305416
305416
  return build;
305417
305417
  }
305418
305418
  // determine the tsconfig.json path for a given folder
@@ -77,6 +77,10 @@ function cachedLookup(fn) {
77
77
  return cache.get(arg);
78
78
  };
79
79
  }
80
+ /**
81
+ * Maps the config path to a build func
82
+ */
83
+ const configFileToBuildMap = new Map();
80
84
  /**
81
85
  * Register TypeScript compiler.
82
86
  */
@@ -137,10 +141,8 @@ function register(opts = {}) {
137
141
  console.error('\x1b[31m%s\x1b[0m', error);
138
142
  }
139
143
  }
140
- // we create a custom build per tsconfig.json instance
141
- const builds = new Map();
142
144
  function getBuild(configFileName = '') {
143
- let build = builds.get(configFileName);
145
+ let build = configFileToBuildMap.get(configFileName);
144
146
  if (build)
145
147
  return build;
146
148
  const config = readConfig(configFileName);
@@ -233,10 +235,8 @@ function register(opts = {}) {
233
235
  };
234
236
  };
235
237
  }
236
- builds.set(configFileName, (build = {
237
- getOutput,
238
- getOutputTypeCheck,
239
- }));
238
+ build = { getOutput, getOutputTypeCheck };
239
+ configFileToBuildMap.set(configFileName, build);
240
240
  return build;
241
241
  }
242
242
  // determine the tsconfig.json path for a given folder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/node",
3
- "version": "2.6.3",
3
+ "version": "2.7.0",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@edge-runtime/vm": "2.0.0",
33
33
  "@types/node": "14.18.33",
34
- "@vercel/build-utils": "5.5.8",
34
+ "@vercel/build-utils": "5.6.0",
35
35
  "@vercel/node-bridge": "3.1.2",
36
36
  "@vercel/static-config": "2.0.6",
37
37
  "edge-runtime": "2.0.0",
@@ -61,5 +61,5 @@
61
61
  "source-map-support": "0.5.12",
62
62
  "test-listen": "1.1.0"
63
63
  },
64
- "gitHead": "74593e4d813cb3f9ae5bb44878461355c3a86849"
64
+ "gitHead": "a19447f9cdc8c7be8aa3646dfb441dd9469d2ed3"
65
65
  }