Skip to content

Remove TypeScript Dependencies From SDK Import Chain#9

Merged
KetanReddy merged 4 commits intomainfrom
remove-typescript-from-sdk
Apr 16, 2026
Merged

Remove TypeScript Dependencies From SDK Import Chain#9
KetanReddy merged 4 commits intomainfrom
remove-typescript-from-sdk

Conversation

@KetanReddy
Copy link
Copy Markdown
Member

@KetanReddy KetanReddy commented Apr 14, 2026

closes #7

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Release Notes

The typescript npm package (~10 MB) was being pulled into every browser bundle that used @xlr-lib/xlr-sdk even though TypeScript's compiler API is only needed at build time (for .ts → XLR conversion).

@xlr-lib/xlr-sdk

XLRSDK.exportRegistry() has been removed. Use exportTypesToTypeScript from @xlr-lib/xlr-converters instead:

// Before

const output = sdk.exportRegistry("TypeScript", importMap);

// After

import { exportTypesToTypeScript } from "@xlr-lib/xlr-converters";
const output = exportTypesToTypeScript(sdk.listTypes(), importMap);

@xlr-lib/xlr-utils

The following TypeScript-compiler-API-specific exports have been moved to the @xlr-lib/xlr-converters package:

decorateNode, createDocString, createTSDocString, symbolDisplayToString, tsStripOptionalType, isExportedDeclaration, isNodeExported, getReferencedType, isTypeScriptLibType, getStringLiteralsFromUnion, buildTemplateRegex, isOptionalProperty, isGenericInterfaceDeclaration, isGenericTypeDeclaration, isTypeReferenceGeneric, TopLevelDeclaration, isTopLevelDeclaration, TopLevelNode, isTopLevelNode

@xlr-lib/xlr-converters

Now contains all TypeScript compiler related code:

📦 Published PR as canary version: 0.1.1--canary.9.190

Try this version out locally by upgrading relevant packages to 0.1.1--canary.9.190

@KetanReddy KetanReddy requested a review from a team as a code owner April 14, 2026 00:21
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 90.95238% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.30%. Comparing base (995130d) to head (0d6149d).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
converters/src/ts/ts-utils.ts 89.26% 15 Missing and 1 partial ⚠️
converters/src/ts/xlr-to-ts.ts 96.66% 2 Missing ⚠️
utils/src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   68.07%   69.30%   +1.22%     
==========================================
  Files          24       25       +1     
  Lines        4257     4232      -25     
  Branches      823      840      +17     
==========================================
+ Hits         2898     2933      +35     
+ Misses       1350     1291      -59     
+ Partials        9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KetanReddy
Copy link
Copy Markdown
Member Author

/canary

@KetanReddy KetanReddy changed the title Clean up typescript dependencies throughout JS packages to reduce bun… Remove TypeScript Dependencies From SDK Import Chain Apr 15, 2026
@KetanReddy KetanReddy merged commit 56c7696 into main Apr 16, 2026
8 checks passed
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.

Browser bundle includes TypeScript runtime in validation/LSP path

2 participants