fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Feature]: migrate to nx

Open Hotell opened this issue 1 year ago • 0 comments

Library

whole monorepo

Describe the feature that you would like added

nx suites well for our needs as a robust core building blog for best possible mix of great DX, unified tooling, excellent task orchestrator etc under "1 package". Recently nx also added release tool and support for other technologies beyond JS ecosystem which matches with what we would like have in our arsenal ( with more JS tooling shifting towards other languages ).

We already have nx in repo for quite some time, which was used only for generators and various codemods automations.

in recent months we did various preparations for actual nx migration

  • adding project.json to every project
  • replacing lerna functionality with nx
  • bootstraped workspace-plugin

Going forward we wanna completely move to nx coherent DX in all areas.

Have you discussed this feature with our team

v-build

Additional context

No response

Tasks

  • [x] replace lerna with nx release / https://github.com/microsoft/fluentui/issues/30265
  • [x] migrate to nx 18,19 / https://github.com/microsoft/fluentui/pull/31892
    • migrate (later)
      • eslint v8 and ts-eslint v7 https://github.com/microsoft/fluentui/issues/30334
  • [x] normalize project.json names to not include @fluentui scope / https://github.com/microsoft/fluentui/pull/31893
  • [x] normalize target naming across monorepo
    • [x] https://github.com/microsoft/fluentui/pull/31926
    • [x] https://github.com/microsoft/fluentui/pull/32031
  • [x] migrate from lage to nx for task orchestration / https://github.com/microsoft/fluentui/pull/31949
  • [x] update yarn start experience / https://github.com/microsoft/fluentui/pull/32108
  • [x] update githooks and pre/post install scripts / https://github.com/microsoft/fluentui/pull/32169
  • [x] remove all unnecessary npm aliases from root package.json / https://github.com/microsoft/fluentui/pull/32286
  • [x] improve perf of task execution for v9 ( example - no need to run build before test ) / https://github.com/microsoft/fluentui/pull/32280
  • [x] enable inferred task in v-build only owned projects for testing / https://github.com/microsoft/fluentui/pull/32337
  • [x] enable nx sourceAnalyzer in order to build dependency graph instead of relying on static package.json dependency definitions / https://github.com/microsoft/fluentui/pull/32359
  • [x] implement just-scripts replacement for v9 related tasks / https://github.com/microsoft/fluentui/pull/32299
    • [x] build executor
      • [x] base https://github.com/microsoft/fluentui/pull/32439
      • [x] d.ts emit https://github.com/microsoft/fluentui/pull/32976
    • [x] generate-api executor / https://github.com/microsoft/fluentui/pull/32418
    • [x] type-check executor / https://github.com/microsoft/fluentui/pull/32370
    • [x] clean executor / https://github.com/microsoft/fluentui/pull/32401
    • [x] verify-packaging executor / https://github.com/microsoft/fluentui/pull/32403
    • [x] lint - we will use inferred lint task created by @nx/eslint/plugin
    • [x] test - we will use inferred lint task created by @nx/jest/plugin
    • [x] bundle-size - keep as is (using monosize cli directly )
    • [x] e2e - keep as is ( using cypress cli directly )
    • [x] storybook - keep as is ( using storybook cli directly )
    • [x] test-ssr - keep as is ( using test-ssr cli directly )
    • [x] code-style - replace with format target ( will use nx format or prettier CLI directly ) / https://github.com/microsoft/fluentui/pull/32371
  • [ ] implement workspace plugin for inferred tasks
    • [x] https://github.com/microsoft/fluentui/pull/32393
    • [ ] https://github.com/microsoft/fluentui/pull/33028
  • [ ] enable inferred workspace plugin and remove all npm-alias/just-script artifacts
    • [ ] scripts,tools https://github.com/microsoft/fluentui/pull/33019
    • [ ] v9

Priority

None

Related Issues

  • https://github.com/microsoft/fluentui/issues/25467
  • https://github.com/nrwl/nx/issues/21037 (cant repro in nx 19)
  • https://github.com/nrwl/nx/issues/19627 (cant repro in nx 19)

NX issues

  • https://github.com/nrwl/nx/issues/26903
  • https://github.com/nrwl/nx/issues/27143

NX Features (missing/requested)

  • https://github.com/nrwl/nx/discussions/26899
  • https://github.com/nrwl/nx/discussions/26901
  • https://github.com/nrwl/nx/discussions/27144
  • https://github.com/nrwl/nx/discussions/27712

Issues that can be closed after this Epic is implemented:

  • [x] https://github.com/microsoft/fluentui/issues/26147
  • [x] https://github.com/microsoft/fluentui/issues/31920
  • [x] https://github.com/microsoft/fluentui/pull/31710
  • [x] https://github.com/microsoft/fluentui/issues/21686

Hotell avatar Jan 09 '24 17:01 Hotell