Skip to content

fix(cli): re-export * from vitest#306

Merged
Brooooooklyn merged 25 commits intomainfrom
11-13-fix_cli_re-export_from_vitest
Nov 19, 2025
Merged

fix(cli): re-export * from vitest#306
Brooooooklyn merged 25 commits intomainfrom
11-13-fix_cli_re-export_from_vitest

Conversation

@Brooooooklyn
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member Author

Brooooooklyn commented Nov 13, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Brooooooklyn Brooooooklyn force-pushed the 11-13-fix_cli_re-export_from_vitest branch from f7ab1ca to 5c3a1ae Compare November 13, 2025 13:47
@Brooooooklyn Brooooooklyn force-pushed the 11-13-ci_prevent_vite-plus_to_be_built_twice branch from 9251182 to e68a67c Compare November 13, 2025 13:47
@Brooooooklyn Brooooooklyn changed the base branch from 11-13-ci_prevent_vite-plus_to_be_built_twice to graphite-base/306 November 14, 2025 05:08
@Brooooooklyn Brooooooklyn force-pushed the 11-13-fix_cli_re-export_from_vitest branch from 5c3a1ae to ddae522 Compare November 14, 2025 05:08
@graphite-app graphite-app Bot changed the base branch from graphite-base/306 to main November 14, 2025 05:09
@Brooooooklyn Brooooooklyn force-pushed the 11-13-fix_cli_re-export_from_vitest branch from ddae522 to 49fedfe Compare November 14, 2025 05:09
Copilot AI review requested due to automatic review settings November 14, 2025 06:42
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 refactors the CLI to properly re-export Vite and Vitest functionality while introducing a dedicated config module. The main goal is to separate config-related exports into their own entry point (/config) to improve modularity.

Key changes:

  • Introduces a new ./config export path that provides defineConfig and module augmentation for custom lint/fmt options
  • Restructures index.ts to explicitly re-export specific Vite types and functions instead of using wildcard exports
  • Filters out vitest's ./config export to prevent conflicts with the custom config implementation

Reviewed Changes

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

Show a summary per file
File Description
vite.config.ts Updates import path to use the new /config export
packages/tools/src/sync-remote-deps.ts Adds ./config to CLI-owned exports and filters it from vitest exports to prevent conflicts
packages/cli/src/index.ts Restructures exports to explicitly list Vite types/functions and adds Vitest test exports
packages/cli/src/config.ts New config module that augments Vite's UserConfig with lint/fmt options and re-exports vitest config
packages/cli/package.json Updates ./config export to point to the new config module
packages/cli/build.ts Adds config.ts to build inputs, updates externals, adds renderChunk hook for rolldown imports, and updates vite module declaration rewriting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/build.ts
Comment thread packages/cli/src/index.ts
Comment thread packages/cli/src/config.ts
Copilot AI review requested due to automatic review settings November 14, 2025 08:57
@Brooooooklyn Brooooooklyn force-pushed the 11-13-fix_cli_re-export_from_vitest branch from d3437f0 to e6cbb9f Compare November 14, 2025 08:57
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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/config.ts
Copilot AI review requested due to automatic review settings November 17, 2025 02:16
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

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/config.ts
Comment thread packages/cli/build.ts
Comment thread packages/cli/src/index.ts Outdated
Copilot AI review requested due to automatic review settings November 17, 2025 04:46
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

Copilot reviewed 20 out of 21 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/resolve-lint.ts Outdated
Comment thread packages/cli/src/resolve-lint.ts Outdated
Comment thread packages/cli/package.json
Comment thread packages/cli/tsconfig.json Outdated
Copilot AI review requested due to automatic review settings November 18, 2025 14:42
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/package.json
Comment thread packages/cli/build.ts
Comment thread packages/cli/snap-tests/command-doc/steps.json
Copilot AI review requested due to automatic review settings November 19, 2025 04:00
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

Copilot reviewed 23 out of 24 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/src/resolve-lint.ts Outdated
Comment thread pnpm-workspace.yaml
Copilot AI review requested due to automatic review settings November 19, 2025 04:21
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

Copilot reviewed 23 out of 24 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread packages/tools/src/sync-remote-deps.ts
Comment thread packages/cli/src/config.ts
Comment thread packages/cli/src/resolve-lint.ts Outdated
Copilot AI review requested due to automatic review settings November 19, 2025 05:20
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

Copilot reviewed 23 out of 24 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/package.json
Comment thread packages/cli/src/resolve-lint.ts
@Brooooooklyn Brooooooklyn merged commit 639b341 into main Nov 19, 2025
17 of 18 checks passed
@Brooooooklyn Brooooooklyn deleted the 11-13-fix_cli_re-export_from_vitest branch November 19, 2025 05:55
Comment thread package.json
Comment thread vitest.config.ts
@@ -1,4 +1,4 @@
import { defineConfig } from '@voidzero-dev/vite-plus';
import { defineConfig } from '@voidzero-dev/vite-plus/config';
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 Nov 19, 2025

Choose a reason for hiding this comment

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

Is exporting defineConfig from /config the final solution?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not sure... let's test in more repos

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