Skip to content

feat: support vite lint/build/test#38

Merged
Brooooooklyn merged 9 commits intomainfrom
08-11-_wip_feat_support_vite_build
Aug 21, 2025
Merged

feat: support vite lint/build/test#38
Brooooooklyn merged 9 commits intomainfrom
08-11-_wip_feat_support_vite_build

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

No description provided.

@Brooooooklyn Brooooooklyn changed the base branch from main to refactor-task-id August 13, 2025 09:05
@Brooooooklyn Brooooooklyn requested a review from Copilot August 14, 2025 04:26

This comment was marked as outdated.

@Brooooooklyn
Copy link
Copy Markdown
Member Author

cursor review

@Brooooooklyn Brooooooklyn requested a review from Copilot August 14, 2025 04:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Vite lint and build commands by implementing native bindings for oxlint and vite, replacing the previous tsdown-based TypeScript compilation with direct tsc usage, and updating dependencies to their latest versions.

  • Adds new CLI commands lint and build with native binding support
  • Replaces tsdown with TypeScript compiler for CLI package builds
  • Updates workspace dependencies to newer versions (oxlint, vite, TypeScript, etc.)

Reviewed Changes

Copilot reviewed 20 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pnpm-workspace.yaml Updates catalog versions for various dependencies and adds oxlint
packages/cli/tsdown.config.ts Removes tsdown configuration file
packages/cli/tsconfig.json Adds TypeScript compiler options for direct compilation
packages/cli/src/lint.ts Implements lint command resolver using oxlint
packages/cli/src/build.ts Implements build command resolver using vite
packages/cli/src/bin.ts Main entry point that registers lint and build resolvers
packages/cli/package.json Updates build script and adds oxlint dependency
packages/cli/binding/src/lib.rs Adds Rust bindings for CLI options and command resolution
packages/cli/binding/index.js Updates native binding loading with version checks
packages/cli/binding/Cargo.toml Adds dependencies for futures and vite_error
package.json Updates package manager version and lint configuration
crates/vite_task/src/schedule.rs Refactors task execution to support built-in commands
crates/vite_task/src/main.rs Updates main function signature to accept CLI options
crates/vite_task/src/lint.rs Implements lint task execution logic
crates/vite_task/src/lib.rs Adds CLI options structure and new command variants
crates/vite_task/src/execute.rs Updates task execution to work with resolved commands
crates/vite_task/src/config/workspace.rs Adds partial workspace loading for built-in commands
crates/vite_task/src/config/mod.rs Adds built-in task resolution and command structures
crates/vite_task/src/build.rs Implements build task execution logic
crates/vite_error/src/lib.rs Adds error variants for lint and build failures
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Brooooooklyn Brooooooklyn changed the title feat: support vite lint/build feat: support vite lint/build/test Aug 14, 2025
@Brooooooklyn Brooooooklyn marked this pull request as ready for review August 14, 2025 07:22
@Brooooooklyn Brooooooklyn force-pushed the 08-11-_wip_feat_support_vite_build branch from 7f64535 to e070085 Compare August 20, 2025 14:40
Base automatically changed from refactor-task-id to main August 21, 2025 09:30
@Brooooooklyn Brooooooklyn force-pushed the 08-11-_wip_feat_support_vite_build branch from 767d731 to 2d82301 Compare August 21, 2025 09:31
@Brooooooklyn Brooooooklyn merged commit ec411f9 into main Aug 21, 2025
3 checks passed
@Brooooooklyn Brooooooklyn deleted the 08-11-_wip_feat_support_vite_build branch August 21, 2025 09:35
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Brooooooklyn added a commit that referenced this pull request Mar 17, 2026
…ection

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
graphite-app bot pushed a commit that referenced this pull request Mar 17, 2026
…ection (#986)

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches low-level `/dev/tty` I/O, raw-mode handling, and timeout/polling logic, so regressions could reintroduce hangs or garbled terminal output in edge-case terminals/environments.
>
> **Overview**
> Makes terminal color detection for the Vite+ CLI header more robust by replacing ad-hoc OSC query handling with a centralized `is_osc_query_unsupported()` pre-screen and a DA1 “sandwich” sentinel to quickly detect terminals that won’t answer OSC color queries.
>
> Reworks `query_terminal_colors` to send BEL-terminated OSC 10/4 queries plus DA1, parse responses from `/dev/tty` via `BufReader` with delimiter-aware reads, apply SSH-aware timeouts, and drain DA1/CSI output to prevent escape-sequence leakage; adds extensive unit tests covering hex/RGB parsing edge cases, BEL termination, stream parsing helpers, and a non-hanging regression test.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2ca0070. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
graphite-app bot pushed a commit that referenced this pull request Mar 18, 2026
…ection (#986)

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes low-level `/dev/tty` I/O and escape-sequence parsing to avoid hangs/leaked output across many terminal environments; mistakes could regress header color detection or terminal interaction timing.
>
> **Overview**
> Makes Vite+ header color probing **more robust across terminal emulators and container/CI environments** by replacing ad-hoc OSC query handling with a centralized `is_osc_query_unsupported()` gate plus the *DA1 sandwich* technique to detect lack of OSC support without waiting for timeouts.
>
> Reworks `query_terminal_colors` to send **BEL-terminated** OSC queries (urxvt workaround), parse responses **sequentially from the tty stream** via `BufReader` (with a poll-based, deadline-aware reader), and drain trailing DA1 output; also adds SSH-aware timeouts.
>
> Expands unix test coverage for hex/RGB parsing, BEL termination, mixed-response buffers, `read_until_either`, and includes a regression test ensuring `query_terminal_colors` doesn’t hang in CI.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a2f3399. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
graphite-app bot pushed a commit that referenced this pull request Mar 18, 2026
…ection (#986)

Replace ad-hoc environment checks (CI, Warp, tmux, Docker) with a
comprehensive `is_osc_query_unsupported()` pre-screen modelled after
`terminal-colorsaurus`, and implement the DA1 sandwich technique to
detect unsupported terminals at runtime without waiting for timeouts.

Key changes:
- Centralized quirks detection covering CI, Docker, devcontainers,
  Kubernetes, Emacs, GNU Screen, Eterm, tmux, and TERM=dumb
- DA1 sentinel query appended after OSC queries; if its response
  arrives first the terminal doesn't support OSC and we bail immediately
- drain_da1() consumes the trailing DA1 response to prevent leaks
- BEL terminator instead of ST to work around urxvt response bug
- SSH-aware timeout (1000ms vs 200ms local)
- Ported regression test from terminal-colorsaurus issue #38
- Extended test coverage for parsing edge cases

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes low-level `/dev/tty` I/O and escape-sequence parsing to avoid hangs/leaked output across many terminal environments; mistakes could regress header color detection or terminal interaction timing.
>
> **Overview**
> Makes Vite+ header color probing **more robust across terminal emulators and container/CI environments** by replacing ad-hoc OSC query handling with a centralized `is_osc_query_unsupported()` gate plus the *DA1 sandwich* technique to detect lack of OSC support without waiting for timeouts.
>
> Reworks `query_terminal_colors` to send **BEL-terminated** OSC queries (urxvt workaround), parse responses **sequentially from the tty stream** via `BufReader` (with a poll-based, deadline-aware reader), and drain trailing DA1 output; also adds SSH-aware timeouts.
>
> Expands unix test coverage for hex/RGB parsing, BEL termination, mixed-response buffers, `read_until_either`, and includes a regression test ensuring `query_terminal_colors` doesn’t hang in CI.
>
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a2f3399. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
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.

3 participants