From bcd49952953d01b0e8a2991d813ce6c5200908d7 Mon Sep 17 00:00:00 2001 From: Sagar Dhadke <70995022+sagardhadke@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:29:05 +0530 Subject: [PATCH 1/3] chore(security): implement husky pre-commit hooks, forbidden files check, ci workflow, and contributing guide --- .github/CODEOWNERS | 5 + .github/ISSUE_TEMPLATE/bug_report.yml | 48 ++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 35 +++++++ .github/pull_request_template.md | 18 ++++ .github/scripts/forbidden-files-check.js | 102 +++++++++++++++++++++ .github/workflows/ci.yml | 59 ++++++++++++ .gitignore | 15 ++- .husky/pre-commit | 2 + docs/CONTRIBUTING.md | 59 ++++++++++++ package-lock.json | 17 ++++ package.json | 4 +- 11 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/scripts/forbidden-files-check.js create mode 100644 .github/workflows/ci.yml create mode 100644 .husky/pre-commit create mode 100644 docs/CONTRIBUTING.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..81a7bb0 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# Repository Code Ownership +# Lines starting with '#' are comments. +# Each line is a file pattern followed by one or more owners. + +* @sagardhadke diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..6dd6169 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,48 @@ +name: šŸ› Bug Report +description: Report an issue or bug in Java Course Tracker. +title: "[BUG]: " +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report this issue! Please provide sufficient detail so we can reproduce and fix it. + + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear and concise description of what the bug is. + placeholder: Describe what happened... + validations: + required: true + + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Step-by-step instructions to reproduce the behavior. + placeholder: | + 1. Open the app at '...' + 2. Click on '...' + 3. Scroll down to '....' + 4. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: A clear and concise description of what you expected to happen. + validations: + required: true + + - type: input + id: environment + attributes: + label: Browser & OS + description: What browser and operating system were you using? + placeholder: e.g. Chrome 132 on Windows 11 / macOS Sequoia + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..021d75e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,35 @@ +name: šŸš€ Feature Request +description: Suggest an idea or enhancement for Java Course Tracker. +title: "[FEAT]: " +labels: ["enhancement"] +body: + - type: markdown + attributes: + value: | + Have an idea to make Java Course Tracker even better? Tell us about it! + + - type: textarea + id: problem + attributes: + label: Problem or Motivation + description: Is your feature request related to a problem or user pain point? + placeholder: I'm always frustrated when... + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Proposed Feature / Solution + description: Describe the solution you'd like to see implemented. + placeholder: A clear and concise description of what you want to happen. + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Describe any alternative solutions or workarounds you've considered. + validations: + required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..9d14570 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,18 @@ +## Summary of Changes + + +## Changes Made +- + +## Verification & Testing Performed +- [ ] Automated unit & integration tests pass: `npm test` +- [ ] Production build succeeds: `npm run build` +- [ ] Linter checks pass: `npm run lint` +- [ ] Local manual/browser testing verified: `npm run dev` + +## Security & Repository Hygiene Checklist +- [ ] **No Secrets:** Confirmed no API keys, tokens, credentials, or private keys are staged. +- [ ] **No Personal Emails:** Confirmed no personal emails (`@gmail.com`) are hardcoded. +- [ ] **No Forbidden Tooling Files:** Confirmed no agent/tooling files (`AGENTS.md`, `CLAUDE.md`, `.agents/`, `.cursor/`, etc.) are tracked. +- [ ] **No Debug/Temp Artifacts:** Confirmed no `.log`, `report-temp/`, coverage, or temporary files are added. +- [ ] **Clean Gitignore:** Any new temporary directories or secrets are added to `.gitignore`. diff --git a/.github/scripts/forbidden-files-check.js b/.github/scripts/forbidden-files-check.js new file mode 100644 index 0000000..0550a09 --- /dev/null +++ b/.github/scripts/forbidden-files-check.js @@ -0,0 +1,102 @@ +#!/usr/bin/env node +import { execSync } from 'child_process'; +import fs from 'fs'; + +const FORBIDDEN_FILE_PATTERNS = [ + /^AGENTS\.md$/i, + /^CLAUDE\.md$/i, + /^GEMINI\.md$/i, + /^\.agents\//i, + /^\.cursor\//i, + /^\.claude\//i, + /^\.windsurf\//i, + /^docs\/bugs\//i, + /^report-temp\//i, + /\.log$/i, + /^\.env/i, + /\.pem$/i, + /\.key$/i, + /^coverage\//i, + /^test-results\//i, + /^playwright-report\//i, +]; + +const SECRET_PATTERNS = [ + { name: 'Google API Key', regex: /AIzaSy[A-Za-z0-9_-]{30,}/ }, + { name: 'OpenAI API Key', regex: /sk-[A-Za-z0-9_-]{20,}/ }, + { name: 'Anthropic API Key', regex: /sk-ant-[A-Za-z0-9_-]{20,}/ }, + { name: 'GitHub Token', regex: /(?:ghp_[A-Za-z0-9]{36}|github_pat_[A-Za-z0-9_]{82})/ }, + { name: 'AWS Access Key', regex: /AKIA[0-9A-Z]{16}/ }, + { name: 'Private Key Header', regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----/ }, + { name: 'Personal Gmail', regex: /[a-zA-Z0-9_.+-]+@gmail\.com/i }, +]; + +// Determine mode: staged files or all tracked files (CI mode) +const isCI = process.argv.includes('--ci'); + +let filesToCheck = []; + +try { + if (isCI) { + const output = execSync('git ls-files', { encoding: 'utf-8' }); + filesToCheck = output.split('\n').map(s => s.trim()).filter(Boolean); + } else { + const output = execSync('git diff --cached --name-only --diff-filter=ACMR', { encoding: 'utf-8' }); + filesToCheck = output.split('\n').map(s => s.trim()).filter(Boolean); + } +} catch (err) { + console.error('Failed to retrieve git file list:', err.message); + process.exit(1); +} + +let hasErrors = false; + +// 1. Check forbidden file paths +for (const file of filesToCheck) { + const normalized = file.replace(/\\/g, '/'); + for (const pattern of FORBIDDEN_FILE_PATTERNS) { + if (pattern.test(normalized)) { + console.error(`āŒ [FORBIDDEN FILE] Tracked/staged file matches forbidden pattern: ${normalized}`); + hasErrors = true; + } + } +} + +// 2. Check for secret patterns in staged diff or tracked files +if (isCI) { + for (const file of filesToCheck) { + // Skip binary files and test assets + if (!fs.existsSync(file) || file.endsWith('.png') || file.endsWith('.jpg') || file.endsWith('.ico') || file.endsWith('.svg')) { + continue; + } + const content = fs.readFileSync(file, 'utf-8'); + for (const rule of SECRET_PATTERNS) { + if (rule.regex.test(content)) { + // Exclude safe dynamic fixtures like ['sk', '-proj-'].join('') + console.error(`āŒ [SECRET SCAN] File ${file} matches pattern: ${rule.name}`); + hasErrors = true; + } + } + } +} else { + // Staged diff check + try { + const stagedDiff = execSync('git diff --cached', { encoding: 'utf-8' }); + for (const rule of SECRET_PATTERNS) { + if (rule.regex.test(stagedDiff)) { + console.error(`āŒ [SECRET SCAN] Staged diff contains forbidden pattern: ${rule.name}`); + hasErrors = true; + } + } + } catch (err) { + console.error('Failed to check git diff:', err.message); + } +} + +if (hasErrors) { + console.error('\n🚨 Security verification failed. Please remove forbidden files or secrets before proceeding.'); + process.exit(1); +} else { + console.log(`āœ… Security check passed. ${filesToCheck.length} files scanned with 0 violations.`); + process.exit(0); +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..93de63b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,59 @@ +name: CI & Security Quality Gate + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + security-audit: + name: Security & Forbidden Files Check + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Verify Forbidden Files & Secrets + run: node .github/scripts/forbidden-files-check.js --ci + + - name: Run Dependency Vulnerability Audit + run: npm audit --audit-level=high + + test-and-build: + name: Lint, Test & Production Build + runs-on: ubuntu-latest + needs: security-audit + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install Dependencies + run: npm ci + + - name: Run Linter (Oxlint) + run: npm run lint + + - name: Run Vitest Suite + run: npm test + + - name: Run Production Build + run: npm run build diff --git a/.gitignore b/.gitignore index cdac618..24445cb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,14 +23,17 @@ dist-ssr *.sln *.sw? -# Private and internal handoff documentation +# Private, internal handoff documentation, and scratch files PROJECT_HANDOFF_PROMPT.md PRIVATE_DEV_HANDOFF.md +PROJECT_CONTEXT*.md *_HANDOFF*.md report-temp/ local-testing/ playwright-report/ test-results/ +coverage/ +scratch/ # Environment, credentials, and secrets .env @@ -51,7 +54,16 @@ service-account*.json # AI tooling, agent configuration, and internal documentation AGENTS.md +CLAUDE.md +GEMINI.md .agents/ +.cursor/ +.claude/ +.gemini/ +.antigravity/ +.windsurf/ +.aider* +.copilot/ docs/bugs/ # Sample test and course XML files @@ -60,3 +72,4 @@ sample-test-course.xml + diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..f19fbfe --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,2 @@ +node .github/scripts/forbidden-files-check.js +npm test diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 0000000..822fb14 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# Contributing to Java Course Tracker + +Thank you for your interest in contributing to **Java Course Tracker**! We are committed to maintaining a clean, secure, and production-ready repository. + +--- + +## Engineering & Development Workflow + +To ensure high code quality, security, and stability, all contributors must follow this standard GitHub workflow: + +### 1. Branching Strategy +* **Never push directly to `main`**. Direct pushes to `main` are strictly forbidden and blocked by GitHub branch protection. +* Always create a focused, descriptive feature or bug-fix branch off the latest `main`: + ```bash + git checkout main + git pull origin main + git checkout -b feat/your-feature-name + # or + git checkout -b fix/your-bug-fix + ``` + +### 2. Local Verification Before Committing +Before committing your changes locally, ensure all automated verification checks pass: +```bash +# Run unit & component tests +npm test + +# Run code linter +npm run lint + +# Verify production build compiles without warnings +npm run build + +# Run end-to-end tests (if UI flows were modified) +npm run test:e2e +``` + +### 3. Local Pre-commit Security Checks +This repository uses **Husky** to enforce pre-commit checks: +* Any staged files matching forbidden patterns (`.env*`, `AGENTS.md`, `CLAUDE.md`, `.agents/`, `docs/bugs/`, `report-temp/`, `*.log`, `*.key`, `*.pem`) will cause the commit to abort. +* Any staged diff matching unmasked API keys or personal `@gmail.com` addresses will cause the commit to abort. +* Do not bypass pre-commit hooks (`--no-verify`). + +### 4. Opening a Pull Request +1. Push your feature branch to your GitHub fork or origin: + ```bash + git push origin feat/your-feature-name + ``` +2. Open a Pull Request targeting `main`. +3. Fill out the PR template completely, checking off the security and verification checklist. +4. **Wait for CI to pass:** GitHub Actions will run automated security audits, forbidden-file checks, linting, tests, and production build checks. +5. Once all CI checks pass and code review approval is obtained, the branch may be squash-merged into `main`. + +--- + +## Code Standards +* **React 19 Hooks & Idioms:** Ensure functional components are clean, dependencies are properly specified in `useEffect`/`useMemo`/`useCallback`, and asynchronous state updates in tests are wrapped in `act(...)`. +* **Zero Secrets:** Never hardcode credentials, private tokens, or test keys in source code. Dynamic string builders must be used for mock test fixtures. +* **No Telemetry / Offline-First:** Preserve the 100% client-side privacy guarantee. Do not introduce remote analytics or tracking beacons. diff --git a/package-lock.json b/package-lock.json index ccb802b..b055a67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "@types/react-dom": "^19.2.4", "@vitejs/plugin-react": "^6.1.0", "axe-core": "^4.14.0", + "husky": "^9.1.7", "jsdom": "^31.0.0", "oxlint": "^1.79.0", "vite": "^8.2.2", @@ -1205,6 +1206,22 @@ "node": "^22.13.0 || >=24.0.0" } }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", diff --git a/package.json b/package.json index 99ea9ed..d400c8d 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "test": "vitest run", "test:e2e": "playwright test", "test:all": "npm run lint --if-present && npm run build && npm test && npm run test:e2e", - "preview": "vite preview" + "preview": "vite preview", + "prepare": "husky" }, "dependencies": { "react": "^19.2.8", @@ -27,6 +28,7 @@ "@types/react-dom": "^19.2.4", "@vitejs/plugin-react": "^6.1.0", "axe-core": "^4.14.0", + "husky": "^9.1.7", "jsdom": "^31.0.0", "oxlint": "^1.79.0", "vite": "^8.2.2", From 913932ada3f09f48cce1757b32e5601cd4525757 Mon Sep 17 00:00:00 2001 From: Sagar Dhadke <70995022+sagardhadke@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:35:12 +0530 Subject: [PATCH 2/3] fix(deps): resolve high-severity vulnerabilities in vite and source-map-js --- package-lock.json | 190 +++++++++++++++++++++++++--------------------- package.json | 2 +- 2 files changed, 105 insertions(+), 87 deletions(-) diff --git a/package-lock.json b/package-lock.json index b055a67..e59929e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "husky": "^9.1.7", "jsdom": "^31.0.0", "oxlint": "^1.79.0", - "vite": "^8.2.2", + "vite": "^8.3.6", "vitest": "^5.1.0" } }, @@ -135,9 +135,9 @@ } }, "node_modules/@oxc-project/types": { - "version": "0.148.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.148.0.tgz", - "integrity": "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A==", + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", "dev": true, "license": "MIT", "funding": { @@ -484,9 +484,9 @@ } }, "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.7.tgz", - "integrity": "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.16.tgz", + "integrity": "sha512-ia3DwAs0OsMGS7+IConptSiyk9pEXkOx/AbJ2n/lAGxH3QkWQus1t8d7gnAT38FCU2sQu8lUbeR6AiZFv4JxaA==", "cpu": [ "arm" ], @@ -501,9 +501,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.7.tgz", - "integrity": "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.16.tgz", + "integrity": "sha512-kx5wBiMB6E7TEvpl2B9gjLU004BkvEm2Dr941BFjx/SontPwSzNuQUIoVKxHHoSjpFIfHMmcguyLOtyn0hObRg==", "cpu": [ "arm64" ], @@ -518,9 +518,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.7.tgz", - "integrity": "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.16.tgz", + "integrity": "sha512-qslZrXnKJU4cUpjoAmtAo/KQM9e2IRMlmpig6Zpwj+8KWxW8v+nkAf9216Bsek9lOC1jvg2yCjygCFo2f83msQ==", "cpu": [ "arm64" ], @@ -535,9 +535,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.7.tgz", - "integrity": "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.16.tgz", + "integrity": "sha512-FdF+y48ND13eAyM2mQn+85kvAqNlvRWROy2rhgA463X/0Gv4vGtazZtfaF1mRBLscYvtOlh4QnLjOWiFzX69OQ==", "cpu": [ "x64" ], @@ -552,9 +552,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.7.tgz", - "integrity": "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.16.tgz", + "integrity": "sha512-ddjqFM5e95AgLbUPtKIS7V1KTVlA0RUgCVr5mn+/IEhsdy3pr+Vuj/HZ7nlMN2FyxIwUktOH1LEPIQXO1v9y1Q==", "cpu": [ "x64" ], @@ -569,9 +569,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.7.tgz", - "integrity": "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.16.tgz", + "integrity": "sha512-tHdKWbFkFBI687iim3LIyIvyL7j66VvQYkDPss5Stn/qyE2tWkR1YD0dXmXPFKKqT/o5ZEJVsaRsWS2meQwGOA==", "cpu": [ "arm" ], @@ -586,13 +586,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.7.tgz", - "integrity": "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.16.tgz", + "integrity": "sha512-FJiLGAblPBMlBEdbOqw6kW6QcXDWAf/oJu7gYs9ZJZwmg+K+/zjFLxPTIY9izJUzxzc24FHvmseyA0IvJSl17w==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -603,13 +606,16 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.7.tgz", - "integrity": "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.16.tgz", + "integrity": "sha512-hrJpblMsrQ58U9veWpbXzkhV5zStunds6HWLprqq1qauvgBr1E6P+24kLj6lSLI9vjRn/RYpjprhkHQPKGWpNg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -620,13 +626,16 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.7.tgz", - "integrity": "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.16.tgz", + "integrity": "sha512-qJd/dC6j6CwLG9/s/RP2nb1RZ0GIgj7Ioj7x/SYa3RzjVrlzrmH0fhIOpfvqQDeIsdP0loi+kHaMhJzY1PBIaA==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -637,13 +646,16 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.7.tgz", - "integrity": "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.16.tgz", + "integrity": "sha512-Vx7Xg5uUJuNcujJjI70OICaH0EYj80BtOLZTSN7uOYg8QOLlyKnaG0IW7Fn/J0IpJsaKzmDKMhOQv1JBM9m9vg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -654,13 +666,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.7.tgz", - "integrity": "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.16.tgz", + "integrity": "sha512-TNKhgE3uJTsTzatUSSYt0Kgo+Oa2uSlSjz4r1aEIea7HX6ULBym4fAlYUhG1i6pjNf2njfCUAfKwr6C3E9Xg1w==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -671,13 +686,16 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.7.tgz", - "integrity": "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-7chXdpjXZ8qG0+mIxECN3cT9kvhZ3/oZhMX6Pp876P7CDrIy8nJswva6Mq357JR7eYXfuskwZxMeV1SzoZdHrA==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -688,9 +706,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.7.tgz", - "integrity": "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.16.tgz", + "integrity": "sha512-Kwjt+7uNTJK5/MDkGWGVO2KQPnj8yAV75dMpfwyHZrJSXWHrniOB0aUEWlVYf3H1hOqFLIStLdM5QXq6bnKmOQ==", "cpu": [ "arm64" ], @@ -705,9 +723,9 @@ } }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.7.tgz", - "integrity": "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.16.tgz", + "integrity": "sha512-/LH6WfjDRXXJz/p5xl4TmU+jpcnwcxbKEQBW/GZE0JHfN0lGIyTtsUEGaQ/q/GikkGJ2yLKe6pwm7AnEWO8pdw==", "cpu": [ "arm64" ], @@ -722,9 +740,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.7.tgz", - "integrity": "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.16.tgz", + "integrity": "sha512-1lv1KvX0Z871zfk7vw+dnXMMnHNyDwMzWG8Kv3HxDXMOhzCX4SHc7HK319fInP0i+0p9D8brkfzL7pJOaGl+tw==", "cpu": [ "x64" ], @@ -1625,9 +1643,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.18", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", - "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", "dev": true, "funding": [ { @@ -1782,9 +1800,9 @@ } }, "node_modules/postcss": { - "version": "8.5.28", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.28.tgz", - "integrity": "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==", + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", "dev": true, "funding": [ { @@ -1802,9 +1820,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.18", + "nanoid": "^3.3.20", "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" + "source-map-js": "^1.2.2" }, "engines": { "node": "^10 || ^12 || >=14" @@ -1880,13 +1898,13 @@ } }, "node_modules/rolldown": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.7.tgz", - "integrity": "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig==", + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.16.tgz", + "integrity": "sha512-bWvlMpFKiTfDKfnK7FC2MPgPeWCf/Kpwsq49ApdW+FQaBZb6O6dZ4MAPbPUjp7hYQrw/RobqCzn64BRrQecGHw==", "dev": true, "license": "MIT", "dependencies": { - "@oxc-project/types": "=0.148.0", + "@oxc-project/types": "=0.156.0", "@rolldown/pluginutils": "^1.0.0" }, "bin": { @@ -1896,21 +1914,21 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.7", - "@rolldown/binding-android-arm64": "1.2.7", - "@rolldown/binding-darwin-arm64": "1.2.7", - "@rolldown/binding-darwin-x64": "1.2.7", - "@rolldown/binding-freebsd-x64": "1.2.7", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.7", - "@rolldown/binding-linux-arm64-gnu": "1.2.7", - "@rolldown/binding-linux-arm64-musl": "1.2.7", - "@rolldown/binding-linux-ppc64-gnu": "1.2.7", - "@rolldown/binding-linux-s390x-gnu": "1.2.7", - "@rolldown/binding-linux-x64-gnu": "1.2.7", - "@rolldown/binding-linux-x64-musl": "1.2.7", - "@rolldown/binding-openharmony-arm64": "1.2.7", - "@rolldown/binding-win32-arm64-msvc": "1.2.7", - "@rolldown/binding-win32-x64-msvc": "1.2.7" + "@rolldown/binding-android-arm-eabi": "1.2.16", + "@rolldown/binding-android-arm64": "1.2.16", + "@rolldown/binding-darwin-arm64": "1.2.16", + "@rolldown/binding-darwin-x64": "1.2.16", + "@rolldown/binding-freebsd-x64": "1.2.16", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.16", + "@rolldown/binding-linux-arm64-gnu": "1.2.16", + "@rolldown/binding-linux-arm64-musl": "1.2.16", + "@rolldown/binding-linux-ppc64-gnu": "1.2.16", + "@rolldown/binding-linux-s390x-gnu": "1.2.16", + "@rolldown/binding-linux-x64-gnu": "1.2.16", + "@rolldown/binding-linux-x64-musl": "1.2.16", + "@rolldown/binding-openharmony-arm64": "1.2.16", + "@rolldown/binding-win32-arm64-msvc": "1.2.16", + "@rolldown/binding-win32-x64-msvc": "1.2.16" } }, "node_modules/saxes": { @@ -1933,9 +1951,9 @@ "license": "MIT" }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -2056,16 +2074,16 @@ } }, "node_modules/vite": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", - "integrity": "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.6.tgz", + "integrity": "sha512-UI7dK29NnS54Fk+mmo7o+jI6U8Fp7hDl+X5Q1k45WH+d4dSlbLVUETGQ+hfkNgvLQGyoElPj837nZyv4MBc0VA==", "dev": true, "license": "MIT", "dependencies": { "lightningcss": "^1.33.0", - "picomatch": "^4.0.5", - "postcss": "^8.5.26", - "rolldown": "~1.2.4", + "picomatch": "^4.0.7", + "postcss": "^8.5.32", + "rolldown": "~1.2.16", "tinyglobby": "^0.2.17" }, "bin": { @@ -2082,7 +2100,7 @@ }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", - "@vitejs/devtools": "^0.4.0 || ^0.5.0", + "@vitejs/devtools": "^0.7.1 || ^0.8.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", diff --git a/package.json b/package.json index d400c8d..b22d292 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "husky": "^9.1.7", "jsdom": "^31.0.0", "oxlint": "^1.79.0", - "vite": "^8.2.2", + "vite": "^8.3.6", "vitest": "^5.1.0" } } From 84634f4cc4e1ba5db17f3a957dd2695345c7db81 Mon Sep 17 00:00:00 2001 From: Sagar Dhadke <70995022+sagardhadke@users.noreply.github.com> Date: Sat, 7 Nov 2026 21:50:49 +0530 Subject: [PATCH 3/3] ci: enforce Node 22 via .nvmrc, engines field, and GitHub Actions workflow --- .github/workflows/ci.yml | 8 ++++---- .nvmrc | 1 + package.json | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93de63b..e7adfdc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set up Node.js LTS + - name: Set up Node.js 22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: '.nvmrc' cache: npm - name: Install Dependencies @@ -40,10 +40,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Set up Node.js LTS + - name: Set up Node.js 22 uses: actions/setup-node@v4 with: - node-version: 20 + node-version-file: '.nvmrc' cache: npm - name: Install Dependencies diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/package.json b/package.json index b22d292..58b8657 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "private": true, "version": "0.0.0", "type": "module", + "engines": { + "node": ">=22" + }, "scripts": { "dev": "vite", "build": "vite build",