Skip to content

fix(migrate): detect existing staged config with the AST key check - #3575

Merged
fengmk2 merged 4 commits into
voidzero-dev:mainfrom
jong-kyung:fix/migrate-staged-key-detection
Nov 25, 2026
Merged

fengmk2 merged 4 commits into
voidzero-dev:mainfrom
jong-kyung:fix/migrate-staged-key-detection

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

vp migrate used the regex /\bstaged\s*:/ to check whether vite.config.ts already had a staged key. This lost lint-staged rules in two ways:

  • A staged: inside a comment or a nested object counted as existing config. In this case lint-staged was removed from package.json without being merged.
  • A quoted 'staged' key or a { staged } shorthand was missed. In this case .lintstagedrc.json was merged as a duplicate key and then deleted.

The check now uses hasConfigKey, the AST check that the other config keys already use. New snapshot fixtures cover both cases.

@jong-kyung jong-kyung self-assigned this Nov 25, 2026
@jong-kyung jong-kyung added test: e2e Auto run e2e tests test: create-e2e Run `vp create` e2e tests labels Nov 25, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T07:03:02.154917Z c36026f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c36026fd50

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jong-kyung
jong-kyung marked this pull request as ready for review November 25, 2026 06:58
@jong-kyung
jong-kyung requested a review from fengmk2 November 25, 2026 06:59
@fengmk2
fengmk2 merged commit 9f552db into voidzero-dev:main Nov 25, 2026
118 checks passed
@jong-kyung
jong-kyung deleted the fix/migrate-staged-key-detection branch November 25, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants