Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"presets": [["@babel/preset-env", { "targets": { "browsers": ["ie >= 11", "safari > 9"] } }], "@babel/preset-react", "@babel/preset-typescript"],
"plugins": ["react-hot-loader/babel", "@babel/plugin-proposal-class-properties", "transform-optional-chaining"]
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.5%, last 2 versions, Firefox ESR, not dead"
}
],
["@babel/preset-react", { "runtime": "automatic" }],
"@babel/preset-typescript"
]
}
89 changes: 53 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,55 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1

jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:7.10

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: yarn test
build:
docker:
- image: cimg/node:24.18.0

working_directory: ~/repo

steps:
- checkout

- run:
name: Pin Yarn
command: |
corepack enable
corepack prepare yarn@1.22.22 --activate

- restore_cache:
keys:
- v2-yarn-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
- v2-yarn-

- run:
name: Install dependencies
command: yarn install --frozen-lockfile

- save_cache:
key: v2-yarn-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn

- run:
name: Test
command: yarn test

- run:
name: Quality ratchets
command: yarn quality

- run:
name: Production build
command: |
mkdir -p /tmp/build-reports
yarn build 2>&1 | tee /tmp/build-reports/build-output.txt

- run:
name: Report artifact size
command: |
node scripts/bundle-report.mjs --out /tmp/build-reports/bundle-report.json
cat /tmp/build-reports/bundle-report.json

- store_artifacts:
path: /tmp/build-reports
destination: build-reports
21 changes: 0 additions & 21 deletions .eslintignore

This file was deleted.

159 changes: 0 additions & 159 deletions .eslintrc.cjs

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Frontend verification

on:
pull_request:
push:
branches:
- master
workflow_dispatch:

concurrency:
group: frontend-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version-file: .nvmrc

- name: Pin Yarn
run: |
corepack enable
corepack prepare yarn@1.22.22 --activate

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install Chromium
run: yarn playwright install --with-deps chromium

- name: Run frontend tests
run: yarn test

- name: Run quality ratchets
run: yarn quality

- name: Validate performance harness
if: ${{ hashFiles('scripts/performance/experience-*.test.mjs') != '' }}
run: yarn test:performance

- name: Build production assets
run: yarn build

- name: Report bundle and precache sizes
run: yarn analyze:bundle

- name: Run browser and offline journeys
run: yarn test:e2e
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.18.0
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
FROM node:10-alpine
FROM node:24-alpine

# Create app directory
WORKDIR /usr/src/app

COPY yarn.lock ./
COPY package*.json ./
RUN corepack enable

RUN yarn
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

COPY . .

RUN yarn build

EXPOSE 80
ENTRYPOINT yarn serve
CMD ["yarn", "serve"]
Loading