Skip to content

Deno support#105

Closed
LadyBluenotes wants to merge 6 commits intomainfrom
deno-support
Closed

Deno support#105
LadyBluenotes wants to merge 6 commits intomainfrom
deno-support

Conversation

@LadyBluenotes
Copy link
Copy Markdown
Member

@LadyBluenotes LadyBluenotes commented Mar 30, 2026

Summary

  • add Deno workspace support to readWorkspacePatterns, including deno.json and deno.jsonc
  • handle JSONC comments and trailing commas so Deno workspace config parses cleanly without a new dependency
  • expand coverage across workspace parsing, project context resolution, and setup-github-actions so Deno monorepos resolve their workspace root and monorepo paths correctly

Summary by CodeRabbit

  • New Features
    • Deno monorepo configuration support via deno.json and deno.jsonc files
    • GitHub Actions workflows now detect and write to monorepo roots with proper path substitutions
    • JSONC (JSON with comments) support in configuration file parsing
    • Enhanced workspace-scoped staleness detection for monorepo packages

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4e6c0327-53f1-496d-b0a5-dc5fc755ccbf

📥 Commits

Reviewing files that changed from the base of the PR and between 2f29aa2 and 288baed.

📒 Files selected for processing (8)
  • .changeset/spicy-laws-burn.md
  • .changeset/vast-bags-switch.md
  • packages/intent/src/cli-support.ts
  • packages/intent/src/workspace-patterns.ts
  • packages/intent/tests/cli.test.ts
  • packages/intent/tests/project-context.test.ts
  • packages/intent/tests/setup.test.ts
  • packages/intent/tests/workspace-patterns.test.ts

📝 Walkthrough

Walkthrough

This pull request adds support for Deno workspace configuration to the Intent package. It extends monorepo detection to recognize deno.json and deno.jsonc files in addition to package.json workspaces, implements workspace-aware GitHub Actions workflow generation, and introduces early-return logic for single-package contexts.

Changes

Cohort / File(s) Summary
Changeset Files
.changeset/spicy-laws-burn.md, .changeset/vast-bags-switch.md
Added patch release declarations for @tanstack/intent documenting Deno monorepo setup coverage and GitHub workflow generation at workspace root.
Core Workspace Detection
packages/intent/src/workspace-patterns.ts
Introduced JSONC parsing utilities (stripJsonCommentsAndTrailingCommas, readJsonFile) and extended workspace discovery to recognize deno.json and deno.jsonc files alongside package.json. Parsing failures emit warnings and continue gracefully.
CLI Support & Context Resolution
packages/intent/src/cli-support.ts
Refactored path resolution to use resolve() instead of join(), introduced resolveProjectContext function to compute project/workspace context, and added early-return logic when target resolves to a single package context.
CLI & Integration Tests
packages/intent/tests/cli.test.ts, packages/intent/tests/setup.test.ts
Added three new CLI tests: monorepo workflow generation at root, workspace-scoped stale detection by path, and stale detection from package directory. Added integration test verifying workflows are written to monorepo root with workspace-aware path substitutions.
Unit Tests
packages/intent/tests/project-context.test.ts, packages/intent/tests/workspace-patterns.test.ts
Added test coverage for resolveProjectContext with Deno workspaces and extended readWorkspacePatterns tests for Deno workspace files, including priority handling when both package.json and Deno configs exist, plus error-handling for malformed deno.jsonc.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI as setup-github-actions
    participant Context as resolveProjectContext
    participant Workspace as readWorkspacePatterns
    participant FS as File System

    User->>CLI: Run setup-github-actions from package dir
    CLI->>Context: Compute project context
    Context->>FS: Read package.json, deno.json(c)
    FS-->>Context: File contents (JSONC-parsed)
    Context->>Workspace: Extract workspace patterns
    Workspace-->>Context: Monorepo patterns (e.g., packages/*)
    Context-->>CLI: Context with workspaceRoot & patterns
    CLI->>CLI: Early-return: target is single package
    CLI->>FS: Write workflows to workspaceRoot/.github
    FS-->>User: Workflows created at monorepo root
Loading
sequenceDiagram
    actor User
    participant CLI as stale CLI
    participant Support as resolveStaleTargets
    participant Context as resolveProjectContext
    participant Workspace as readWorkspacePatterns
    participant Check as checkStaleness

    User->>CLI: stale packages/router/skills --json
    CLI->>Support: Resolve targets with cwd & targetDir
    Support->>Context: Compute context for target
    Context->>Workspace: Detect workspace root & patterns
    Workspace-->>Context: Monorepo info
    Context-->>Support: Project context with packageRoot
    Support->>Support: Early-return: single package detected
    Support->>Check: checkStaleness(context.packageRoot)
    Check-->>User: Stale report for `@tanstack/router` only
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Through Deno's workspace gates we hop,
Monorepos dance, workflows flow non-stop,
From deno.jsonc patterns unfurled,
GitHub actions now span the whole world,
Intent's reach expanded, a leap so divine! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deno-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 30, 2026

View your CI Pipeline Execution ↗ for commit 288baed

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 18:19:10 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 30, 2026

View your CI Pipeline Execution ↗ for commit 288baed

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-30 18:18:33 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 30, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tanstack/intent@105

commit: 288baed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant