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

Merged
merged 6 commits into from Dec 14, 2023

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Dec 14, 2023

This PR updates the majority of packages in /dds (merge-tree and sequence excluded) to generate proper types in ESM builds and adds an exports field. The packages were already building using moduleResolution: node16 by virtue of inheriting from the new shared configs, so no changes were needed there. They also have a test using arethetypeswrong that runs in CI.

@github-actions github-actions bot added area: build Build related issues area: dds Issues related to distributed data structures base: main PRs targeted against main branch labels Dec 14, 2023
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Dec 14, 2023
@github-actions github-actions bot added the area: runtime Runtime related issues label Dec 14, 2023
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Dec 14, 2023

@fluid-example/bundle-size-tests: +18 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 503.59 KB 503.6 KB +4 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 291.51 KB 291.51 KB No change
loader.js 187.22 KB 187.22 KB +2 Bytes
map.js 99.02 KB 99.02 KB +2 Bytes
matrix.js 198.33 KB 198.33 KB +2 Bytes
odspDriver.js 111.61 KB 111.62 KB +2 Bytes
odspPrefetchSnapshot.js 67.24 KB 67.25 KB +2 Bytes
sharedString.js 216.16 KB 216.16 KB +2 Bytes
sharedTree2.js 322.91 KB 322.91 KB No change
Total Size 2.06 MB 2.06 MB +18 Bytes

Baseline commit: 7a248ae

Generated by 🚫 dangerJS against 6238a55

@tylerbutler tylerbutler marked this pull request as ready for review December 14, 2023 17:53
@tylerbutler tylerbutler requested review from msfluid-bot and a team as code owners December 14, 2023 17:53
@tylerbutler tylerbutler changed the title Make DDS projects compatible with moduleResolution: node16 build(dds): Fix type generation for ESM and add exports field Dec 14, 2023
fluidBuild.config.cjs Outdated Show resolved Hide resolved
@@ -159,9 +167,17 @@ module.exports = {
// Can be removed once the policy handler is updated to support tsc-multi as equivalent to tsc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: might be worth noting the work item number tracking this cleanup for reference.

tylerbutler added a commit that referenced this pull request Dec 14, 2023
…ts field (#18825)

This PR updates sequence and merge-tree to generate proper types in ESM
builds and adds an exports field. I had to update the test files a bit
to clean up imports. I also added a ./dist/test export from merge-tree
since its internals are used by sequence tests. This is a demonstration
of the mechanism we will have to use any time we want to export
something for use in another package. No more reaching into internals!

This PR includes some configuration and settings changes that are not
strictly needed for this PR, but splitting them out doesn't seem worth
the time since they're all needed for other pending PRs like #18823 and
#18824.
@github-actions github-actions bot removed area: build Build related issues area: runtime Runtime related issues labels Dec 14, 2023
@tylerbutler tylerbutler enabled auto-merge (squash) December 14, 2023 22:19
@tylerbutler tylerbutler merged commit 467aba0 into microsoft:main Dec 14, 2023
29 checks passed
@tylerbutler tylerbutler deleted the node16-part-1 branch December 14, 2023 22:19
tyler-cai-microsoft pushed a commit to tyler-cai-microsoft/FluidFramework that referenced this pull request Jan 10, 2024
…ts field (microsoft#18825)

This PR updates sequence and merge-tree to generate proper types in ESM
builds and adds an exports field. I had to update the test files a bit
to clean up imports. I also added a ./dist/test export from merge-tree
since its internals are used by sequence tests. This is a demonstration
of the mechanism we will have to use any time we want to export
something for use in another package. No more reaching into internals!

This PR includes some configuration and settings changes that are not
strictly needed for this PR, but splitting them out doesn't seem worth
the time since they're all needed for other pending PRs like microsoft#18823 and
microsoft#18824.
tyler-cai-microsoft pushed a commit to tyler-cai-microsoft/FluidFramework that referenced this pull request Jan 10, 2024
…ts field (microsoft#18825)

This PR updates sequence and merge-tree to generate proper types in ESM
builds and adds an exports field. I had to update the test files a bit
to clean up imports. I also added a ./dist/test export from merge-tree
since its internals are used by sequence tests. This is a demonstration
of the mechanism we will have to use any time we want to export
something for use in another package. No more reaching into internals!

This PR includes some configuration and settings changes that are not
strictly needed for this PR, but splitting them out doesn't seem worth
the time since they're all needed for other pending PRs like microsoft#18823 and
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: dds Issues related to distributed data structures 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