diff --git a/package-lock.json b/package-lock.json index 4a15c25d..44623cd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.3.0", "license": "MIT", "dependencies": { - "@netlify/serverless-functions-api": "1.10.1", + "@netlify/serverless-functions-api": "1.11.0", "is-promise": "^4.0.0" }, "devDependencies": { @@ -1377,9 +1377,9 @@ } }, "node_modules/@netlify/serverless-functions-api": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.10.1.tgz", - "integrity": "sha512-KtaC+Z77HUxXEOPhmq4W773CTr0e1zIhXWZRONrfM1AkdphK5c5G+dItj+BQe6LorNSWNNVihBDA5h7WIF2nDQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.11.0.tgz", + "integrity": "sha512-3splAsr2CekL7VTwgo6yTvzD2+f269/s+TJafYazonqMNNo31yzvFxD5HpLtni4DNE1ppymVKZ4X/rLN3yl0vQ==", "dependencies": { "@netlify/node-cookies": "^0.1.0", "urlpattern-polyfill": "8.0.2" @@ -12240,9 +12240,9 @@ "integrity": "sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==" }, "@netlify/serverless-functions-api": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.10.1.tgz", - "integrity": "sha512-KtaC+Z77HUxXEOPhmq4W773CTr0e1zIhXWZRONrfM1AkdphK5c5G+dItj+BQe6LorNSWNNVihBDA5h7WIF2nDQ==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@netlify/serverless-functions-api/-/serverless-functions-api-1.11.0.tgz", + "integrity": "sha512-3splAsr2CekL7VTwgo6yTvzD2+f269/s+TJafYazonqMNNo31yzvFxD5HpLtni4DNE1ppymVKZ4X/rLN3yl0vQ==", "requires": { "@netlify/node-cookies": "^0.1.0", "urlpattern-polyfill": "8.0.2" diff --git a/package.json b/package.json index a66381e3..bce7532a 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "test": "test" }, "dependencies": { - "@netlify/serverless-functions-api": "1.10.1", + "@netlify/serverless-functions-api": "1.11.0", "is-promise": "^4.0.0" }, "devDependencies": { diff --git a/src/main.ts b/src/main.ts index b28ed7b2..a3154338 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,12 +1,5 @@ -import type { getNetlifyGlobal } from '@netlify/serverless-functions-api' - export { builder } from './lib/builder.js' export { purgeCache } from './lib/purge_cache.js' export { schedule } from './lib/schedule.js' export { stream } from './lib/stream.js' export * from './function/index.js' - -// Ambient type declarations -declare global { - const Netlify: ReturnType -} diff --git a/test/types/Netlify_Global.test-d.ts b/test/types/Netlify_Global.test-d.ts new file mode 100644 index 00000000..db07ee42 --- /dev/null +++ b/test/types/Netlify_Global.test-d.ts @@ -0,0 +1,6 @@ +import { expectAssignable } from 'tsd' + +// eslint-disable-next-line import/no-unassigned-import +import '../../src/main.js' + +expectAssignable<{ env: unknown }>(Netlify)