Skip to content

Commit

Permalink
Merge pull request #35 from LandRegistry/govuk-57
Browse files Browse the repository at this point in the history
2.1.0-rc.1
  • Loading branch information
matthew-shaw authored Dec 12, 2024
2 parents baaaadf + 89e08fe commit 47d8471
Show file tree
Hide file tree
Showing 23 changed files with 6,432 additions and 22,386 deletions.
18 changes: 18 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100,
"safari": 15,
"firefox": 91
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
63 changes: 31 additions & 32 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ name: "CodeQL"

on:
push:
branches: [ "main", "staging" ]
branches: ["main", "staging"]
pull_request:
branches: [ "main", "staging" ]
branches: ["main", "staging"]
schedule:
- cron: '42 15 * * 6'
- cron: "42 15 * * 6"

jobs:
analyze:
Expand All @@ -40,45 +40,44 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]
language: ["javascript-typescript"]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
8 changes: 4 additions & 4 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency review'
name: "Dependency review"
on:
pull_request:
branches: [ "main", "staging" ]
branches: ["main", "staging"]

# If using a dependency submission action in this workflow this permission will need to be set to:
#
Expand All @@ -27,9 +27,9 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
- name: "Checkout repository"
uses: actions/checkout@v4
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@v4
# Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options.
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/iron
node-version: lts/jod
- run: npm ci
- run: npm run lint
- run: npm run test
Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/iron
node-version: lts/jod
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
test:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/iron
node-version: lts/jod
cache: npm
- name: Install
run: npm ci
Expand All @@ -32,12 +32,12 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/iron
node-version: lts/jod
cache: npm
- name: Install
run: npm ci
- name: Build package
run: |
chmod +x ./bin/build-release.sh
./bin/build-release.sh
chmod +x ./bin/build-release.sh
./bin/build-release.sh
shell: bash
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/iron
lts/jod
17 changes: 12 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ const webpackConfig = require("../webpack.config");
const CopyPlugin = require("copy-webpack-plugin");

module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx)"],
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx)"],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-docs",
"@storybook/addon-a11y",
"@storybook/addon-webpack5-compiler-babel",
"@chromatic-com/storybook",
],
framework: "@storybook/html",
core: {
builder: "@storybook/builder-webpack5",

framework: {
name: "@storybook/html-webpack5",
options: {},
},

webpackFinal: async (config, { configType }) => {
// config.resolve.alias = { ...webpackConfig.resolve.alias };

Expand All @@ -26,7 +31,7 @@ module.exports = {
// to: "./node_modules/govuk-frontend/govuk-esm",
// },
],
})
}),
);

config.module.rules = [
Expand Down Expand Up @@ -65,4 +70,6 @@ module.exports = {

return config;
},

docs: {},
};
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export const parameters = {
disable: true,
},
};
export const tags = ["autodocs"];
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased] - yyyy-mm-dd

## [2.1.0-rc.1] - 2024-12-11

### Changed

- Updated node version from `lts/iron` to `lts/jod`
- Updated `govuk-frontend` to `5.7.1`
- Updated all other dependencies to latest major versions
- Prettier formatted everything
- Added `node_modules/govuk-frontend/dist` to Sass CLI load-path to simplify `@import` statements
- Importing `index.scss` instead of `all.scss` as per guidance: <https://frontend.design-system.service.gov.uk/import-css/#import-using-sass>
- Updated to latest GOV.UK Frontend macro options and test fixtures
- Rewritten how `test-fixtures.js` and `update-fixtures.js` uses `glob` as part of upgrade from v8 to v11

## [2.0.0] - 2024-06-10

No changes since `2.0.0-rc.1`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Latest release](https://img.shields.io/github/v/release/LandRegistry/hmlr-frontend?style=flat-square&logo=github&logoColor=white&sort=semver)](https://github.com/LandRegistry/hmlr-frontend/releases)
[![NPM version](https://img.shields.io/npm/v/@hmlr/frontend?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@hmlr/frontend)
[![GovUK Frontend version](https://img.shields.io/npm/dependency-version/@hmlr/frontend/govuk-frontend?style=flat-square)](https://www.npmjs.com/package/govuk-frontend)
[![GOV.UK Frontend version](https://img.shields.io/npm/dependency-version/@hmlr/frontend/govuk-frontend?style=flat-square)](https://www.npmjs.com/package/govuk-frontend)
[![Node version](https://img.shields.io/node/v-lts/@hmlr/frontend?style=flat-square&logo=nodedotjs&logoColor=white)](https://github.com/LandRegistry/hmlr-frontend/blob/main/.nvmrc)
[![Licence](https://img.shields.io/github/license/LandRegistry/hmlr-frontend?style=flat-square)](https://github.com/LandRegistry/hmlr-frontend/blob/main/LICENCE)

Expand All @@ -27,7 +27,7 @@ npm start

This package includes all the frontend styles from GOV.UK in addition to HM Land Registry styles.

The generated CSS can be used as a direct replacement for the GOV.UK stylesheet which ensures that the HM Land Registry styles will be build on top of a complient version of the GOV.UK frontend styles.
The generated CSS can be used as a direct replacement for the GOV.UK stylesheet which ensures that the HM Land Registry styles will be build on top of a complient version of the GOV.UK Frontend styles.

## LFS

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Documentation

* [Create a new release](./release.md)
- [Create a new release](./release.md)

## Relationship to other projects

Expand Down
16 changes: 4 additions & 12 deletions govuk-prototype-kit.config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{
"nunjucksPaths": [
"/"
],
"scripts": [
"/hmlr/all.js"
],
"assets": [
"/hmlr/assets"
],
"sass": [
"/hmlr/_prototype-kit.scss"
]
"nunjucksPaths": ["/"],
"scripts": ["/hmlr/all.js"],
"assets": ["/hmlr/assets"],
"sass": ["/hmlr/_prototype-kit.scss"]
}
Loading

0 comments on commit 47d8471

Please sign in to comment.