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

feat!: Webpack/Jest to Vite/Vitest migration #2716

Merged
merged 40 commits into from
Mar 5, 2024

Commits on Jan 18, 2024

  1. chore(react): upgrade to 18

    - react/react-dom and other react-related depdencies updated
    - @testing-library/react-hooks removed as it is now merged into @testing-library/react
    - focus-trap-react updated to 9.0.2 (upgrading beyond this version will break IE11 compatibility)
    - tabbable.js mock file added to fix JSDom testing compatibility issues with Modal (with a comment added to Modal test file)
    - DatePicker tests updated to wait on the next expect after async actions such as open/close/unmount
    - Various type fixes including...
    - SocialLink logic tweaked to fix type issues
    - Prop typing on InPageNavigation updated to omit the content property from the joined JSX.IntrinsicElements['div'] type as it is being overidden (not combined) to prevent type issues
    jpandersen87 committed Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a6c80ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b008312 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. match webpack output plus more

    - match original package output
    - add all other possible bundle formats
    jpandersen87 committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    260eadf View commit details
    Browse the repository at this point in the history
  2. migrate jest to vitest

    - jest and related jest dependencies and config removed
    - vitest and plugins added
    - styleMock no longer needed (vitest has css option)
    - other mocks updated to ESM syntax
    - project custom types updated
    - snapshots updated (comments and label format differences)
    - tests updated to reference vi instead of jest
    - tests' usage of mocking updated (async with helper for importActual)
    - tests' usage of creating mocked vars updated (vi has helper function `mocked` for typescript typing)
    - bad path for a uswds svg fixed
    - other minor fixes due to jest/vitest variances
    jpandersen87 committed Jan 19, 2024
    Configuration menu
    Copy the full SHA
    6e56622 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2024

  1. refresh yarn.lock, fix configs, fix tests

    - yarn.lock recreated from scratch
    - type fixes
    - FocusTrap component mocked (fix JSDom incompatibility)
    - test fixes
    - linting fixes
    - test coverage options added
    jpandersen87 committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    6ee0620 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2024

  1. first pass storybook webpack to vite

    - sb init ran which added some new defaults such as...
    - addons: interactions, links, onboarding, blocks, react-vite, test
    - eslint plugin with extension of recommended rules
    - sb config replacement for vite
    jpandersen87 committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    b737ffd View commit details
    Browse the repository at this point in the history
  2. dependency updates, sb config fixes

    - babel dependencies removed
    - sb onboarding addon removed
    - focus-trap-react updated to latest
    - happo dependencies updated to latest
    - all sb dependencies on latest version
    - vite svgr config fixed to target `*.svg?svgr` urls
    - sb `custom-styles.scss` updated to use project's `styles/_uswds-theme.scss` file for settings
    - sb `public` folder added to refreshed sb config
    jpandersen87 committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    a9e04fd View commit details
    Browse the repository at this point in the history
  3. update github workflows

    - remove sb dependencies from dependabot ignore
    - remove node 16 from build-and-test matrix
    - package.json engine updated to node >= 18
    jpandersen87 committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    fd11498 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a67a0b9 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. fix eof

    jpandersen87 committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    e06aa28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e47ccec View commit details
    Browse the repository at this point in the history
  3. use ReactNode

    jpandersen87 committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    1c4a2c9 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. Configuration menu
    Copy the full SHA
    cffed19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d9e4b3 View commit details
    Browse the repository at this point in the history
  3. husky added for git hooks

    - precommit checks for lint, format:fix, and test (changed only)
    jpandersen87 committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    adbc25d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    729df12 View commit details
    Browse the repository at this point in the history
  5. add vitest linting, fix lint warn/err

    - pascalCase for story names
    - identical test names in same block
    - expect methods not being properly called
    jpandersen87 committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    290c0ba View commit details
    Browse the repository at this point in the history
  6. fix tests

    - fix FooterExtendedNavList tests to render with css definition of "hidden" class in order to assert visibility on elements
    - missing testid added to masthead test
    - filepreview skipped test area for generic previews updated to test across all types/extensions scenarios properly and no longer skipped
    jpandersen87 committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    fd32f3d View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2024

  1. cleanup vite config

    - use `--mode uswds` to build uswds
    jpandersen87 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    e1931c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f2ed1e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c5d6bf View commit details
    Browse the repository at this point in the history
  4. merge fixes

    jpandersen87 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    2872cf8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2b8b7e8 View commit details
    Browse the repository at this point in the history
  6. fix serversidetest

    jpandersen87 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    f01f417 View commit details
    Browse the repository at this point in the history
  7. Revert "update happo config to esm syntax"

    This reverts commit 729df12.
    jpandersen87 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    03cdc59 View commit details
    Browse the repository at this point in the history
  8. rename happo to cjs

    jpandersen87 committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    6dcc376 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    61863f7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1e82459 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    2b49b4a View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    c721823 View commit details
    Browse the repository at this point in the history
  2. add bundles test, fix test warnings

    - added bundles test that is ran after build to do import and render checks
    - some act() warnings were fixed in tests
    - some rendering in root warnings were fixed (affected tests altered to expect on container element)
    jpandersen87 committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    1fe2374 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2918dc2 View commit details
    Browse the repository at this point in the history
  4. post-merge lockfile

    jpandersen87 committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    199de2f View commit details
    Browse the repository at this point in the history
  5. fix test with race condition

    - control firing of loadend event for filepreview test to prevent race condition
    jpandersen87 committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    b5b0ec9 View commit details
    Browse the repository at this point in the history
  6. config cleanup

    jpandersen87 committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    92be343 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    33f9a42 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2ed071f View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    fc1545f View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Configuration menu
    Copy the full SHA
    dce3ae8 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Configuration menu
    Copy the full SHA
    ad1f4fa View commit details
    Browse the repository at this point in the history