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

migration: migrate converged packages to TS Solution style config #20597

Closed
39 tasks done
Hotell opened this issue Nov 12, 2021 · 6 comments
Closed
39 tasks done

migration: migrate converged packages to TS Solution style config #20597

Hotell opened this issue Nov 12, 2021 · 6 comments

Comments

@Hotell
Copy link
Contributor

Hotell commented Nov 12, 2021

Preparation:

What is this migration doing?

  • TypeScript:
    • transforms package TS setup to use TS Solution config files which will give us proper environment scoping and mitigate leaking of globals
    • resolves global types properly. Replaces custom-globals with static-types
  • Storybook:
    • automatically removes any @ts-ignore pragma in stories, that was necessary because of our current setup limitation. With that you'll get proper DX and type safety when authoring stories.
  • Build/CI:
    • adds type-check command that will properly check all package files against proper TS environment on CI.
    • build will transpile only implementation related files and will follow proper target down-leveling during transform (before everything was transpiled to ES5)
  • Testing:
    • checks if testing-library/jest-dom is being used and adjust typing setup for that
    • properly resolves e2e setup if present

Packages to migrate:

How to migrate

Make sure to check generator docs

  1. execute migration generator
    • from CLI:
      • one package at a time yarn nx workspace-generator migrate-converged-pkg --name='@fluentui/<package-name>'
      • multiple packages yarn nx workspace-generator migrate-converged-pkg --name='@fluentui/<package-name>,@fluentui/<package-name-two>,@fluentui/<package-name-three>'
    • via NX console VSCode plugin
  2. Create PR and make sure to add @microsoft/fluentui-react-build as reviewer to double check your changes
  3. Add link to your PR to this Epic's particular package in list above

FAQ

Why should I migrate my own/teams packages instead of one person doing the whole migration for me?

As we are in process of introducing new Dev Experience for how to approach migrations in general within monorepo, that could be implemented also for customers in the future, we wanna:

  • get feedback within the internal team
  • show you gradual approach with less efforts (small focused PRs)
  • distribute the knowledge about the new underlying tooling (nx) that we use within internal team

I wanna create new package, how should I proceed ?

  1. bootstrap new package via plop for convergence
  2. nx migration generator will be invoked automatically after plop

How can I check status progress in latest master ?

# run generator with --stats
yarn nx workspace-generator migrate-converged-pkg --stats

If you'll run into any issues while running the migration generator please open github issue.

Thank you and Happy migrating!

@Hotell
Copy link
Contributor Author

Hotell commented Nov 12, 2021

blocked by #20602

@ling1726
Copy link
Member

Currently blocked by #20720

@ling1726 ling1726 added the Status: Blocked Resolution blocked by another issue label Nov 23, 2021
@Hotell
Copy link
Contributor Author

Hotell commented Nov 23, 2021

Currently blocked by #20720

temporary "solution/workaround" provided - #20720 (comment)

@ling1726 ling1726 removed the Status: Blocked Resolution blocked by another issue label Nov 23, 2021
@ling1726
Copy link
Member

Currently blocked by #20720

temporary "solution/workaround" provided - #20720 (comment)

Yeah that workaround is good, thx 💪

@Hotell
Copy link
Contributor Author

Hotell commented Dec 3, 2021

all vNext packages has been migrated 🙌. thanks everyone involved in this. YOU ARE AWESOME !

@Hotell Hotell closed this as completed Dec 3, 2021
@microsoft microsoft locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants