diff --git a/package-lock.json b/package-lock.json index da0cddcb5c..df5ac5d1e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2393,6 +2393,13 @@ "resolved": "packages/edge-bundler", "link": true }, + "node_modules/@netlify/edge-functions-bootstrap": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/@netlify/edge-functions-bootstrap/-/edge-functions-bootstrap-2.14.0.tgz", + "integrity": "sha512-Fs1cQ+XKfKr2OxrAvmX+S46CJmrysxBdCUCTk/wwcCZikrDvsYUFG7FTquUl4JfAf9taYYyW/tPv35gKOKS8BQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@netlify/functions-utils": { "resolved": "packages/functions-utils", "link": true @@ -24363,6 +24370,7 @@ "uuid": "^11.0.0" }, "devDependencies": { + "@netlify/edge-functions-bootstrap": "^2.14.0", "@types/node": "^18.19.111", "@types/semver": "^7.3.9", "@types/uuid": "^10.0.0", diff --git a/packages/edge-bundler/node/server/server.test.ts b/packages/edge-bundler/node/server/server.test.ts index f6554fedd6..525339df63 100644 --- a/packages/edge-bundler/node/server/server.test.ts +++ b/packages/edge-bundler/node/server/server.test.ts @@ -3,6 +3,11 @@ import { readFile } from 'fs/promises' import { join } from 'path' import process from 'process' +// @ts-expect-error TypeScript is complaining about the values for the `module` +// and `moduleResolution` configuration properties, but changing those to more +// modern values causes other packages to fail. Leaving this for now, but we +// should have a proper fix for this. +import { getURL as getBootstrapURL } from '@netlify/edge-functions-bootstrap/version' import getPort from 'get-port' import tmp from 'tmp-promise' import { v4 as uuidv4 } from 'uuid' @@ -22,7 +27,7 @@ test('Starts a server and serves requests for edge functions', async () => { const servePath = join(basePath, '.netlify', 'edge-functions-serve') const server = await serve({ basePath, - bootstrapURL: 'https://edge.netlify.com/bootstrap/index-combined.ts', + bootstrapURL: await getBootstrapURL(), port, servePath, }) @@ -119,7 +124,7 @@ test('Serves edge functions in a monorepo setup', async () => { const servePath = join(basePath, '.netlify', 'edge-functions-serve') const server = await serve({ basePath, - bootstrapURL: 'https://edge.netlify.com/bootstrap/index-combined.ts', + bootstrapURL: await getBootstrapURL(), port, rootPath, servePath, diff --git a/packages/edge-bundler/package.json b/packages/edge-bundler/package.json index 6967fa8dd9..25bb7b1751 100644 --- a/packages/edge-bundler/package.json +++ b/packages/edge-bundler/package.json @@ -42,6 +42,7 @@ "test": "test/node" }, "devDependencies": { + "@netlify/edge-functions-bootstrap": "^2.14.0", "@types/node": "^18.19.111", "@types/semver": "^7.3.9", "@types/uuid": "^10.0.0",