Skip to content

feat: add skipVersionCheck option to silence outdated warning#294

Open
maastrich wants to merge 1 commit into
aidenybai:mainfrom
maastrich:feat/skip-version-check
Open

feat: add skipVersionCheck option to silence outdated warning#294
maastrich wants to merge 1 commit into
aidenybai:mainfrom
maastrich:feat/skip-version-check

Conversation

@maastrich
Copy link
Copy Markdown

@maastrich maastrich commented Apr 13, 2026

Closes #293.

Summary

Adds a skipVersionCheck option so consumers can opt out of the npm version check in logIntro (and the associated [React Grab] vX is outdated ... console warning). Useful for projects that pin versions intentionally, run in environments where the network request is undesirable, or simply want a quiet console.

Changes

  • Options.skipVersionCheck?: boolean (defaults to false) in packages/react-grab/src/types.ts
  • logIntro accepts { skipVersionCheck } and short-circuits before the fetch when true
  • init() forwards the option to logIntro
  • getScriptOptions() parses data-options='{"skipVersionCheck": true}' from the script tag
  • Changeset added (minor)

The intro banner still logs as before — only the network check + warning are gated.

Usage

import { init } from "react-grab";

init({ skipVersionCheck: true });

Or via the script tag:

<script src="..." data-options='{"skipVersionCheck": true}'></script>

Checks

  • pnpm --filter react-grab typecheck passes

Note

Low Risk
Low risk: adds an optional flag that only short-circuits the startup version-check fetch and related warning, without changing core grabbing/overlay behavior.

Overview
Adds a new Options.skipVersionCheck flag that lets consumers opt out of React Grab’s startup npm version check (and the associated “outdated” console warning) while keeping the intro banner log unchanged.

init() now forwards the option into logIntro, logIntro returns early before performing the network fetch when enabled, and getScriptOptions() supports parsing skipVersionCheck from the script tag’s data-options JSON. Includes a changeset for a minor react-grab release.

Reviewed by Cursor Bugbot for commit 723cfae. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Add a skipVersionCheck option to react-grab to bypass the npm version check in logIntro and silence the outdated-version warning. Default is false; the intro banner still logs.

  • New Features
    • Added Options.skipVersionCheck?: boolean, including data-options script-tag support.
    • init() forwards the option to logIntro, which short-circuits the network request and warning when true.

Written for commit 723cfae. Summary will update on new commits.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 13, 2026

@maastrich is attempting to deploy a commit to the Million Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Copy link
Copy Markdown

@Clemlvt Clemlvt left a comment

Choose a reason for hiding this comment

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

LGTM

@maastrich maastrich force-pushed the feat/skip-version-check branch from 728af8e to 0c10330 Compare May 7, 2026 10:29
@maastrich maastrich force-pushed the feat/skip-version-check branch from 0c10330 to 723cfae Compare May 11, 2026 13:48
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.

Add option to silence version check warning

3 participants