diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d39a657..5b0771d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,11 +97,13 @@ To set up the project locally: ```bash npm run build ``` + (This runs `npm run build:css` to generate Tailwind styles.) 3. **Run Tests**: ```bash npm run test:unit ``` + *Note: Unit tests may take a few minutes to complete.* 4. **Format & Lint**: ```bash @@ -117,6 +119,13 @@ To set up the project locally: For a full guide, see the [Local Setup section in README.md](./README.md#local-setup). +### Troubleshooting + +- **Browserslist Warning**: If you see `Browserslist: caniuse-lite is outdated` during the build, run: + ```bash + npx update-browserslist-db@latest + ``` + ## Dev Container This project includes a `.devcontainer` configuration for VS Code. It provides a pre-configured environment with Node.js 22 and necessary extensions. diff --git a/ai/reports/onboarding-20241024.md b/ai/reports/onboarding-20241024.md new file mode 100644 index 00000000..c7178ddf --- /dev/null +++ b/ai/reports/onboarding-20241024.md @@ -0,0 +1,45 @@ +# Onboarding Audit Report + +Date: 2024-10-24 +Environment: Node.js v22.22.0 + +## Execution Results + +| Command | Status | Notes | +| :--- | :--- | :--- | +| `npm ci` | Success | Installed dependencies correctly. | +| `npm run build:css` | Success | Generated `css/tailwind.generated.css`. Warnings observed: `Browserslist: caniuse-lite is outdated` and Tailwind mixed units warning. | +| `npm run format` | Success | No files were modified (codebase is clean). | +| `npm run lint` | Success | All lint checks passed. | +| `npm run test:unit` | Success | Tests ran successfully (100+ tests passed), though execution time is significant (> 5 minutes). | + +## Documentation Alignment + +- **README.md**: + - Mentions `npm run build`. Correct (delegates to `build:css`). + - Mentions `npm run test:unit`. Correct. + - Mentions starting server `python -m http.server 8000`. Correct. + +- **CONTRIBUTING.md**: + - Mentions `npm run build`. Correct. + - Mentions `npm run test:unit`. Correct. + - Mentions `npm run format` and `npm run lint`. Correct. + +## Devcontainer + +- `.devcontainer/devcontainer.json` exists and uses `mcr.microsoft.com/devcontainers/javascript-node:22`. +- This aligns with the local environment (Node v22) used for validation. +- `postCreateCommand` runs `npm ci && npm run build`. This is efficient. + +## Recommendations + +1. **Documentation**: + - `CONTRIBUTING.md`: The section "Development Setup" is accurate. However, we can add a note about `npm run build:css` explicitly if users want to just build CSS without the alias, but `npm run build` is better. + - We could add a note about the expected warnings during build to reassure new developers. + - The `caniuse-lite` warning suggests we should run `npx update-browserslist-db@latest` and commit the lockfile change, but that might be out of scope for "docs". However, I can try it. + +2. **Devcontainer**: + - The setup seems solid. No changes required. + +3. **General**: + - Run `npx update-browserslist-db@latest` to fix the build warning. diff --git a/package-lock.json b/package-lock.json index 066ad565..07f371c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1182,9 +1182,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.15", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.15.tgz", - "integrity": "sha512-kX8h7K2srmDyYnXRIppo4AH/wYgzWVCs+eKr3RusRSQ5PvRYoEFmR/I0PbdTjKFAoKqp5+kbxnNTFO9jOfSVJg==", + "version": "2.9.17", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.17.tgz", + "integrity": "sha512-agD0MgJFUP/4nvjqzIB29zRPUuCF7Ge6mEv9s8dHrtYD7QWXRcx75rOADE/d5ah1NI+0vkDl0yorDd5U852IQQ==", "dev": true, "license": "Apache-2.0", "bin": { @@ -1310,9 +1310,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001764", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz", - "integrity": "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==", + "version": "1.0.30001766", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001766.tgz", + "integrity": "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA==", "dev": true, "funding": [ {