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

Updates for GOV.UK Frontend v5.0.0 #333

Merged
merged 104 commits into from
Dec 8, 2023
Merged

Updates for GOV.UK Frontend v5.0.0 #333

merged 104 commits into from
Dec 8, 2023

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Jul 27, 2023

This PR contains all of the updates for the v5.0 release. It is the culmination of the following PRs which have been reviewed individually:

Version numbers

To support version numbers in package-lock.json from GitHub branch previews, initial commits include:

  1. Upgrade to Node.js 18
  2. Convert to "lockfileVersion": 3 for GitHub branch versions
  3. Install GOV.UK Frontend v5.0.0 preview

Upgrading package-lock.json to "lockfileVersion": 3 includes dependencies packages field by default:

"node_modules/govuk-frontend": {
  "version": "5.0.0-testing",
  "resolved": "git+ssh://git@github.com/alphagov/govuk-frontend.git#0f5c7975f759692ae91f88cc2227a9cefb307f17",
  "dev": true,
  "license": "MIT"
},

So we can continue accessing version in our SassDoc helpers:

--- A/lib/sassdocs_helpers.rb
+++ B/lib/sassdocs_helpers.rb
@@ -132,7 +132,7 @@
     # Get the current version of GOV.UK Frontend from the package.
     package_lock_file = File.read("./package-lock.json")
     package_lock = JSON.parse(package_lock_file)
+    @govuk_frontend_version = package_lock["packages"]["node_modules/govuk-frontend"]["version"]
-    @govuk_frontend_version = package_lock["dependencies"]["govuk-frontend"]["version"]
     @govuk_frontend_version
   end
 end

@netlify
Copy link

netlify bot commented Jul 27, 2023

Deploy Preview for govuk-frontend-docs-preview ready!

Name Link
🔨 Latest commit 7fa203a
🔍 Latest deploy log https://app.netlify.com/sites/govuk-frontend-docs-preview/deploys/65733d80bd857a0007d845d1
😎 Deploy Preview https://deploy-preview-333--govuk-frontend-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@colinrotherham
Copy link
Contributor Author

@romaricpascal Updated the description with your PR and had to rebase

This branch uses Node.js 18 + "lockfileVersion": 3 so it conflicts every Dependabot update 😣

I'll split those changes out into another PR so we can prevent this for the next Monday:

colinrotherham and others added 26 commits December 8, 2023 11:42
Organise JavaScript configuration documentation
Chrome and Safari say “JavaScript Console” but we’ll keep it generic like Firefox: https://firefox-source-docs.mozilla.org/devtools-user/browser_console/
Consolidate JavaScript configuration documentation
The two bullet points now share the wording used on “Configure components”
Co-Authored-By: Romaric <romaric.pascal@digital.cabinet-office.gov.uk>
Update JavaScript API Reference for v5
Improve ES module and alternative format documentation
@36degrees 36degrees marked this pull request as ready for review December 8, 2023 16:10
@36degrees 36degrees changed the title [WIP] GOV.UK Frontend v5.0.0 preview Updates for GOV.UK Frontend v5.0.0 Dec 8, 2023
@colinrotherham colinrotherham merged commit 45922fd into main Dec 8, 2023
5 checks passed
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.

Update how Design System and Frontend Docs consume GOV.UK Frontend
5 participants