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

Adapter auto fixes #2897

Merged
merged 3 commits into from
Nov 24, 2021
Merged
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/proud-parrots-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-auto': patch
---

Remove ANSI codes
5 changes: 5 additions & 0 deletions .changeset/twelve-carrots-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-auto': patch
---

Fix platform detection order
10 changes: 5 additions & 5 deletions packages/adapter-auto/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ export const adapters = [
test: () => !!process.env.VERCEL,
module: '@sveltejs/adapter-vercel'
},
{
name: 'Netlify',
test: () => !!process.env.NETLIFY,
module: '@sveltejs/adapter-netlify'
},
{
name: 'Cloudflare Pages',
test: () => !!process.env.CF_PAGES,
module: '@sveltejs/adapter-cloudflare'
},
{
name: 'Netlify',
test: () => !!process.env.NETLIFY,
module: '@sveltejs/adapter-netlify'
}
];
2 changes: 1 addition & 1 deletion packages/adapter-auto/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function () {
for (const candidate of adapters) {
if (candidate.test()) {
options.utils.log.info(
`Detected environment: \u001B[1m\u001B[92m${candidate.name}\u001B[39m\u001B[22m. Using ${candidate.module}`
`Detected environment: ${candidate.name}. Using ${candidate.module}`
);

let module;
Expand Down