Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
8 changes: 4 additions & 4 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Refer to specific instruction files in `.github/instructions/` for detailed guid

### Environment Setup

- Node.js 22+ is required (check `.node-version` file)
- Install Node.js 22: `curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs`
- Or use nvm: `nvm install 22 && nvm use 22`
- Node.js 24+ is required (check `.node-version` file)
- Install Node.js 24: `curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash - && sudo apt-get install -y nodejs`
- Or use nvm: `nvm install 24 && nvm use 24`

### Bootstrap, Build, and Test the Repository

Expand Down Expand Up @@ -144,7 +144,7 @@ Refer to specific instruction files in `.github/instructions/` for detailed guid
### Required Validation Steps

- Always run `npm run format` and `npm run lint` before committing changes
- The CI pipeline (.github/workflows/linter.yml) runs `npm run lint -- --quiet` and `npm run unimported`
- The CI pipeline (.github/workflows/linter.yml) runs `npm run lint -- --quiet` and `npm run knip`
- Application loads successfully showing CARE healthcare facility search and login interface
- Build produces a functional PWA with service worker

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cloudflare-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "22.x"
node-version: "24"
cache: "npm"

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
# Fetch full history for potential rollback operations
fetch-depth: 0

- name: Setup Node.js 22
uses: actions/setup-node@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
node-version: "24"
cache: "npm"

- name: Install Dependencies
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/daily-playwright-improver.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .github/workflows/daily-playwright-improver.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
schedule:
- cron: "0 3 * * 1-5" # 03:00 UTC, weekdays only
workflow_dispatch:
# Only run on the upstream repository. Forks don't have COPILOT_GITHUB_TOKEN
# configured, so scheduled runs on forks would otherwise fail loudly and spam
# fork maintainers with daily failure notifications. This condition short-circuits
# every job cleanly (workflow shows as skipped, no error) on any repo other than
# ohcnetwork/care_fe.
if: ${{ github.repository == 'ohcnetwork/care_fe' }}
permissions: read-all
tools:
github:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "22"
node-version: "24"
cache: "npm"

- name: Install dependencies
Expand All @@ -36,5 +36,5 @@ jobs:
- name: Run unit tests
run: npm run test:unit

- name: Run unimported
run: npm run unimported
- name: Run knip
run: npm run knip
6 changes: 3 additions & 3 deletions .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:
cancel-in-progress: true

env:
NODE_VERSION: "22"
NODE_VERSION: "24"
REACT_CARE_API_URL: http://localhost:9000
BACKEND_STARTUP_TIMEOUT: 120
TEST_SHARDS: 3
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
done

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/pr-title-jira.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PR Title JIRA Validation

on:
pull_request:
types: [opened, reopened, edited]

permissions: {}
jobs:
validate-jira-ticket:
runs-on: ubuntu-24.04-arm
if: >
!contains(fromJSON('["renovate[bot]", "dependabot[bot]", "dependabot-preview[bot]"]'), github.event.pull_request.user.login) &&
github.event.pull_request.head.repo.full_name == github.repository

steps:
- name: Validate JIRA Ticket in PR Title
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
// Configure JIRA project keys here
const jiraProjectKeys = ['ENG', 'QA'];

const prTitle = context.payload.pull_request.title;

// Check that title starts with [PROJECT-NUMBER] format
const pattern = new RegExp(`^\\[(${jiraProjectKeys.join('|')})-\\d+\\]`, 'i');

if (!pattern.test(prTitle)) {
const examples = jiraProjectKeys.map(k => `[${k}-123]`).join(', ');
core.setFailed(
`PR title must start with a JIRA ticket in brackets.\n` +
`Expected format: [PROJECT-NUMBER] title\n` +
`Examples: ${examples}`
);
}
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit Tests

on:
pull_request:
branches:
- develop
merge_group:

jobs:
unit-tests:
runs-on: ubuntu-24.04-arm
permissions:
contents: read

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

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "24"

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm run test:unit
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22
v24
87 changes: 0 additions & 87 deletions .unimportedrc.json

This file was deleted.

6 changes: 2 additions & 4 deletions care.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import { NonEmptyArray } from "@/Utils/types";
import Decimal from "decimal.js";
import { CountryCode } from "libphonenumber-js/types.cjs";
import { CountryCode } from "libphonenumber-js";

const env = import.meta.env;

Expand Down Expand Up @@ -96,9 +96,7 @@ const careConfig = {

// Plugins related configs...
sentry: {
dsn:
env.REACT_SENTRY_DSN ||
"https://8801155bd0b848a09de9ebf6f387ebc8@sentry.io/5183632",
dsn: env.REACT_SENTRY_DSN,
environment: env.REACT_SENTRY_ENVIRONMENT || "staging",
},

Expand Down
Loading