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: add support for v5 of the Design System #528

Merged
merged 10 commits into from
Jan 8, 2024

Commits on Dec 11, 2023

  1. feat: add support for v5 of the Design System

    Allows the Pattern Library to be used with v5 of the Design System, and
    uses v5 by default in the documentation.
    
    This currently continues to support IE8 by providing a copy of the
    `govuk-if-ie8` mixin.
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    498d3ec View commit details
    Browse the repository at this point in the history
  2. fix: use type="module for scripts

    This is how the GOV.UK Design System recommends installing v5+.
    Doing so also ensures that we can support ES modules for our users, and
    highlighted an issue with an undefined variable in the Password reveal JavaScript.
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    7176180 View commit details
    Browse the repository at this point in the history
  3. fix: stop directly requiring govuk-frontend SCSS

    Directly requiring individual govuk-frontend SCSS files is risky, as govuk-frontend could
    move their internal files and break our compatibility. This has happened in v5 of
    govuk-frontend, and we cannot support both ≤v4 and v5 at the same time with the current
    method.
    
    Instead, we will require users to separately import govuk-frontend before moj-frontend. In
    reality users should already be doing this, as using moj-frontend code without govuk-frontend
    will cause an inconsistent UI. Anyone who _isn't_ doing so already will just need a one line
    import:
    
    ```scss
    @import "node_modules/govuk-frontend/dist/govuk/all";
    ```
    
    To still be able to build our distributable version, which also requires govuk-frontend code
    to be built, create a wrapper `dist.scss` with the specific imports required.
    
    BREAKING CHANGE: If you are building moj-frontend from SCSS, you must include govuk-frontend
    beforehand
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    672418c View commit details
    Browse the repository at this point in the history
  4. build: start testing against Node 20

    It's the current LTS so we should be using it in tests
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    aea5cd7 View commit details
    Browse the repository at this point in the history
  5. build: bump local version to v2.0.0-beta.0

    Switch to v5.0.0 of `govuk-frontend` now that it has been released
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    59c4440 View commit details
    Browse the repository at this point in the history
  6. build: support v4 and v5 of govuk-frontend

    To give people an easier upgrade path rather than needing to do a paired upgrade.
    
    BREAKING CHANGE: if you build your CSS from this package's SCSS, you may need to update your import
    path
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    bb77562 View commit details
    Browse the repository at this point in the history
  7. build: remove support for IE8

    Stop building IE8 CSS distributions. Remove IE8-specific rules from SCSS.
    
    BREAKING CHANGE: This package no longer provides support for IE8
    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    5e75ed7 View commit details
    Browse the repository at this point in the history
  8. build: bump version

    gregtyler committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    1463f36 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. build: bump version

    To v2.0.0
    gregtyler committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    8320172 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aac11d2 View commit details
    Browse the repository at this point in the history