Skip to content

Commit 005bfa5

Browse files
committed
Merge branch 'development' into fix/align-search-filters-events-sections - resolve conflicts
2 parents 6382618 + c044877 commit 005bfa5

840 files changed

Lines changed: 105984 additions & 24857 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ jobs:
6262
domain: ${{ vars.SURGE_DOMAIN }}
6363
project: './build'
6464
login: ${{ secrets.SURGE_LOGIN }}
65-
token: ${{ secrets.SURGE_TOKEN }}
65+
token: ${{ secrets.SURGE_TOKEN }}

.github/workflows/pull_request_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
5555
- name: Run Unit Tests for Changed Files Only
5656
run: yarn run test:changed
5757
- name: Run Lint
58-
run: yarn run lint
58+
run: yarn run lint

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# dependencies
44
/node_modules
5-
package-lock.json
65
# testing
76
/coverage
87
*.code-snippets

.husky-disabled/pre-commit

Lines changed: 0 additions & 5 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ if [ -f .nvmrc ]; then
77
nvm use 20 2>/dev/null || nvm install 20 && nvm use 20
88
fi
99

10-
. "$(dirname "$0")/_/husky.sh"
11-
1210
echo ""
1311
echo "🛡️ Husky pre-commit hook triggered"
1412

13+
if git rev-parse -q --verify MERGE_HEAD >/dev/null 2>&1; then
14+
echo "ℹ️ Merge commit detected. Skipping lint-staged auto-fix on the merged file set."
15+
exit 0
16+
fi
17+
1518
# Block plain .css files (except .module.css and index.css)
1619
for file in $(git diff --cached --name-only --diff-filter=ACM | grep '\.css$'); do
1720
case "$file" in
@@ -42,4 +45,4 @@ if git diff --cached --name-only | grep -qE '\.(js|jsx|ts|tsx|css)$'; then
4245
fi
4346
else
4447
echo "ℹ️ No JS/TS/CSS files to lint. Skipping lint-staged."
45-
fi
48+
fi

.husky/pre-push

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,55 @@
33
export NVM_DIR="$HOME/.nvm"
44
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
55
# Use Node 20 if available (or install if needed)
6-
if [ -f .nvmrc ]; then
6+
if command -v nvm >/dev/null 2>&1 && [ -f .nvmrc ]; then
77
nvm use 20 2>/dev/null || nvm install 20 && nvm use 20
88
fi
99

10-
. "$(dirname "$0")/_/husky.sh"
10+
if git rev-parse --abbrev-ref @{upstream} >/dev/null 2>&1; then
11+
changed_files=$(git diff --name-only @{upstream}...HEAD)
12+
else
13+
echo "ℹ️ No upstream branch set. Skipping pre-push checks."
14+
exit 0
15+
fi
16+
17+
if [ -z "$changed_files" ]; then
18+
echo "ℹ️ No outgoing changes to validate. Skipping pre-push checks."
19+
exit 0
20+
fi
21+
22+
if ! printf '%s\n' "$changed_files" | grep -qvE '^\.husky/'; then
23+
echo "ℹ️ Only Husky hook changes detected. Skipping full test and lint checks."
24+
exit 0
25+
fi
26+
27+
js_files=$(printf '%s\n' "$changed_files" | grep -E '\.(js|jsx|ts|tsx)$' || true)
28+
style_files=$(printf '%s\n' "$changed_files" | grep -E '\.(css|scss|sass)$' || true)
1129

12-
echo "🧪 Running tests before push..."
13-
npm run test -- --bail=1
14-
test_status=$?
30+
test_status=0
31+
lint_status=0
32+
style_status=0
33+
34+
if [ -n "$js_files" ]; then
35+
echo "🧪 Running related tests before push..."
36+
npx vitest related --run $js_files
37+
test_status=$?
38+
39+
echo "🧹 Running ESLint on changed files before push..."
40+
npx eslint $js_files
41+
lint_status=$?
42+
fi
43+
44+
if [ -n "$style_files" ]; then
45+
echo "🎨 Running Stylelint on changed files before push..."
46+
npx stylelint $style_files
47+
style_status=$?
48+
fi
1549

16-
echo "🧹 Running lint before push..."
17-
npm run lint
18-
lint_status=$?
1950

2051
# Block push if either fails
21-
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ]; then
22-
echo "❌ Push blocked: Lint or test failed."
52+
if [ $test_status -ne 0 ] || [ $lint_status -ne 0 ] || [ $style_status -ne 0 ]; then
53+
echo "❌ Push blocked: changed-file validation failed."
2354
exit 1
2455
fi
2556

26-
echo "✅ All checks passed. Proceeding with push..."
57+
echo "✅ All checks passed. Proceeding with push..."

.yarnrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Avoid stale persisted package tarballs in CI/Netlify.
2+
cache-folder "/tmp/hgn-yarn-cache"

fix-conflicts.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
const fs = require('fs');
2+
3+
const files = [
4+
'src/components/Announcements/SocialMediaComposer.module.css',
5+
'src/components/ApplicationAnalytics/jobAnalytics.module.css',
6+
'src/components/BMDashboard/AddMaterial/AddMaterial.module.css',
7+
'src/components/BMDashboard/Equipment/Update/UpdateEquipment.module.css',
8+
'src/components/BMDashboard/Issues/issueChart.module.css',
9+
'src/components/BMDashboard/Issues/issueCharts.module.css',
10+
'src/components/BMDashboard/ItemList/ItemListView.module.css',
11+
'src/components/BMDashboard/Lesson/LessonForm.module.css',
12+
'src/components/BMDashboard/LessonList/LessonCard.module.css',
13+
'src/components/BMDashboard/Projects/ProjectDetails/ProjectDetails.module.css',
14+
'src/components/BMDashboard/UtilizationChart/UtilizationChart.module.css',
15+
'src/components/BMDashboard/WeeklyProjectSummary/GroupedBarGraphInjurySeverity/InjuryCategoryBarChart.module.css',
16+
'src/components/BMDashboard/WeeklyProjectSummary/IssueBreakdownChart.module.css',
17+
'src/components/Collaboration/Collaboration.module.css',
18+
'src/components/CommunityPortal/Activities/ActivityAttendance.module.css',
19+
'src/components/CommunityPortal/Activities/activityId/ActivityComments.module.css',
20+
'src/components/EductionPortal/EvaluationResults/EvaluationResults.module.css',
21+
'src/components/EductionPortal/EvaluationResults/OverallPerformance.module.css',
22+
'src/components/EductionPortal/EvaluationResults/TeacherFeedback.module.css',
23+
'src/components/EductionPortal/StudentTasks/StudentTasks.module.css',
24+
'src/components/EductionPortal/StudentTasks/TaskDetails.module.css',
25+
'src/components/ExperienceDonutChart/ExperienceDonutChart.module.css',
26+
'src/components/Header/Header.module.css',
27+
'src/components/HGNForm/TopCommunityMembers/TopCommunityMembers.module.css',
28+
'src/components/HGNPRDashboard/ReviewersStackedBarChart/ReviewersStackedBarChart.module.css',
29+
'src/components/HGNSkillsDashboard/SkillsProfilePage/styles/ProfileDetails.module.css',
30+
'src/components/LandingPage/HelpModal.module.css',
31+
'src/components/LBDashboard/SentimentBreakdownDonutChart/SentimentBreakdownDonutChart.module.css',
32+
'src/components/MaterialSummary/MaterialSummary.module.css',
33+
'src/components/Projects/projects.module.css',
34+
];
35+
36+
function resolveKeepHead(content) {
37+
const lines = content.split('\n');
38+
const result = [];
39+
let state = 'normal';
40+
for (const line of lines) {
41+
if (line.startsWith('<<<<<<< ')) {
42+
state = 'head';
43+
} else if (line === '=======' && state === 'head') {
44+
state = 'other';
45+
} else if (line.startsWith('>>>>>>> ') && state === 'other') {
46+
state = 'normal';
47+
} else if (state !== 'other') {
48+
result.push(line);
49+
}
50+
}
51+
return result.join('\n');
52+
}
53+
54+
let count = 0;
55+
for (const f of files) {
56+
if (!fs.existsSync(f)) {
57+
console.log('NOT FOUND: ' + f);
58+
continue;
59+
}
60+
const content = fs.readFileSync(f, 'utf8');
61+
if (!content.includes('<<<<<<<')) {
62+
console.log('No conflict: ' + f);
63+
continue;
64+
}
65+
const resolved = resolveKeepHead(content);
66+
fs.writeFileSync(f, resolved, 'utf8');
67+
console.log('Fixed: ' + f);
68+
count++;
69+
}
70+
console.log('Total: ' + count);

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ module.exports = {
2020
'react-leaflet': '<rootDir>/src/_tests_/__mocks__/react-leaflet.js',
2121
'marker-cluster-group': '<rootDir>/src/_tests_/__mocks__/react-leaflet-cluster.js',
2222
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', // <-- Added to mock CSS/SCSS files
23+
// Fix for Node.js built-in modules in Node 20
24+
'^node:(.*)$': '$1',
2325
},
2426

2527
// The paths to modules that run some code to configure or set up the testing environment before each test

jsconfig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": "src"
4-
}
3+
"baseUrl": "src",
4+
"paths": {
5+
"~/*": ["./*"]
6+
}
7+
},
8+
"include": ["src"]
59
}

0 commit comments

Comments
 (0)