@vercel/go 3.9.1 → 3.9.2

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.
Binary file
Binary file
package/dev-server.go CHANGED
@@ -12,8 +12,11 @@ func main() {
12
12
  // create a new handler
13
13
  handler := http.HandlerFunc(__HANDLER_FUNC_NAME)
14
14
 
15
- // https://stackoverflow.com/a/43425461/376773
16
- listener, err := net.Listen("tcp", "127.0.0.1:0")
15
+ addr := "127.0.0.1:0"
16
+ if devPort := os.Getenv("VERCEL_DEV_PORT"); devPort != "" {
17
+ addr = "127.0.0.1:" + devPort
18
+ }
19
+ listener, err := net.Listen("tcp", addr)
17
20
  if err != nil {
18
21
  panic(err)
19
22
  }
package/dist/index.js CHANGED
@@ -15116,7 +15116,7 @@ async function startStandaloneDevServer(opts, resolvedEntrypoint) {
15116
15116
  } };
15117
15117
  }
15118
15118
  const startPromise = (async () => {
15119
- const port = Math.floor(Math.random() * (65535 - 49152) + 49152);
15119
+ const port = typeof meta.port === "number" ? meta.port : Math.floor(Math.random() * (65535 - 49152) + 49152);
15120
15120
  const env = (0, import_build_utils4.cloneEnv)(process.env, meta.env, {
15121
15121
  PORT: String(port)
15122
15122
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/go",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -33,7 +33,7 @@
33
33
  "xdg-app-paths": "5.1.0",
34
34
  "yauzl-promise": "2.1.3",
35
35
  "@vercel-internals/ipc-proxy": "1.0.0",
36
- "@vercel/build-utils": "13.30.0"
36
+ "@vercel/build-utils": "13.31.1"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "node build.mjs",