@netlify/edge-bundler 12.2.3 → 12.3.1

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.
@@ -1,7 +1,7 @@
1
1
  import { type WriteStream } from 'fs';
2
2
  import { ExecaChildProcess } from 'execa';
3
3
  import { Logger } from './logger.js';
4
- declare const DENO_VERSION_RANGE = "1.37.0 - 1.44.4";
4
+ declare const DENO_VERSION_RANGE = "1.39.0 - 1.46.3";
5
5
  type OnBeforeDownloadHook = () => void | Promise<void>;
6
6
  type OnAfterDownloadHook = (error?: Error) => void | Promise<void>;
7
7
  interface DenoOptions {
@@ -9,11 +9,10 @@ import { getPathInHome } from './home_path.js';
9
9
  import { getLogger } from './logger.js';
10
10
  import { getBinaryExtension } from './platform.js';
11
11
  const DENO_VERSION_FILE = 'version.txt';
12
- // When updating DENO_VERSION_RANGE, ensure that the deno version installed in the
13
- // build-image/buildbot does satisfy this range!
14
- // We're pinning the range because of an issue with v1.45.0 of the Deno CLI:
15
- // https://linear.app/netlify/issue/FRP-775/deno-cli-v1450-causing-issues
16
- const DENO_VERSION_RANGE = '1.37.0 - 1.44.4';
12
+ // When updating DENO_VERSION_RANGE, ensure that the deno version
13
+ // on the netlify/buildbot build image satisfies this range!
14
+ // https://github.com/netlify/buildbot/blob/f9c03c9dcb091d6570e9d0778381560d469e78ad/build-image/noble/Dockerfile#L410
15
+ const DENO_VERSION_RANGE = '1.39.0 - 1.46.3';
17
16
  class DenoBridge {
18
17
  constructor(options) {
19
18
  var _a, _b, _c, _d, _e;
@@ -1,5 +1,7 @@
1
+ import { platform } from 'os';
1
2
  import fetch from 'node-fetch';
2
3
  import waitFor from 'p-wait-for';
4
+ import { satisfies } from 'semver';
3
5
  // 1 second
4
6
  const SERVER_KILL_TIMEOUT = 1e3;
5
7
  // 1 second
@@ -29,9 +31,19 @@ const killProcess = (ps) => {
29
31
  return new Promise((resolve, reject) => {
30
32
  ps.on('close', resolve);
31
33
  ps.on('error', reject);
32
- ps.kill('SIGTERM', {
33
- forceKillAfterTimeout: SERVER_KILL_TIMEOUT,
34
- });
34
+ // On Windows with Node 21+, there's a bug where attempting to kill a child process
35
+ // results in an EPERM error. Ignore the error in that case.
36
+ // See: https://github.com/nodejs/node/issues/51766
37
+ // We also disable execa's `forceKillAfterTimeout` in this case
38
+ // which can cause unhandled rejection.
39
+ try {
40
+ ps.kill('SIGTERM', {
41
+ forceKillAfterTimeout: platform() === 'win32' && satisfies(process.version, '>=21') ? false : SERVER_KILL_TIMEOUT,
42
+ });
43
+ }
44
+ catch {
45
+ // no-op
46
+ }
35
47
  });
36
48
  };
37
49
  const waitForServer = async (port, ps) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/edge-bundler",
3
- "version": "12.2.3",
3
+ "version": "12.3.1",
4
4
  "description": "Intelligently prepare Netlify Edge Functions for deployment",
5
5
  "type": "module",
6
6
  "main": "./dist/node/index.js",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@import-maps/resolve": "^1.0.1",
64
- "@vercel/nft": "^0.27.0",
64
+ "@vercel/nft": "0.27.7",
65
65
  "ajv": "^8.11.2",
66
66
  "ajv-errors": "^3.0.0",
67
67
  "better-ajv-errors": "^1.2.0",
@@ -84,5 +84,5 @@
84
84
  "urlpattern-polyfill": "8.0.2",
85
85
  "uuid": "^9.0.0"
86
86
  },
87
- "gitHead": "507a010535ba4028153a755b397501109fa872c9"
87
+ "gitHead": "214d1726e1f87eedf1aeb3b62ba5b3e87b84bfab"
88
88
  }