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(client-utils): Fix type generation for ESM and add exports field #18822

Merged
merged 5 commits into from Dec 14, 2023

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Dec 14, 2023

This PR updates client-utils to:

  • generate proper types in ESM builds
  • enable type testing
  • builds tests using node16 module resolution

It does NOT add an exports field, because doing that right now breaks a lot of downstream compilation. We should be able to resolve that once more/all packages are using node16 module resolution.

@github-actions github-actions bot added area: build Build related issues dependencies Pull requests that update a dependency file base: main PRs targeted against main branch labels Dec 14, 2023
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Dec 14, 2023

@fluid-example/bundle-size-tests: -85.55 KB
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 503.59 KB 495.11 KB -8.48 KB
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 291.51 KB 283.22 KB -8.29 KB
loader.js 187.22 KB 177.47 KB -9.75 KB
map.js 99.02 KB 89.89 KB -9.13 KB
matrix.js 198.33 KB 189.16 KB -9.17 KB
odspDriver.js 111.61 KB 98.29 KB -13.32 KB
odspPrefetchSnapshot.js 67.24 KB 51.82 KB -15.43 KB
sharedString.js 216.16 KB 206.95 KB -9.21 KB
sharedTree2.js 322.91 KB 313.71 KB -9.2 KB
Total Size 2.06 MB 1.98 MB -85.55 KB

Baseline commit: 04a597c

Generated by 🚫 dangerJS against b3b1114

@github-actions github-actions bot added the area: runtime Runtime related issues label Dec 14, 2023
@tylerbutler tylerbutler marked this pull request as ready for review December 14, 2023 18:56
@tylerbutler tylerbutler requested review from msfluid-bot and a team as code owners December 14, 2023 18:56
@github-actions github-actions bot removed area: runtime Runtime related issues area: build Build related issues labels Dec 14, 2023
@tylerbutler tylerbutler changed the title build(client-utils): Make compatible with moduleResolution: node16 build(client-utils): Fix type generation for ESM and add exports field Dec 14, 2023
@tylerbutler tylerbutler merged commit 400f566 into microsoft:main Dec 14, 2023
31 checks passed
@tylerbutler tylerbutler deleted the node16-client-utils branch December 14, 2023 22:07
tyler-cai-microsoft pushed a commit to tyler-cai-microsoft/FluidFramework that referenced this pull request Jan 10, 2024
microsoft#18822)

This PR updates client-utils to:

- generate proper types in ESM builds
- enable type testing
- builds tests using node16 module resolution

It does NOT add an exports field, because doing that right now breaks a
lot of downstream compilation. We should be able to resolve that once
more/all packages are using node16 module resolution.
tyler-cai-microsoft pushed a commit to tyler-cai-microsoft/FluidFramework that referenced this pull request Jan 10, 2024
microsoft#18822)

This PR updates client-utils to:

- generate proper types in ESM builds
- enable type testing
- builds tests using node16 module resolution

It does NOT add an exports field, because doing that right now breaks a
lot of downstream compilation. We should be able to resolve that once
more/all packages are using node16 module resolution.
tyler-cai-microsoft added a commit that referenced this pull request Jan 10, 2024
Ported PRs: 
- #18822
- #18825

## Description
Our partner team notified us of a 150kb increase in size when consuming
`2.0.0-internal.8.0.0`. After an investigation into our bundle size
telemetry, it was determined that these two commits in main had reduced
the bundle size by about ~100kb.

## Impact
Reduce bundle size by ~100kb.

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
tyler-cai-microsoft added a commit that referenced this pull request Jan 10, 2024
Ported PRs: 
- #18822
- #18825

## Description
Our partner team notified us of a 150kb increase in size when consuming
`2.0.0-internal.7.4.x`. After an investigation into our bundle size
telemetry, it was determined that these two commits in main had reduced
the bundle size by about ~100kb.

## Impact
Reduce bundle size by ~100kb.

---------

Co-authored-by: Tyler Butler <tylerbu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base: main PRs targeted against main branch dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants