@sveltejs/adapter-vercel 1.0.0-next.52 → 1.0.0-next.55

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.
@@ -1,9 +1,9 @@
1
- import { installFetch } from '@sveltejs/kit/install-fetch';
1
+ import { installPolyfills } from '@sveltejs/kit/node/polyfills';
2
2
  import { getRequest, setResponse } from '@sveltejs/kit/node';
3
3
  import { Server } from 'SERVER';
4
4
  import { manifest } from 'MANIFEST';
5
5
 
6
- installFetch();
6
+ installPolyfills();
7
7
 
8
8
  const server = new Server(manifest);
9
9
 
package/index.js CHANGED
@@ -145,10 +145,10 @@ async function v1(builder, external) {
145
145
  bundle: true,
146
146
  platform: 'node',
147
147
  external,
148
- format: 'esm'
148
+ format: 'cjs'
149
149
  });
150
150
 
151
- writeFileSync(`${dirs.lambda}/package.json`, JSON.stringify({ type: 'module' }));
151
+ writeFileSync(`${dirs.lambda}/package.json`, JSON.stringify({ type: 'commonjs' }));
152
152
 
153
153
  builder.log.minor('Copying assets...');
154
154
 
@@ -271,7 +271,7 @@ async function v3(builder, external, edge, split) {
271
271
  target: `node${node_version.full}`,
272
272
  bundle: true,
273
273
  platform: 'node',
274
- format: 'esm',
274
+ format: 'cjs',
275
275
  external
276
276
  });
277
277
 
@@ -284,7 +284,7 @@ async function v3(builder, external, edge, split) {
284
284
  })
285
285
  );
286
286
 
287
- write(`${dirs.functions}/${name}.func/package.json`, JSON.stringify({ type: 'module' }));
287
+ write(`${dirs.functions}/${name}.func/package.json`, JSON.stringify({ type: 'commonjs' }));
288
288
 
289
289
  routes.push({ src: pattern, dest: `/${name}` });
290
290
  }
@@ -405,7 +405,9 @@ function get_node_version() {
405
405
  const major = parseInt(full.split('.')[0]); // '16.5.0' --> 16
406
406
 
407
407
  if (major < 16) {
408
- throw new Error(`SvelteKit only supports Node.js version 16 or greater (currently using v${full}). Consult the documentation: https://vercel.com/docs/runtimes#official-runtimes/node-js/node-js-version`)
408
+ throw new Error(
409
+ `SvelteKit only supports Node.js version 16 or greater (currently using v${full}). Consult the documentation: https://vercel.com/docs/runtimes#official-runtimes/node-js/node-js-version`
410
+ );
409
411
  }
410
412
 
411
413
  return { major, full };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/adapter-vercel",
3
- "version": "1.0.0-next.52",
3
+ "version": "1.0.0-next.55",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -11,6 +11,7 @@
11
11
  "type": "module",
12
12
  "exports": {
13
13
  ".": {
14
+ "types": "./index.d.ts",
14
15
  "import": "./index.js"
15
16
  },
16
17
  "./package.json": "./package.json"
@@ -22,12 +23,10 @@
22
23
  "index.d.ts"
23
24
  ],
24
25
  "dependencies": {
25
- "esbuild": "^0.14.21"
26
+ "esbuild": "^0.14.29"
26
27
  },
27
28
  "devDependencies": {
28
- "@sveltejs/kit": "1.0.0-next.331",
29
- "@types/node": "^14.14.20",
30
- "typescript": "^4.6.2"
29
+ "@sveltejs/kit": "1.0.0-next.343"
31
30
  },
32
31
  "scripts": {
33
32
  "lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",