Skip to content

fix: emit single /*@__PURE__*/ annotation for Rolldown 1.1+ compatibility - #374

Merged
john-royal merged 3 commits into
mainfrom
fix/single-pure-annotation
Jul 16, 2026
Merged

fix: emit single /*@__PURE__*/ annotation for Rolldown 1.1+ compatibility#374
john-royal merged 3 commits into
mainfrom
fix/single-pure-annotation

Conversation

@john-royal

Copy link
Copy Markdown
Contributor

Our generators emitted two consecutive pure annotations (/*@__PURE__*/ /*#__PURE__*/), which Rolldown 1.1+ no longer recognizes — it drops the annotation entirely, breaking tree-shaking of SDK bundles. This changes all generators to emit only /*@__PURE__*/, which Rolldown 1.1 preserves correctly.

-export const CreateDatabaseInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
+export const CreateDatabaseInput = /*@__PURE__*/ Schema.Struct({
  • Updated the four generators: core/scripts/generate-openapi.ts (shared by all OpenAPI-based packages), plus the aws, gcp, and cloudflare generators (including cloudflare's Schema.suspend post-processing regex that matched the double annotation)
  • Applied the same replacement mechanically across all ~4,950 generated source files, so the tree matches what a future bun run generate produces without regenerating every package
  • Added rolldown@^1.1.5 to the workspace catalog
  • Added a bundle.test.ts smoke test to every provider that bundles the SDK from src with Rolldown and asserts it succeeds; providers with per-service entry points also bundle a representative service (aws: s3, gcp: storage-v1, cloudflare: r2, azure: storage, kubernetes: core)

@alchemy-version-bot

alchemy-version-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

@distilled.cloud/core

bun add @distilled.cloud/core@https://pkg.distilled.cloud/core/0991ddf

@distilled.cloud/aws

bun add @distilled.cloud/aws@https://pkg.distilled.cloud/aws/0991ddf

@distilled.cloud/axiom

bun add @distilled.cloud/axiom@https://pkg.distilled.cloud/axiom/0991ddf

@distilled.cloud/azure

bun add @distilled.cloud/azure@https://pkg.distilled.cloud/azure/0991ddf

@distilled.cloud/cloudflare

bun add @distilled.cloud/cloudflare@https://pkg.distilled.cloud/cloudflare/0991ddf

@distilled.cloud/coinbase

bun add @distilled.cloud/coinbase@https://pkg.distilled.cloud/coinbase/0991ddf

@distilled.cloud/expo-eas

bun add @distilled.cloud/expo-eas@https://pkg.distilled.cloud/expo-eas/0991ddf

@distilled.cloud/fly-io

bun add @distilled.cloud/fly-io@https://pkg.distilled.cloud/fly-io/0991ddf

@distilled.cloud/gcp

bun add @distilled.cloud/gcp@https://pkg.distilled.cloud/gcp/0991ddf

@distilled.cloud/kubernetes

bun add @distilled.cloud/kubernetes@https://pkg.distilled.cloud/kubernetes/0991ddf

@distilled.cloud/mongodb-atlas

bun add @distilled.cloud/mongodb-atlas@https://pkg.distilled.cloud/mongodb-atlas/0991ddf

@distilled.cloud/neon

bun add @distilled.cloud/neon@https://pkg.distilled.cloud/neon/0991ddf

@distilled.cloud/planetscale

bun add @distilled.cloud/planetscale@https://pkg.distilled.cloud/planetscale/0991ddf

@distilled.cloud/posthog

bun add @distilled.cloud/posthog@https://pkg.distilled.cloud/posthog/0991ddf

@distilled.cloud/prisma-postgres

bun add @distilled.cloud/prisma-postgres@https://pkg.distilled.cloud/prisma-postgres/0991ddf

@distilled.cloud/stripe

bun add @distilled.cloud/stripe@https://pkg.distilled.cloud/stripe/0991ddf

@distilled.cloud/supabase

bun add @distilled.cloud/supabase@https://pkg.distilled.cloud/supabase/0991ddf

@distilled.cloud/turso

bun add @distilled.cloud/turso@https://pkg.distilled.cloud/turso/0991ddf

@distilled.cloud/typesense

bun add @distilled.cloud/typesense@https://pkg.distilled.cloud/typesense/0991ddf

@distilled.cloud/workos

bun add @distilled.cloud/workos@https://pkg.distilled.cloud/workos/0991ddf

john-royal and others added 2 commits July 16, 2026 12:06
…ation

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	packages/cloudflare/src/services/d1.ts
#	packages/cloudflare/src/services/vectorize.ts
#	packages/planetscale/src/operations/listExtensions.ts
#	packages/planetscale/src/operations/listParameters.ts
#	packages/planetscale/src/operations/resetDefaultRole.ts
Co-authored-by: Cursor <cursoragent@cursor.com>
@john-royal john-royal changed the title fix: emit single /*@__PURE__*/ annotation for Rolldown 1.1 compatibility fix: emit single /*@__PURE__*/ annotation for Rolldown 1.1+ compatibility Jul 16, 2026
@john-royal
john-royal added this pull request to the merge queue Jul 16, 2026
Merged via the queue into main with commit cb99156 Jul 16, 2026
36 of 44 checks passed
@john-royal
john-royal deleted the fix/single-pure-annotation branch July 16, 2026 16:15
Mkassabov added a commit that referenced this pull request Jul 20, 2026
From v0 main (bb54823..c9a7779), everything applicable:

#369 (broad AWS fan-out): full machinery delta — synthetic errors
(message-matcher-carved tags, spec-schema + response-parser + generator
support), legacy SigV2 for SimpleDB (signed-body request built in
AwsProtocol.encode; core executes it), smithy.api#endpoint
hostPrefix (label substitution + double-prefix guard; carried through
core OperationConfig as endpointHostPrefix), streaming-input
UNSIGNED-PAYLOAD with the service denylist, S3 Control/Glacier payload
SHA-256 precompute, the new Presign module + export, union
overrides / sensitive / errorHttpStatus spec-patch capabilities, and
the complete aws patches dir (which includes #383's ec2 duplicate
security-group synthetic errors — 16 typed variants emitted).

#374: single /*@__PURE__*/ annotation (Rolldown 1.1+ treats
/*#__PURE__*/ as unknown) — both generators, all services re-emitted.

#379: core pagination isTerminalToken (empty-string continuation
tokens end pagination instead of looping); bodyMediaType on core's
HttpTrait + raw-body path in protocol-http; Vectorize insert/upsert
gain their previously-unmodeled application/x-ndjson body via manual
patches; D1 params retyped string[] -> unknown[] (JSON values).

#368: workers createRoute error 10019 typed as RouteScriptNotFound.

#380 (rulesets status_code) not ported: v1's docs-derived model
already types every status_code as a number — the string bug was in
v0's openapi source. Planetscale/stripe PRs N/A (no such v1 packages);
the typescript-7 migration is not taken (v1 stays on tsgo).

Verified: typecheck + offline wire sanity across all four families.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant