Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: move TypeScript to devDependencies #926

Merged
merged 1 commit into from Mar 6, 2024

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Mar 5, 2024

No reason to have TypeScript in main dependencies rather than devDependencies, is there?

Reduces bundle size by >85%. Bundle size before this change, as measured by bundle-phobia-cli:

$ bundle-phobia -p ./package.json
ℹ @stellar/stellar-base (11.0.0) has 7 dependencies for a weight of 351.57KB (81.82KB gzipped)
ℹ axios (1.6.7) has 3 dependencies for a weight of 30.48KB (11.66KB gzipped)
ℹ bignumber.js (9.1.2) has 0 dependencies for a weight of 18.19KB (8.15KB gzipped)
ℹ eventsource (2.0.2) has 0 dependencies for a weight of 5.21KB (2.08KB gzipped)
ℹ randombytes (2.1.0) has 1 dependencies for a weight of 1.57KB (720B gzipped)
ℹ toml (3.0.0) has 0 dependencies for a weight of 27.47KB (5.97KB gzipped)
ℹ typescript (5.3.3) has 0 dependencies for a weight of 3.15MB (890.61KB gzipped)
ℹ urijs (1.19.11) has 0 dependencies for a weight of 41.75KB (13.21KB gzipped)

ℹ total (8 packages) has 11 dependencies for a weight of 3.62MB (1014.21KB gzipped)

After:

$ bundle-phobia -p ./package.json
ℹ @stellar/stellar-base (11.0.0) has 7 dependencies for a weight of 351.57KB (81.82KB gzipped)
ℹ axios (1.6.7) has 3 dependencies for a weight of 30.48KB (11.66KB gzipped)
ℹ bignumber.js (9.1.2) has 0 dependencies for a weight of 18.19KB (8.15KB gzipped)
ℹ eventsource (2.0.2) has 0 dependencies for a weight of 5.21KB (2.08KB gzipped)
ℹ randombytes (2.1.0) has 1 dependencies for a weight of 1.57KB (720B gzipped)
ℹ toml (3.0.0) has 0 dependencies for a weight of 27.47KB (5.97KB gzipped)
ℹ urijs (1.19.11) has 0 dependencies for a weight of 41.75KB (13.21KB gzipped)

ℹ total (7 packages) has 11 dependencies for a weight of 476.23KB (123.6KB gzipped)

@Shaptic
Copy link
Contributor

Shaptic commented Mar 5, 2024

@chadoh you gotta git commit -S (or git commit --amend -S since you've already pushed) for this repo

@chadoh chadoh force-pushed the build/typescript-is-dev-dep branch from 88737f3 to d3ec938 Compare March 5, 2024 21:38
@chadoh
Copy link
Contributor Author

chadoh commented Mar 5, 2024

@Shaptic done

@Shaptic Shaptic merged commit 53ebe3e into stellar:master Mar 6, 2024
9 checks passed
@chadoh chadoh deleted the build/typescript-is-dev-dep branch March 6, 2024 02:47
chadoh added a commit to AhaLabs/js-stellar-sdk that referenced this pull request Mar 14, 2024
* master:
  Move TypeScript to devDependencies to reduce bundle size (stellar#926)
  Drop all usage of array-based passing (stellar#924)
  Release v11.2.2 (stellar#918)
  Ensure that event streaming tests write a valid stream (stellar#917)
  Release v11.2.1 (stellar#913)
  Eliminating `utility-types` dependency entirely (stellar#912)
  Prepare v11.2.0 for release (stellar#908)
  Update README to flow better (stellar#907)
  Add support for new `sendTransaction` response field (stellar#905)
  Export the individual event response instance (stellar#904)
  Bump follow-redirects from 1.15.3 to 1.15.4 (stellar#906)
  Update examples to use new module and package structure. (stellar#900)
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.

None yet

2 participants