Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0f0c26a
simplify workers and pages distinction
Apr 23, 2025
0004d36
support workers ci in adapter auto
Apr 23, 2025
fa08a55
add todo
Apr 23, 2025
1868b8c
remove todo
Apr 23, 2025
38b2940
improve error message
Apr 23, 2025
7bd425a
spacing
Apr 23, 2025
4a61e60
Update packages/adapter-auto/index.js
teemingc Apr 24, 2025
a9ce1c9
validate main key and fix relative import paths
Apr 24, 2025
9d2e796
Merge branch 'feat-adapter-auto-workers-ci' of https://github.com/sve…
Apr 24, 2025
24a6ea8
better comment
Apr 24, 2025
b60969b
allow spa static assets configuration
Apr 24, 2025
8d4169d
add validation error reasons
Apr 24, 2025
1417d6e
docs formatting
Apr 24, 2025
f6b2fcb
make compatibility date generic
Apr 24, 2025
515b1e6
mention workers ci
Apr 24, 2025
710510b
grammar
Apr 24, 2025
d37a58a
integrate #14871 thanks to penalosa
teemingc Jan 14, 2026
0066267
Merge branch 'main' into feat-adapter-auto-workers-ci
teemingc Jan 14, 2026
15e31af
add test for workers_ci
teemingc Jan 14, 2026
a3d3e80
format
teemingc Jan 14, 2026
daaf6bc
update test
teemingc Jan 14, 2026
543f192
split out
teemingc Jan 14, 2026
9bfdab7
split out more
teemingc Jan 14, 2026
5028e2b
split
teemingc Jan 14, 2026
b622a38
add unit test
teemingc Jan 14, 2026
f64d9ea
Remove WORKERS_CI check from Cloudflare adapter
teemingc Feb 25, 2026
7ccb7dc
Apply suggestion from @teemingc
teemingc Feb 25, 2026
e53f113
Apply suggestion from @teemingc
teemingc Feb 25, 2026
44845f0
Merge branch 'version-3' into feat-adapter-auto-workers-ci
teemingc Feb 25, 2026
eb9cf06
Apply suggestion from @teemingc
teemingc Feb 25, 2026
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/plenty-cougars-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-cloudflare': patch
---

chore: check the `WORKERS_CI` environment variable to determine if we're building for Cloudflare Workers
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function is_building_for_cloudflare_pages(wrangler_config) {
return true;
}

if (wrangler_config.main || wrangler_config.assets) {
if (!!process.env.WORKERS_CI || wrangler_config.main || wrangler_config.assets) {
return false;
}

Expand Down
9 changes: 9 additions & 0 deletions packages/adapter-cloudflare/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ describe('detects Cloudflare Workers project', () => {
)
).toBe(false);
});

test('WORKERS_CI environment variable', () => {
vi.stubEnv('WORKERS_CI', '1');
const result = is_building_for_cloudflare_pages(
/** @type {import('wrangler').Unstable_Config} */ ({})
);
vi.unstubAllEnvs();
expect(result).toBe(false);
});
});

describe('validates Wrangler config', () => {
Expand Down
Loading