Skip to content

Conversation

@spmonahan
Copy link
Contributor

Current Behavior

There is no convenient way to generate test fixtures.

New Behavior

Adds a command to build test fixtures, allowing for easy fixture generation should we want alternates to the defaults.

Provides default fixture generation with two variants for t-shirt sizes xs, s, m, l, and xl (i.e., "xs_1", "xs_2"). Default fixtures are generated when running commands that may rely on fixtures existing.

This commit also reworks the ts-node implementation a bit. Now the CLI app is a pure ESM application. This is supported by Node 16 but required some changes. In particular:

  1. No more require() calls.
  2. Script imports must have an extension. This is why there are import foo from 'foo.js' imports now.

This is required because random-seedable, the node module we use for randomness, is a pure ESM module and since we do not transpile node_modules the simplest thing to do was go all-in on ESM for the CLI.

Adds a command to build test fixtures, allowing for easy fixture
generation should we want alternates to the defaults.

Provides default fixture generation with two variants for t-shirt sizes
xs, s, m, l, and xl. Default fixtures are generated when running commands
that may rely on fixtures existing.

This commit also reworks the `ts-node` implementation a bit. Now the CLI
app is a pure ESM application. This is supported by Node 16 but required
some changes. In particular:

1. No more `require()` calls.
2. Script imports must have an extension. This is why there are
   `import foo from 'foo.js'` imports now.

This is required because `random-seedable`, the node module we use for
randomness, is a pure ESM module and since we do not transpile
node_modules the simplest thing to do was go all-in on ESM for the CLI.
@fabricteam
Copy link
Collaborator

📊 Bundle size report

🤖 This report was generated against 53f71701af6d88abf66d0cb0a73543f97bd4da51

@size-auditor
Copy link

size-auditor bot commented Sep 23, 2022

Asset size changes

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

Baseline commit: 53f71701af6d88abf66d0cb0a73543f97bd4da51 (build)

@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 586c358:

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

@spmonahan spmonahan merged commit 7ab1b2a into microsoft:master Sep 26, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 28, 2022
* master: (21 commits)
  chore: Migrate react-avatar to use new build (microsoft#24969)
  applying package updates
  chore(react-input, react-textarea): Deprecating filled with shadow appearance variants (microsoft#24900)
  fix: v8 Dropdown no longer sets incorrect and unnecessary aria-activedescendant (microsoft#24593)
  feat: v0 Tooltip migration from v9 (microsoft#24908)
  chore: bump devDeps to fix critical security vulnerability (microsoft#24891)
  Fixing Tree chart issues (microsoft#24752)
  init: new package react-avatar-context (microsoft#24968)
  ci(.github): add issues write permisions to triage-bot worflow (microsoft#24963)
  applying package updates
  fix(Toolbar): close previous submenu when opening another submenu (microsoft#24836)
  fix: update non-focus-trap Popover role to be group (microsoft#24897)
  feat: Avatar's aria label includes 'active' or 'inactive' when using the active prop (microsoft#24901)
  feat(scripts): implement triage-bot module (microsoft#24911)
  chore: bump @octokit/rest to v18 (microsoft#24919)
  stress test: add "build-fixture" command (microsoft#24928)
  BREAKING-CHANGE: new ChatMessageContent for style caching (microsoft#24691)
  bugfix: fix changefile to properly update version of react-components with a patch (microsoft#24949)
  feat(scripts): enable strict checking for additional sub-folders(packages) (microsoft#24526)
  chore: exports DialogContent as unstable (microsoft#24943)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
Adds a command to build test fixtures, allowing for easy fixture
generation should we want alternates to the defaults.

Provides default fixture generation with two variants for t-shirt sizes
xs, s, m, l, and xl. Default fixtures are generated when running commands
that may rely on fixtures existing.

This commit also reworks the `ts-node` implementation a bit. Now the CLI
app is a pure ESM application. This is supported by Node 16 but required
some changes. In particular:

1. No more `require()` calls.
2. Script imports must have an extension. This is why there are
   `import foo from 'foo.js'` imports now.

This is required because `random-seedable`, the node module we use for
randomness, is a pure ESM module and since we do not transpile
node_modules the simplest thing to do was go all-in on ESM for the CLI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants