fix(repo): set proper turbo deps for test tasks#4
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRoot scripts now route tests/build through Turbo with package filters; pnpm workspace adds Changes
Sequence Diagram(s)mermaid User->>Lauf: run clean task with flags (--build/--cache/--nuke/...) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d25ccfe to
6e569dc
Compare
Root test scripts bypassed turbo entirely (vitest run), so workspace packages were never built before their dependents' tests tried to import from dist/. Additionally, examples/ used workspace:* deps but were not in the pnpm workspace. - Route root test scripts through turbo run test - Change test.dependsOn from ^build to build so each package builds itself before running tests - Add examples/* to pnpm-workspace.yaml - Fix CliLogger method calls in advanced example (trace/debug -> info) - Add missing @types/node to authenticated-service example Co-Authored-By: Claude <noreply@anthropic.com>
228e4fe to
b3dfed9
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/concepts/authentication.md`:
- Around line 57-60: The documentation table shows incorrect token storage
paths: update the paths `./<cli-name>/auth.json` and `~/<cli-name>/auth.json` to
include the leading dot so they match the documented `dirName` (i.e. change to
`./.<cli-name>/auth.json` and `~/.<cli-name>/auth.json`), ensuring the Local and
Global "Path" entries in the table reflect the dot-prefixed directory used by
the code/config.
In `@packages/cli/src/lib/templates/project/package.json.liquid`:
- Line 25: The package template currently pins the dependency version ranges to
"^0.0.0" which only allows 0.0.0; update the dependency entries for
"@kidd-cli/cli" and the corresponding "@kidd-cli/core" in the
package.json.liquid template to use the correct caret range "^0.1.0" so
published 0.1.0+ versions can be installed; locate the lines containing the
dependency keys "@kidd-cli/cli" and "@kidd-cli/core" and replace their version
strings from "^0.0.0" to "^0.1.0".
In `@scripts/clean.lauf.ts`:
- Line 8: COVERAGE_GLOBS currently only includes the root 'coverage' folder
which misses per-package coverage directories; update the COVERAGE_GLOBS
constant to include recursive globs such as '**/coverage' (and/or
'**/coverage/**' if your deletion utility requires matching contents) so
package-level coverage folders are matched and removed; locate the
COVERAGE_GLOBS symbol and replace its value with the recursive glob patterns
used elsewhere in the project to ensure all coverage dirs in the monorepo are
cleaned.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4dfde732-7805-40a5-869e-83c679c2b585
📒 Files selected for processing (51)
.changeset/rename-packages.md.changeset/scaffold-kidd-config.md.vscode/settings.jsoncontributing/concepts/architecture.mddocs/README.mddocs/concepts/authentication.mddocs/concepts/configuration.mddocs/concepts/context.mddocs/concepts/lifecycle.mddocs/guides/add-authentication.mddocs/reference/cli.mddocs/reference/kidd.mdexamples/authenticated-service/api/server.tsexamples/authenticated-service/cli/src/commands/repos.tsexamples/authenticated-service/cli/src/index.tsexamples/authenticated-service/ui/app.jsexamples/authenticated-service/ui/index.htmllauf.config.tspackages/cli/package.jsonpackages/cli/src/commands/build.test.tspackages/cli/src/commands/commands.test.tspackages/cli/src/commands/dev.test.tspackages/cli/src/commands/doctor.test.tspackages/cli/src/commands/doctor.tspackages/cli/src/lib/checks.test.tspackages/cli/src/lib/checks.tspackages/cli/src/lib/templates/project/kidd.config.ts.liquidpackages/cli/src/lib/templates/project/package.json.liquidpackages/cli/src/lib/templates/project/tsdown.config.ts.liquidpackages/core/src/lib/store/create-store.tspackages/core/src/lib/store/index.test.tspackages/core/src/lib/store/types.tspackages/core/src/middleware/auth/README.mdpackages/core/src/middleware/auth/auth.test.tspackages/core/src/middleware/auth/create-auth-context.test.tspackages/core/src/middleware/auth/create-auth-context.tspackages/core/src/middleware/auth/index.tspackages/core/src/middleware/auth/resolve-credentials.test.tspackages/core/src/middleware/auth/resolve-oauth.test.tspackages/core/src/middleware/auth/types.tspackages/core/src/middleware/http/README.mdpackages/core/src/middleware/http/create-http-client.test.tspackages/core/src/middleware/http/http.test.tspackages/core/src/runtime/runtime.test.tspackages/core/test/integration/advanced-deploy.test.tspackages/core/test/integration/advanced-status.test.tspackages/core/test/integration/simple-greet.test.tspackages/core/test/integration/simple-init.test.tspackages/core/test/integration/simple-list.test.tsscripts/clean.lauf.tsscripts/oxc-lint-split.sh
💤 Files with no reviewable changes (4)
- scripts/oxc-lint-split.sh
- packages/cli/src/lib/templates/project/tsdown.config.ts.liquid
- packages/core/src/middleware/auth/types.ts
- examples/authenticated-service/cli/src/index.ts
✅ Files skipped from review due to trivial changes (25)
- packages/cli/src/commands/dev.test.ts
- .changeset/rename-packages.md
- docs/reference/cli.md
- packages/core/src/runtime/runtime.test.ts
- packages/core/src/lib/store/create-store.ts
- packages/core/test/integration/simple-list.test.ts
- examples/authenticated-service/ui/app.js
- packages/core/src/middleware/auth/create-auth-context.ts
- packages/core/src/middleware/auth/resolve-credentials.test.ts
- docs/concepts/configuration.md
- packages/core/src/lib/store/index.test.ts
- packages/core/src/middleware/auth/create-auth-context.test.ts
- packages/cli/src/lib/checks.ts
- packages/cli/src/commands/build.test.ts
- packages/core/src/middleware/http/http.test.ts
- docs/reference/kidd.md
- packages/core/test/integration/advanced-deploy.test.ts
- packages/core/src/middleware/auth/index.ts
- .vscode/settings.json
- packages/cli/src/commands/doctor.ts
- contributing/concepts/architecture.md
- packages/cli/src/commands/doctor.test.ts
- examples/authenticated-service/api/server.ts
- docs/README.md
- packages/cli/src/commands/commands.test.ts
751f745 to
3711fdd
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 14-21: The root package.json scripts "build", "test:coverage",
"test:watch", and "validate" currently pass --filter='./packages/*' which
excludes examples; remove the --filter='./packages/*' fragment from each of
those script values so the commands (scripts "build", "test:coverage",
"test:watch", and "validate") run across the whole workspace (including
examples) per pnpm-workspace.yaml; keep the same command structure (e.g., "turbo
run build", "turbo run test" / "vitest ..." and the chained checks) but without
the --filter argument so examples are included.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ffb21da3-61cc-4e50-8b7c-45fae2def902
📒 Files selected for processing (2)
package.jsonpackages/cli/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/cli/package.json
3711fdd to
13049b3
Compare
Summary
vitest run), so workspace packages were never built before their dependents' tests tried to import fromdist/test.dependsOnused^build(deps only) instead ofbuild(self + deps), so packages with self-referencing integration tests (e.g.@kidd-cli/coreexamples) failedexamples/*usedworkspace:*deps but were not in the pnpm workspaceChanges
testscript throughturbo run testtest:coverageandtest:watchthroughturbo run buildbefore vitestturbo.jsontest.dependsOnfrom["^build"]to["build"]examples/*topnpm-workspace.yamlTest plan
pnpm testresolves all workspace package imports correctlySummary by CodeRabbit
Chores
Documentation
Examples