From 0c3f9a04a55be6e5879da68623119f40ef56b927 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 20 Apr 2022 17:47:33 -0400 Subject: [PATCH] fix broken AdapterEntry type (#4674) * fix broken AdapterEntry type * stfu --- .changeset/pretty-bottles-listen.md | 5 +++++ packages/adapter-netlify/index.js | 2 +- packages/kit/types/private.d.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/pretty-bottles-listen.md diff --git a/.changeset/pretty-bottles-listen.md b/.changeset/pretty-bottles-listen.md new file mode 100644 index 000000000000..717923ed051f --- /dev/null +++ b/.changeset/pretty-bottles-listen.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix broken AdapterEntry type diff --git a/packages/adapter-netlify/index.js b/packages/adapter-netlify/index.js index 7d72a12acc5b..c68a9be3c037 100644 --- a/packages/adapter-netlify/index.js +++ b/packages/adapter-netlify/index.js @@ -62,7 +62,7 @@ export default function ({ split = false, edge = edgeSetInEnvVar } = {}) { if (split) { throw new Error('Cannot use `split: true` alongside `edge: true`'); } - + await generate_edge_functions({ builder }); } else { await generate_lambda_functions({ builder, esm, split, publish }); diff --git a/packages/kit/types/private.d.ts b/packages/kit/types/private.d.ts index 762a082e9854..ad2ac7840fd1 100644 --- a/packages/kit/types/private.d.ts +++ b/packages/kit/types/private.d.ts @@ -23,7 +23,7 @@ export interface AdapterEntry { */ complete: (entry: { generateManifest: (opts: { relativePath: string; format?: 'esm' | 'cjs' }) => string; - }) => Promise; + }) => MaybePromise; } // Based on /~https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts