Skip to content

feat: Generator for package move migration#22506

Merged
TristanWatanabe merged 14 commits into
microsoft:masterfrom
TristanWatanabe:create-migrate-package-generator
Apr 21, 2022
Merged

feat: Generator for package move migration#22506
TristanWatanabe merged 14 commits into
microsoft:masterfrom
TristanWatanabe:create-migrate-package-generator

Conversation

@TristanWatanabe

@TristanWatanabe TristanWatanabe commented Apr 14, 2022

Copy link
Copy Markdown
Member

New Behavior

  • NX generator that allows us to move packages to another location within the monorepo. Part of group vNext to common folder (as people will start check vNext) #22427.
    • Generator allows for one to one package moves. Runningyarn nx workspace-generator move-packages --name=@fluentui/react-text --destination=test/react-text will move all contents of the @fluentui/react-text package to packages/test/react-text.
    • Generator also allows for batch migration of all v9 packages to a new subfolder within the packages folder using the --allConverged scope.
    • Generator has the option of batch migrating all v8 packages as well via the --allV8 scope but the actual migration will actually fail as of now due to the current nature of v8's DX.

Demo

Note: generator has been renamed to move-packages since recording of video.

index.ts.-.v8-buildwork.WSL_.Ubuntu.-.Visual.Studio.Code.2022-04-13.20-45-03.mp4

@fabricteam

fabricteam commented Apr 14, 2022

Copy link
Copy Markdown
Collaborator

📊 Bundle size report

🤖 This report was generated against f3c6462af3efa4f8cbe32d289e8e3d4a450b8a3b

@codesandbox-ci

codesandbox-ci Bot commented Apr 14, 2022

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit dfc30e2:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor

size-auditor Bot commented Apr 14, 2022

Copy link
Copy Markdown

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: f3c6462af3efa4f8cbe32d289e8e3d4a450b8a3b (build)

@TristanWatanabe TristanWatanabe marked this pull request as ready for review April 14, 2022 20:13
@TristanWatanabe TristanWatanabe requested a review from a team as a code owner April 14, 2022 20:13
Comment thread tools/generators/move-packages/index.ts
@ling1726

Copy link
Copy Markdown
Contributor

are the TS path aliases updated during the move ? They are based off path so should break if the packages are moved

@TristanWatanabe

Copy link
Copy Markdown
Member Author

are the TS path aliases updated during the move ? They are based off path so should break if the packages are moved

Yup the path aliases are automatically updated

Comment thread tools/generators/move-packages/index.ts Outdated
Comment thread tools/generators/move-packages/index.ts Outdated
Comment thread tools/generators/move-packages/index.ts
@TristanWatanabe TristanWatanabe merged commit eab6f0f into microsoft:master Apr 21, 2022
@TristanWatanabe TristanWatanabe deleted the create-migrate-package-generator branch April 21, 2022 21:58
// the package name with a new name based on the "destination" flag. This check
// reverts the changes it makes.
updateReadMe(tree, schema);
updateStorybookTypeImport(tree, schema);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

follow up: we'll need to handle also codeowners file , btw this stuff is DOPE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants