Skip to content

migration: migrate converged packages to new DX (1st stage) #18579

@Hotell

Description

@Hotell

Preparation:

What is new DX (1st stage) ?

  • Tooling: only source of truth for package resolution/mapping is tsconfig.base.json, that uses TSpath aliases
  • TypeScript: go to definition goes to actual source instead to generated declaration files
  • Plug n play: clone/update your local copy and start working without need to build anything (jest-serializer-make-styles and babel-make-styles needs still manual build node packages within repo are required to be built first before using (blocking no-build dev loop mode) #18357)
  • Task runner:
    • simplified package.json#scripts tasks
    • running storybook/start and test will invoke native storybook and jest binaries respectively
  • Storybook:
    • every package uses collocated stories with local setup that inherits from global /.storybook configuration.
    • this makes running storybook much faster and also enables for experimentation on your local package level without affecting rest
  • Testing:
    • tests are setup via locally scoped config that inherits from root /jest.preset.js.
    • all projects are registered via jest projects in root /jest.config.js which enables also easy debugging from within your IDE.

Packages that need migration

How to migrate

  1. execute migration generator
    • from CLI yarn nx workspace-generator migrate-converged-pkg --name='@fluentui/<package-name>'
    • via NX console VSCode plugin
  2. Apply any manual adjustments that might be needed. Check documentation
  3. Create PR and make sure to add @microsoft/fluentui-react-build as reviewer to double check your changes

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 early 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 ?

  • bootstrap new package via plop for convergence
  • follow steps mentioned above 🙌

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

Thank you and Happy migrating!

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions