tsup -> tsdown#356
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Let us drop
esbuildbecause as of Vite 8 everything is Rolldown. Had the robot make sure the result was more or less the same.This will be a patch release for the generator since I don't think it should affect anything for a consumer. For
@oxide/api, I probably won't bother publishing it until the next actual release. Though maybe I should do a test release.🤖 Summary and testing notes
Replaces tsup with tsdown in both
@oxide/apiand@oxide/openapi-gen-ts. esbuild is now gone from bothnode_modulesand lockfiles — and since vite 8 (via vitest) no longer hard-depends on esbuild either, removing tsup eliminated the last source in the generator package too, not just the API client.Two config notes:
fixedExtension: falsein both, because tsdown defaults it totrueon the node platform, which would emitApi.mjs/index.mjsand break the existingexports/main/binpaths that point at.js.node_modules). The generator imports@apidevtools/swagger-parserbut only declared the thinswagger-parserwrapper, so tsdown bundled it and its whole subtree (710 KB vs 37 KB). Fixed by declaring@apidevtools/swagger-parserdirectly — it's auto-externalized, ships its own types, and the wrapper was a one-line re-export with no other importers.Confirmed equivalence by building both packages with old tsup and new tsdown and comparing:
@oxide/api: identical output filenames (Api.js/Api.cjs/Api.d.ts/Api.d.cts), identical exported names in the.d.ts, identicalrequire()shape ({Api, default}both the class,__esModule: trueset by both), and the new.d.tstype-checks clean.@oxide/openapi-gen-ts: bundle back to 39 KB, shebang + exec bit preserved,tscclean, all 138 tests pass. Ran the bundled CLI and the source (tsx) against a real omicron spec — output was byte-identical (diff -rq).