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

refactor(build-tools): Update build-tools to use common build-infra #22657

Draft
wants to merge 64 commits into
base: main
Choose a base branch
from

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Sep 27, 2024

Important

Read the PR description for #22347 first. This change builds on top of that infrastructure.

In #22347 we introduced a new package with common infrastructure for build-cli and fluid-build. This change is the first step in adapting those packages to the new infrastructure.

Summary of changes

fluid-build (build-tools)

  • IFluidBuildPackageJson extends PackageJson with fluid-build-specific config properties. This type is used as the package.json type through fluid-build.
  • IFluidBuildPackage extends IPackage<IFluidBuildPackageJson> and is intended to be a replacement for the currently exported Package class.
  • Code that used the Package class has been updated to use IPackage wherever possible, and IFluidBuildPackage in places that need fluid-build specific properties.
  • The Package class was renamed to PackageClass and its load functions are marked deprecated. There are still uses in build-cli, so the class remains exported.
  • The internal type IFluidBuildPackage is exported as Package so most downstream code does not need to be updated. However, there are places where the PackageClass is used directly that will be cleaned up in a future change.
  • The internal type IFluidBuildPackageJson is exported from the package as PackageJson for the same reasons as above. Once build-cli is more fully converted to use build-infrastructure, then these uses will be removed and the exports can also be removed.

build-cli

  • There were places where build-cli used the Package class as a type narrower, but Package is now an interface (see above). In all those cases I was able to rewrite the logic to narrow the types differently. This was done to minimize churn in this change.
  • As noted earlier, the PackageClass is still used in the flub filtering and selection code. That code can mostly be deleted once it's using build-infrastructure, because that package includes the filtering support directly in the IFluidRepo type.

@github-actions github-actions bot added base: main PRs targeted against main branch area: build Build related issues area: contributor experience area: examples Changes that focus on our examples dependencies Pull requests that update a dependency file public api change Changes to a public API labels Sep 27, 2024
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Sep 27, 2024

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 459.88 KB 459.92 KB +35 Bytes
azureClient.js 556.87 KB 556.91 KB +49 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 259.16 KB 259.17 KB +14 Bytes
fluidFramework.js 405.93 KB 405.95 KB +14 Bytes
loader.js 134.34 KB 134.36 KB +14 Bytes
map.js 42.46 KB 42.46 KB +7 Bytes
matrix.js 148.63 KB 148.64 KB +7 Bytes
odspClient.js 523.83 KB 523.88 KB +49 Bytes
odspDriver.js 97.84 KB 97.86 KB +21 Bytes
odspPrefetchSnapshot.js 42.81 KB 42.82 KB +14 Bytes
sharedString.js 164.82 KB 164.83 KB +7 Bytes
sharedTree.js 396.39 KB 396.4 KB +7 Bytes
Total Size 3.31 MB 3.31 MB +245 Bytes

Baseline commit: 880afad

Generated by 🚫 dangerJS against 895adc7

@tylerbutler tylerbutler force-pushed the bt-build-infra-build-tools branch from a7cae1a to 6e8541c Compare October 9, 2024 19:39
@github-actions github-actions bot removed area: contributor experience changeset-present area: examples Changes that focus on our examples dependencies Pull requests that update a dependency file labels Oct 9, 2024
@tylerbutler tylerbutler force-pushed the bt-build-infra-build-tools branch from 5f1e473 to 9419256 Compare November 1, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants