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

stress test: convert cli scripts to typescript #24915

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

spmonahan
Copy link
Contributor

@spmonahan spmonahan commented Sep 22, 2022

Current Behavior

Stress Test CLI scripts are written in JS with JSDoc type annotations. While this mostly works there is a fair bit of friction compared to using Typescript. Additionally, the rest of the application is written in TS which prevents scripts from using application source code.

New Behavior

Stress Test CLI scripts are written in Typescript. This allows:

  1. Scripts to easily be type checked with the type-check command.
  2. Scripts to use application source code. For example, we can add a fixture command to generate fixtures with the RandomTree class that is written in Typescript.

This PR also refactors the CLI commands a bit based on usage.

Related Issue(s)

Fixes #24724

This change gives us better type checking (scripts are now covered by
the `type-check` command) while also allowing interop with the source
code. For example, we can add a command to generate fixtures from the
`RandomTree` class. This was not possible when the scripts were written
in JS as the source code is otherwise in Typescript.
@fabricteam
Copy link
Collaborator

📊 Bundle size report

🤖 This report was generated against 3f105cca41d951f161edbb90be116565311e72d1

@codesandbox-ci
Copy link

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 0d146b0:

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

@size-auditor
Copy link

size-auditor bot commented Sep 22, 2022

Asset size changes

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

Baseline commit: 3f105cca41d951f161edbb90be116565311e72d1 (build)

@spmonahan spmonahan merged commit 22bc5f9 into microsoft:master Sep 22, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 24, 2022
* master: (29 commits)
  chore(react-tooltip): update package scaffold (microsoft#24927)
  chore(react-popover): update package scaffold (microsoft#24925)
  chore(react-overflow): update package scaffold (microsoft#24926)
  chore(react-menu): update package scaffold (microsoft#24924)
  applying package updates
  chore: Bump workspace-tools to 0.27.0 (microsoft#24914)
  fix: Make Menu openOnHover prop work again (microsoft#24899)
  stress test: convert cli scripts to typescript (microsoft#24915)
  update package manifest to only include v8 controls (microsoft#24839)
  Stress Test: add random tree (microsoft#24896)
  chore: Expand scope of dependency mismatch generator (microsoft#24880)
  chore: run dependency mismatch generator in release pipeline (microsoft#24881)
  chore: scaffolds react-trigger package (microsoft#24887)
  applying package updates
  chore: a11y docs structure update (microsoft#24871)
  feat: add popupProps to Modal component to allow override internal Popup props (microsoft#24693)
  fix: Set github user in nightly release pipeline (microsoft#24850)
  chore(react-aria): restructure folder organization (microsoft#24884)
  ci(github): fix invalid json string in issues.yml v2 (microsoft#24886)
  Add react-components/unstable to tsconfig aliases (microsoft#24878)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
This change gives us better type checking (scripts are now covered by
the `type-check` command) while also allowing interop with the source
code. For example, we can add a command to generate fixtures from the
`RandomTree` class. This was not possible when the scripts were written
in JS as the source code is otherwise in Typescript.
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.

Stress Test: switch scripts to Typescript
5 participants