From 6f74394f07b21d5ec3f029ac5698b505eb3c5ede Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Dec 2022 16:04:25 +0000 Subject: [PATCH 1/2] fix(deps): update dependency @netlify/edge-bundler to v8 --- npm-shrinkwrap.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 91740c3ee87..5a3d92d77bf 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -12,7 +12,7 @@ "dependencies": { "@netlify/build": "^29.2.1", "@netlify/config": "^20.2.0", - "@netlify/edge-bundler": "^7.1.0", + "@netlify/edge-bundler": "^8.0.0", "@netlify/framework-info": "^9.5.3", "@netlify/local-functions-proxy": "^1.1.1", "@netlify/zip-it-and-ship-it": "^8.2.0", @@ -2976,9 +2976,9 @@ } }, "node_modules/@netlify/edge-bundler": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-7.1.0.tgz", - "integrity": "sha512-hYi6kT5qJ+thJbk9ouus0Gcwt9S3MAbAeI1TC9sS8wR3dwGS9T/TNRLgq0cjpV0cjJZMK+4NRsyw12Dn6c99/A==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.0.0.tgz", + "integrity": "sha512-th0HKJ0oqsSVq+kyElP2e1goVZtElz+1b0dK+ddRj6BYAZfGjskoiN1LZo58QPHtZ8Vim3EYQwhDCaLddqGIQw==", "dependencies": { "@import-maps/resolve": "^1.0.1", "ajv": "^8.11.2", @@ -26255,9 +26255,9 @@ } }, "@netlify/edge-bundler": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-7.1.0.tgz", - "integrity": "sha512-hYi6kT5qJ+thJbk9ouus0Gcwt9S3MAbAeI1TC9sS8wR3dwGS9T/TNRLgq0cjpV0cjJZMK+4NRsyw12Dn6c99/A==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@netlify/edge-bundler/-/edge-bundler-8.0.0.tgz", + "integrity": "sha512-th0HKJ0oqsSVq+kyElP2e1goVZtElz+1b0dK+ddRj6BYAZfGjskoiN1LZo58QPHtZ8Vim3EYQwhDCaLddqGIQw==", "requires": { "@import-maps/resolve": "^1.0.1", "ajv": "^8.11.2", diff --git a/package.json b/package.json index 209c253fd3f..41b2fcdb452 100644 --- a/package.json +++ b/package.json @@ -232,7 +232,7 @@ "dependencies": { "@netlify/build": "^29.2.1", "@netlify/config": "^20.2.0", - "@netlify/edge-bundler": "^7.1.0", + "@netlify/edge-bundler": "^8.0.0", "@netlify/framework-info": "^9.5.3", "@netlify/local-functions-proxy": "^1.1.1", "@netlify/zip-it-and-ship-it": "^8.2.0", From fd0d685c29e586a6b20e3f7836dc4b10d5a6287a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Bou=C3=A7as?= Date: Wed, 21 Dec 2022 16:52:49 +0000 Subject: [PATCH 2/2] chore: fix tests --- tests/integration/100.command.dev.test.cjs | 10 +++++----- tests/integration/utils/site-builder.cjs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/100.command.dev.test.cjs b/tests/integration/100.command.dev.test.cjs index 51451c72fa3..39b4cd6ad34 100644 --- a/tests/integration/100.command.dev.test.cjs +++ b/tests/integration/100.command.dev.test.cjs @@ -688,7 +688,7 @@ test('should respect in-source configuration from edge functions', async (t) => }, }) .withEdgeFunction({ - config: () => ({ path: '/hello-1' }), + config: { path: '/hello-1' }, handler: () => new Response('Hello world'), name: 'hello', }) @@ -707,7 +707,7 @@ test('should respect in-source configuration from edge functions', async (t) => await builder .withEdgeFunction({ - config: () => ({ path: '/hello-2' }), + config: { path: '/hello-2' }, handler: () => new Response('Hello world'), name: 'hello', }) @@ -739,7 +739,7 @@ test('should respect in-source configuration from internal edge functions', asyn }, }) .withEdgeFunction({ - config: () => ({ path: '/internal-1' }), + config: { path: '/internal-1' }, handler: () => new Response('Hello from an internal function'), internal: true, name: 'internal', @@ -759,7 +759,7 @@ test('should respect in-source configuration from internal edge functions', asyn await builder .withEdgeFunction({ - config: () => ({ path: '/internal-2' }), + config: { path: '/internal-2' }, handler: () => new Response('Hello from an internal function'), internal: true, name: 'internal', @@ -796,7 +796,7 @@ test('Serves edge functions with import maps coming from the `functions.deno_imp }, }) .withEdgeFunction({ - config: () => ({ path: '/greet' }), + config: { path: '/greet' }, handler: `import { greet } from "greeter"; export default async () => new Response(greet("Netlify"))`, name: 'greet', }) diff --git a/tests/integration/utils/site-builder.cjs b/tests/integration/utils/site-builder.cjs index 754bf5faaf4..ff6b405cb64 100644 --- a/tests/integration/utils/site-builder.cjs +++ b/tests/integration/utils/site-builder.cjs @@ -80,7 +80,7 @@ const createSiteBuilder = ({ siteName }) => { let content = typeof handler === 'string' ? handler : `export default ${handler.toString()}` if (config) { - content += `;export const config = ${config.toString()}` + content += `;export const config = ${JSON.stringify(config)}` } await ensureDir(path.dirname(dest))