@sveltejs/adapter-vercel 1.0.0-next.71 → 1.0.0-next.74

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.
package/README.md CHANGED
@@ -38,7 +38,7 @@ export default {
38
38
 
39
39
  ### Vercel functions
40
40
 
41
- Vercel functions contained in the `/api` directory at the project's root will _not_ be included in the deployment — these should be implemented as [endpoints](https://kit.svelte.dev/docs/routing#endpoints) in your SvelteKit app.
41
+ Vercel functions contained in the `/api` directory at the project's root will _not_ be included in the deployment — these should be implemented as [server endpoints](https://kit.svelte.dev/docs/routing#server) in your SvelteKit app.
42
42
 
43
43
  ### Node version
44
44
 
@@ -20,7 +20,7 @@ export default async (req, res) => {
20
20
  let request;
21
21
 
22
22
  try {
23
- request = await getRequest(`https://${req.headers.host}`, req);
23
+ request = await getRequest({ base: `https://${req.headers.host}`, request: req });
24
24
  } catch (err) {
25
25
  res.statusCode = err.status || 400;
26
26
  return res.end(err.reason || 'Invalid request body');
package/index.js CHANGED
@@ -189,7 +189,8 @@ export default function ({ external = [], edge, split } = {}) {
189
189
  platform: 'browser',
190
190
  format: 'esm',
191
191
  external,
192
- sourcemap: 'linked'
192
+ sourcemap: 'linked',
193
+ banner: { js: 'globalThis.global = globalThis;' }
193
194
  });
194
195
 
195
196
  write(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-vercel",
3
- "version": "1.0.0-next.71",
3
+ "version": "1.0.0-next.74",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -24,12 +24,12 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@vercel/nft": "^0.22.0",
27
- "esbuild": "^0.14.48"
27
+ "esbuild": "^0.15.6"
28
28
  },
29
29
  "devDependencies": {
30
- "@sveltejs/kit": "1.0.0-next.447",
30
+ "@sveltejs/kit": "1.0.0-next.481",
31
31
  "@types/node": "^16.11.36",
32
- "typescript": "^4.7.4"
32
+ "typescript": "^4.8.2"
33
33
  },
34
34
  "scripts": {
35
35
  "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore",