Skip to content

0.5.0#423

Merged
aidenybai merged 2 commits intomainfrom
0-5-0
Feb 16, 2026
Merged

0.5.0#423
aidenybai merged 2 commits intomainfrom
0-5-0

Conversation

@aidenybai
Copy link
Owner

@aidenybai aidenybai commented Feb 16, 2026

Note

Medium Risk
Changes packaging surface area (removes monitoring exports) and rewrites the CLI behavior, which may break existing users and relies on file-injection heuristics for setup.

Overview
Removes the entire core/monitor production monitoring feature and all related package exports/types, plus associated internal store fields and options callbacks.

Replaces the Playwright-based npx react-scan <url> workflow with a new interactive npx react-scan init command that auto-detects Next.js/Vite/Webpack projects, previews a diff, optionally installs react-scan, and injects the script/import into the appropriate entry file.

Adds Playwright E2E coverage via a new kitchen-sink e2e-fixture and e2e/*.spec.ts, switches linting from Biome to oxlint, and cleans up dead/duplicated utilities and outline/animation code while simplifying the README to the new init flow.

Written by Cursor Bugbot for commit 3135bc3. This will update automatically on new commits. Configure here.

@aidenybai aidenybai changed the title fix 0.5.0 Feb 16, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/aidenybai/react-scan@423

commit: 3135bc3

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

INSTALL_COMMANDS,
detectProject,
generateDiff,
previewTransform,
Copy link

@vercel vercel bot Feb 16, 2026

Choose a reason for hiding this comment

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

Incorrect import extension in cli.mts causes module resolution failure when compiled to CJS format

Fix on Vercel

@vercel
Copy link

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
react-scan Skipped Skipped Feb 16, 2026 9:46pm

Comment on lines +269 to +273
const headMatch = newContent.match(/<Head>([\s\S]*?)<\/Head>/);
if (headMatch) {
newContent = newContent.replace('<Head>', `<Head>${injection}`);
} else {
const selfClosingHeadMatch = newContent.match(/<Head\s*\/>/);
Copy link

Choose a reason for hiding this comment

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

Suggested change
const headMatch = newContent.match(/<Head>([\s\S]*?)<\/Head>/);
if (headMatch) {
newContent = newContent.replace('<Head>', `<Head>${injection}`);
} else {
const selfClosingHeadMatch = newContent.match(/<Head\s*\/>/);
const headMatch = newContent.match(/<Head[^>]*>([\s\S]*?)<\/Head>/);
if (headMatch) {
const headOpeningTag = headMatch[0].match(/<Head[^>]*>/)[0];
newContent = newContent.replace(headOpeningTag, `${headOpeningTag}${injection}`);
} else {
const selfClosingHeadMatch = newContent.match(/<Head[^>]*\s*\/>/);

The transformNextPagesRouter function fails to inject React Scan script when the Next.js _document file uses Head component with attributes (e.g., or or their self-closing variants)

Fix on Vercel

message: 'Could not find <head> tag in index.html',
};
}

Copy link

Choose a reason for hiding this comment

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

Missing case-insensitive HEAD tag matching and content validation in transformVite and transformWebpack functions causes potential false positives when HTML uses uppercase HEAD tags or in edge cases where injection fails

Fix on Vercel

@aidenybai aidenybai merged commit 9d38ffe into main Feb 16, 2026
7 checks passed
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