Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…e (P.3.2) - Add coverageThreshold to all 20 jest.config.cjs files (branches: 70%, functions: 70%, lines: 80%, statements: 80%) - Add coverage config to all 3 vitest.config.ts files + apps/web - Add test:coverage scripts to all 20 packages + apps/web - Add test:coverage turbo task and root script Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…g guidelines (P.3.3, P.3.4) - Update test.yml to run test:coverage and merge lcov reports for Codecov - Enable ESLint and Prettier checks in lint.yml - Add coverage section and snapshot testing guidelines to CONTRIBUTING.md Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…P.4.2) - Create scripts/create-plugin.mjs with validation and PascalCase conversion - Generates package.json, tsconfig.json, vitest.config.ts, src/, test/, README.md - New plugins use Vitest (per ADR-001) with coverage thresholds - Update root package.json to use local script Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
… (P.4.3) - Create scripts/doctor.mjs checking: Node.js, pnpm, git, deps, .env, configs, tooling, packages, builds - Reports results with ✅/⚠️ /❌ status and actionable messages - Update root package.json to use local script Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
- P.3.2 coverage thresholds ✅ - P.3.3 CI coverage aggregation ✅ - P.3.4 snapshot testing guidelines ✅ - P.4.2 plugin creation template ✅ - P.4.3 doctor environment checks ✅ - All phases A–P now complete Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Completes remaining “Phase P — Developer Experience” roadmap items by standardizing per-package coverage thresholds + coverage CI flow, adding snapshot testing guidance, and introducing developer onboarding utilities (plugin scaffold + environment “doctor” checks).
Changes:
- Added
test:coverageTurborepo task + rootpnpm test:coverage, and introduced per-package coverage thresholds (Jest + Vitest) includingapps/web. - Updated CI workflows to run coverage and upload aggregated results to Codecov; enabled lint/format checks in
lint.yml. - Added
scripts/create-plugin.mjs(plugin scaffold) andscripts/doctor.mjs(environment checker), plus documentation/roadmap updates.
Reviewed changes
Copilot reviewed 53 out of 53 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| turbo.json | Adds a cached test:coverage turbo task with coverage/** outputs. |
| scripts/doctor.mjs | New environment health checker invoked by pnpm objectstack:doctor. |
| scripts/create-plugin.mjs | New pnpm create:plugin scaffolder generating a Vitest-based plugin package. |
| package.json | Adds root test:coverage; wires objectstack:doctor and create:plugin to node scripts. |
| .github/workflows/test.yml | Runs test:coverage, merges coverage artifacts, uploads to Codecov. |
| .github/workflows/lint.yml | Enables ESLint + Prettier format checks in CI. |
| apps/web/vitest.config.ts | Adds coverage thresholds/config to web Vitest setup. |
| apps/web/package.json | Adds test:coverage script. |
| CONTRIBUTING.md | Adds coverage usage docs + snapshot testing guidelines. |
| ROADMAP.md | Bumps roadmap to v14.0.0 and marks Phase P complete. |
| packages/automation/vitest.config.ts | Adds Vitest coverage thresholds/config. |
| packages/automation/package.json | Adds test:coverage script. |
| packages/automation/jest.config.cjs | Adds Jest config + coverage thresholds for the package. |
| packages/permissions/vitest.config.ts | Adds Vitest coverage thresholds/config. |
| packages/permissions/package.json | Adds test:coverage script. |
| packages/permissions/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/workflow/vitest.config.ts | Adds Vitest coverage thresholds/config. |
| packages/workflow/package.json | Adds test:coverage script. |
| packages/workflow/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/ui/package.json | Adds Jest test:coverage script. |
| packages/ui/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/telemetry/package.json | Adds Jest test:coverage script. |
| packages/telemetry/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/storage/package.json | Adds Jest test:coverage script. |
| packages/storage/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/realtime/package.json | Adds Jest test:coverage script. |
| packages/realtime/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/notification/package.json | Adds Jest test:coverage script. |
| packages/notification/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/metrics/package.json | Adds Jest test:coverage script. |
| packages/metrics/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/marketplace/package.json | Adds Jest test:coverage script. |
| packages/marketplace/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/jobs/package.json | Adds Jest test:coverage script. |
| packages/jobs/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/i18n/package.json | Adds Jest test:coverage script. |
| packages/i18n/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/graphql/package.json | Adds Jest test:coverage script. |
| packages/graphql/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/federation/package.json | Adds Jest test:coverage script. |
| packages/federation/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/cache/package.json | Adds Jest test:coverage script. |
| packages/cache/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/browser/package.json | Adds Jest test:coverage script. |
| packages/browser/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/auth/package.json | Adds Jest test:coverage script. |
| packages/auth/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/audit/package.json | Adds Jest test:coverage script. |
| packages/audit/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/analytics/package.json | Adds Jest test:coverage script. |
| packages/analytics/jest.config.cjs | Adds Jest coverage thresholds. |
| packages/agent/package.json | Adds Jest test:coverage script. |
| packages/agent/jest.config.cjs | Adds Jest coverage thresholds. |
| - name: Merge Coverage Reports | ||
| if: matrix.node-version == '20.x' | ||
| run: | | ||
| mkdir -p coverage | ||
| # Collect Jest lcov reports | ||
| for dir in packages/*/coverage; do | ||
| if [ -f "$dir/lcov.info" ]; then | ||
| pkg=$(basename $(dirname "$dir")) | ||
| echo "Collecting coverage from $pkg" | ||
| cat "$dir/lcov.info" >> coverage/lcov.info | ||
| fi | ||
| done | ||
| # Collect Vitest lcov reports | ||
| for dir in apps/*/coverage; do | ||
| if [ -f "$dir/lcov.info" ]; then | ||
| app=$(basename $(dirname "$dir")) | ||
| echo "Collecting coverage from app/$app" | ||
| cat "$dir/lcov.info" >> coverage/lcov.info | ||
| fi | ||
| done | ||
|
|
||
| - name: Upload Coverage | ||
| if: matrix.node-version == '20.x' | ||
| uses: codecov/codecov-action@v5 | ||
| continue-on-error: true | ||
| with: | ||
| files: ./coverage/coverage-final.json | ||
| files: ./coverage/lcov.info |
There was a problem hiding this comment.
CI merges coverage/**/lcov.info into a single coverage/lcov.info, but Vitest coverage config in this repo doesn’t specify an lcov reporter. If Vitest doesn’t emit lcov.info by default, this step will silently upload incomplete coverage. Consider either configuring Vitest coverage reporters to include lcov (recommended) or changing the merge/upload step to use a format Vitest reliably produces (e.g., coverage-final.json/JSON + a merger tool).
| coverage: { | ||
| provider: 'v8', | ||
| include: ['src/**/*.ts'], | ||
| exclude: ['src/**/*.d.ts'], | ||
| thresholds: { | ||
| branches: 70, | ||
| functions: 70, | ||
| lines: 80, | ||
| statements: 80, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Coverage thresholds were added, but the Vitest coverage config doesn’t specify an lcov reporter. Since CI expects coverage/lcov.info for aggregation, ensure Vitest is configured to emit lcov.info (e.g., add an lcov reporter) or adjust the CI merge step accordingly.
| coverage: { | ||
| provider: 'v8', | ||
| include: ['src/**/*.ts'], | ||
| exclude: ['src/**/*.d.ts'], | ||
| thresholds: { | ||
| branches: 70, | ||
| functions: 70, | ||
| lines: 80, | ||
| statements: 80, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Coverage thresholds were added, but Vitest coverage config doesn’t specify an lcov reporter. CI aggregates **/coverage/lcov.info; if Vitest doesn’t generate it by default, this package’s coverage won’t be included. Configure Vitest to emit lcov.info (or update CI aggregation).
| coverage: { | ||
| provider: 'v8', | ||
| include: ['src/**/*.ts'], | ||
| exclude: ['src/**/*.d.ts'], | ||
| thresholds: { | ||
| branches: 70, | ||
| functions: 70, | ||
| lines: 80, | ||
| statements: 80, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Coverage thresholds were added, but Vitest coverage config doesn’t specify an lcov reporter. CI aggregates **/coverage/lcov.info; if Vitest doesn’t generate it by default, this package’s coverage won’t be included. Configure Vitest to emit lcov.info (or update CI aggregation).
| coverage: { | ||
| provider: 'v8', | ||
| include: ['src/**/*.{ts,tsx}'], | ||
| exclude: ['src/**/*.d.ts', 'src/test/**'], | ||
| thresholds: { | ||
| branches: 60, | ||
| functions: 60, | ||
| lines: 70, | ||
| statements: 70, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Coverage thresholds were added, but Vitest coverage config doesn’t specify an lcov reporter. Since CI aggregates **/coverage/lcov.info, ensure this app’s Vitest coverage output includes lcov.info (e.g., add an lcov reporter) or adjust the CI upload format.
| 'test/plugin.test.ts': `import { describe, it, expect, vi } from 'vitest'; | ||
| import { ${pascalName}Plugin } from '../src/plugin'; | ||
|
|
There was a problem hiding this comment.
The scaffolded test imports ../src/plugin without a .js extension. In this repo, both Jest and Vitest tests consistently import TS sources using .js-suffixed paths (e.g., packages/automation/test/plugin.test.ts:10 imports ../src/plugin.js, and packages/cache/test/plugin.test.ts:5 imports ../src/index.js) to align with Node ESM semantics. Consider generating .js-suffixed imports in the template to match existing conventions and avoid resolution issues outside Vitest/Vite.
Implements all remaining Phase P (Developer Experience) roadmap items, bringing the project from v13 → v14 with all phases A–P complete.
P.3.2 — Coverage thresholds per package
coverageThresholdadded to all 20jest.config.cjs(branches/functions: 70%, lines/statements: 80%)coverage.thresholdsin allvitest.config.tsfiles +apps/webtest:coveragescript in every package, turbo task, and root commandP.3.3 — CI coverage aggregation
test.ymlnow runstest:coverage, merges lcov from all packages, uploads to Codecovlint.ymlESLint/Prettier steps uncommented (were placeholders since P.2)P.3.4 — Snapshot testing guidelines
CONTRIBUTING.md: when to use/avoid snapshots, inline snapshot patterns, update commands for both Jest and VitestP.4.2 —
pnpm create:pluginscaffoldpnpm create:plugin billing # → packages/billing/{package.json, tsconfig.json, vitest.config.ts, src/, test/, README.md}Generates a complete plugin package with Vitest (per ADR-001), coverage thresholds, tsup build, and test scaffold. Validates kebab-case, rejects duplicates.
P.4.3 —
pnpm objectstack:doctorEnvironment health checker validating Node ≥20, pnpm ≥10, git,⚠️ /❌ with actionable messages.
node_modules,.env/AUTH_SECRET, ESLint/Prettier/EditorConfig/Husky, workspace packages, and build artifacts. Reports ✅/ROADMAP.md
Bumped to v14.0.0. All phases marked complete. Only remaining tracked item is Jest→Vitest migration (ADR-001, separate effort).
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.