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

Move migration-tools to separate example package #22267

Merged
merged 27 commits into from
Aug 22, 2024

Conversation

ChumpChief
Copy link
Contributor

@ChumpChief ChumpChief commented Aug 19, 2024

This PR primarily moves the migration-tools to their own separate example package, rather than their current home of example-utils. There are no material functional changes to the tools or examples.

Since we'll eventually be putting these through the experimental/beta phase this will be necessary anyway, and in the meantime it'll help clarify to customers what portions they should be checking out.

It largely does not touch the same-container migration tools since they're not the focus right now, beyond separating out some shared types.

Other changes are:

  1. Renames "schema-upgrade" example to "separate-container", to better parallel the existing "same-container" example and be more explicit about what it's demonstrating
  2. Upgrades the eslint configurations of both the example and the migration-tools packages to the "recommended" level (from "minimal-deprecated")
  3. Adds a MigratableTinyliciousModelLoader (which does the same thing as the MigratableSessionStorageModelLoader).

AB#12617
AB#12618

@ChumpChief ChumpChief requested a review from a team as a code owner August 19, 2024 23:52
@github-actions github-actions bot added area: examples Changes that focus on our examples dependencies Pull requests that update a dependency file public api change Changes to a public API base: main PRs targeted against main branch and removed 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 Aug 19, 2024
Copy link
Contributor

@scottn12 scottn12 left a comment

Choose a reason for hiding this comment

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

LGTM! Very satisfying to see all the return types added 😄

@@ -65,14 +70,15 @@ class MigrationTool implements IMigrationTool {
return "migrated";
} else if (this.acceptedMigration !== undefined) {
return "migrating";
// eslint-disable-next-line unicorn/no-negated-condition
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an interesting eslint rule 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm usually not a fan but will go along with it. Here though I decided to at least put off compliance since it would want me to swap just the last two clauses that are otherwise in chronological order.

@github-actions github-actions bot added 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 Aug 20, 2024
@ChumpChief ChumpChief enabled auto-merge (squash) August 20, 2024 15:36
@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Aug 20, 2024

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 457.84 KB 457.88 KB +35 Bytes
azureClient.js 555.02 KB 555.06 KB +49 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 258.65 KB 258.67 KB +14 Bytes
fluidFramework.js 403.74 KB 403.75 KB +14 Bytes
loader.js 134.2 KB 134.22 KB +14 Bytes
map.js 42.25 KB 42.25 KB +7 Bytes
matrix.js 146.42 KB 146.42 KB +7 Bytes
odspClient.js 523.16 KB 523.21 KB +49 Bytes
odspDriver.js 97.66 KB 97.68 KB +21 Bytes
odspPrefetchSnapshot.js 42.72 KB 42.73 KB +14 Bytes
sharedString.js 163.12 KB 163.13 KB +7 Bytes
sharedTree.js 394.25 KB 394.26 KB +7 Bytes
Total Size 3.29 MB 3.29 MB +245 Bytes

Baseline commit: 1a86c7d

Generated by 🚫 dangerJS against cbcfb54

Comment on lines 33 to 40
"build:docs": "api-extractor run --local",
"build:esnext": "tsc --project ./tsconfig.json",
"check:are-the-types-wrong": "attw --pack .",
"check:biome": "biome check .",
"check:exports": "api-extractor run --config ./api-extractor-lint.json",
"check:format": "npm run check:biome",
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
"ci:build:docs": "api-extractor run",
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove "build:docs" and "ci:build:docs" to avoid API extractor reports. api-extractor.json could also be removed.
I think the policy will be okay with you leaving the API linting via "check:exports": "api-extractor run --config ./api-extractor-lint.json" using api-extractor-lint.json.
All of the APIs are tagged @internal which doesn't seem to make sense. Add notes if this is intentional and explain the pattern.

  • If nothing will ever be publicly used (package could be in the @fluid-internal scope eventually) then remove all API related things - linting too.
  • If some might be public facing, then use a tag other than @internal to distinguish. The linting step should keep tagging honest (even without the report).

@github-actions github-actions bot removed the public api change Changes to a public API label Aug 20, 2024
@ChumpChief ChumpChief merged commit 73d6ba6 into microsoft:main Aug 22, 2024
33 checks passed
@ChumpChief ChumpChief deleted the MigrationRearrange branch August 22, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Changes that focus on our examples 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.

4 participants