File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ available to roughly half of IPs after three hours and all IPs after six hours.
3434Eligibility uses the original publication time (` time_created ` ) and a SHA-256 hash
3535of the channel and Cloudflare's ` CF-Connecting-IP ` . Each IP keeps the same rollout
3636position across releases in that channel. Requests without this header wait for
37- the full duration. The retired ` next ` channel is not available or configurable.
37+ the full duration. The retired ` next ` channel is not configurable; ` /api/next `
38+ remains a compatibility alias for ` /api/beta ` , including its rollout settings.
3839
3940Until the active release is eligible, callers receive the newest eligible artifact
4041published before it, for the same name and distribution. This also handles overlapping
@@ -71,7 +72,7 @@ no-store` because responses can depend on the User-Agent.
7172
7273Version comparison uses semver, normalizing preview run numbers to numeric prerelease
7374identifiers and historical ` next ` versions to ` beta ` . The retired ` /api/next `
74- channel returns 404; use ` /api/ beta` instead .
75+ channel transparently resolves to ` beta ` for older clients .
7576
7677Choose a minimum that older clients can install and that can itself consume the active
7778release. For the CLI package migration, retain a package-aware release published as
Original file line number Diff line number Diff line change @@ -77,8 +77,7 @@ export default {
7777 return new Response ( "Not found" , { status : 404 } )
7878 }
7979
80- if ( path [ 0 ] === "next" ) return json ( { error : "Channel not found" } , 404 )
81- const resolved = path [ 0 ]
80+ const resolved = resolveChannel ( path [ 0 ] )
8281 const agent = request . headers . get ( "User-Agent" ) ?. match ( / ^ o p e n c o d e \/ (?: ( [ ^ / ] + ) \/ ( [ ^ / ] + ) \/ c l i | ( .* ) ) $ / )
8382 const current = url . searchParams . get ( "current" ) ?? agent ?. [ 2 ] ?? agent ?. [ 3 ]
8483 const source = agent ?. [ 1 ] ?? current ?. match ( / ^ v ? 0 \. 0 \. 0 - ( .+ ) - \d + (?: \. \d + ) ? (?: \+ .* ) ? $ / ) ?. [ 1 ]
You can’t perform that action at this time.
0 commit comments