Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update Vercel, Cloudflare, and Netlify adapter versions #13142

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/selfish-lamps-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-auto': major
---

feat: update Vercel, Cloudflare Pages, and Netlify adapter major versions
6 changes: 3 additions & 3 deletions packages/adapter-auto/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ export const adapters = [
name: 'Vercel',
test: () => !!process.env.VERCEL,
module: '@sveltejs/adapter-vercel',
version: '4'
version: '5'
},
{
name: 'Cloudflare Pages',
test: () => !!process.env.CF_PAGES,
module: '@sveltejs/adapter-cloudflare',
version: '3'
version: '4'
},
{
name: 'Netlify',
test: () => !!process.env.NETLIFY,
module: '@sveltejs/adapter-netlify',
version: '3'
version: '4'
},
{
name: 'Azure Static Web Apps',
Expand Down
6 changes: 4 additions & 2 deletions packages/adapter-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@
"scripts": {
"lint": "prettier --check .",
"format": "pnpm lint --write",
"check": "tsc"
"check": "tsc",
"test": "vitest run"
},
"devDependencies": {
"@sveltejs/kit": "workspace:^",
"@sveltejs/vite-plugin-svelte": "^5.0.1",
"@types/node": "^18.19.48",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^2.1.6"
},
"dependencies": {
"import-meta-resolve": "^4.1.0"
Expand Down
16 changes: 16 additions & 0 deletions packages/adapter-auto/test/adapters.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { assert, test } from 'vitest';
import { adapters } from 'adapters.js';
import { existsSync, readFileSync } from 'node:fs';

test('adapter versions are up to date', () => {
for (const adapter of adapters) {
const dir = adapter.module.replace('@sveltejs/', '');
const package_json = `../${dir}/package.json`;
if (!existsSync(package_json)) {
continue;
}
const adapter_version = JSON.parse(readFileSync(package_json, 'utf-8')).version;
const [major] = adapter_version.split('.');
assert.equal(adapter.version, major, `${adapter.name} adapter is outdated`);
}
});
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading