Skip to content

[APPS-2961] Update: support Vite 6.4 to 8.x - #626

Draft
tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2961-vite-6-4-floor
Draft

tyffical wants to merge 1 commit into
masterfrom
tiffany.trinh/apps-2961-vite-6-4-floor

Conversation

@tyffical

@tyffical tyffical commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Changes

3 changes across vite-version.ts, vite-version.test.ts and vite-plugin/package.json
What changed File
Names the supported range, 6.4.0 to 8.x, in the startup warning, and asks for Vite 6.4 or later below it. vite-version.ts
Tests the new wording and ties both bounds of the check to the declared peer range. vite-version.test.ts
Sets the peer range to vite >=6.4.0 <9. vite-plugin/package.json

QA Instructions

  • All 4 checks pass on a minimal Vite app with this branch's packed plugin, verified at b079239f. Setup: build-plugins: Testing and QA Guide.
  • No staging QA: the change is a startup message and a package range, with no request to Datadog.
Check Result Evidence
npm install on Vite 5.4.21 Fails ERESOLVE: npm refuses the narrowed peer range
Same with --legacy-peer-deps, then vite build on Vite 5.4.21 and 6.3.5 Builds, with the warning Datadog's Vite plugin supports Vite 6.4.0 to 8.x (found 5.4.21): please upgrade to Vite 6.4 or later.
vite build on Vite 6.4.5 and 8.3.4 Builds, no warning ✓ built in 30ms and 22ms
Full unit suite on Node 24.14.1 Passes TMPDIR=/private/tmp yarn test:unit below
yarn install && yarn build:all && (cd packages/published/vite-plugin && yarn pack -o /tmp/vite-plugin.tgz)
sh run.sh /tmp/vite-plugin.tgz 5.4.21 6.4.5 8.3.4
# 5.4.21: npm install failed: ERESOLVE. 6.4.5 and 8.3.4: ✓ built, no warning
NPM_FLAGS=--legacy-peer-deps sh run.sh /tmp/vite-plugin.tgz 5.4.21 6.3.5
# [warn|vite|factory] Datadog's Vite plugin supports Vite 6.4.0 to 8.x (found <version>): please upgrade to Vite 6.4 or later.
TMPDIR=/private/tmp yarn test:unit
# Test Suites: all passed
run.sh and its output
#!/usr/bin/env bash
# Usage: [NPM_FLAGS=...] run.sh <plugin-tgz> <vite-version>...
# For each Vite version: a minimal project with the packed plugin, installed with npm, then `vite build` with the plugin's default log level.
set -u
TGZ="$1"; shift
ROOT="$(cd "$(dirname "$0")" && pwd)"
for V in "$@"; do
  APP="$ROOT/app-$V"; mkdir -p "$APP/src"
  printf '{"name":"qa-vite-%s","private":true,"type":"module"}\n' "$V" > "$APP/package.json"
  printf '<!doctype html><html><body><script type="module" src="/src/main.js"></script></body></html>\n' > "$APP/index.html"
  printf 'document.body.textContent = "hello";\n' > "$APP/src/main.js"
  printf "import { datadogVitePlugin } from '@datadog/vite-plugin';\nexport default { plugins: [datadogVitePlugin({})] };\n" > "$APP/vite.config.js"
  (cd "$APP" && npm install --no-audit --no-fund --ignore-scripts ${NPM_FLAGS:-} "vite@$V" "$TGZ" > npm.log 2>&1) || { echo "== vite $V: npm install failed: $(grep -m1 -o 'ERESOLVE.*' "$APP/npm.log")"; continue; }
  OUT="$(cd "$APP" && BUILD_PLUGINS_ENV=test node node_modules/vite/bin/vite.js build 2>&1)"; CODE=$?
  printf '== vite %s (installed %s): build exit %s\n' "$V" "$(node -p "require('$APP/node_modules/vite/package.json').version")" "$CODE"
  printf '%s\n' "$OUT" | sed 's/\x1b\[[0-9;]*m//g' | grep -E "warn\|vite\|factory|built in"
done
== vite 5.4.21: npm install failed: ERESOLVE
== vite 6.4.5 (installed 6.4.5): build exit 0
✓ built in 30ms
== vite 8.3.4 (installed 8.3.4): build exit 0
✓ built in 22ms
== vite 5.4.21 (installed 5.4.21): build exit 0
[warn|vite|factory] Datadog's Vite plugin supports Vite 6.4.0 to 8.x (found 5.4.21): please upgrade to Vite 6.4 or later.
✓ built in 29ms
== vite 6.3.5 (installed 6.3.5): build exit 0
[warn|vite|factory] Datadog's Vite plugin supports Vite 6.4.0 to 8.x (found 6.3.5): please upgrade to Vite 6.4 or later.
✓ built in 31ms

Blast Radius

  • No feature flag. Medium risk: narrowing a peer range is breaking for npm users, so it waits for the next major.
  • npm users on Vite below 6.4 get ERESOLVE on a fresh install or update that picks up this version, ~ ranges included, until they upgrade Vite or pass --legacy-peer-deps.
  • Every plugin keeps working on old Vite once installed.

Out of Scope / Follow-ups

3 items deferred
Item Status Next step
The apps plugin refuses Vite below 6.4 at startup In review #622
The warning-only change that keeps the peer range Base PR, ships first as a minor #627
Publishing Independent Tiffany cuts the release

Documentation

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Live Debugger Runtime Benchmark

SDK-loaded dormant-probe runtime overhead, measured against an uninstrumented bundle in the same browser session.

Browser Workload Quality Per-call overhead upper
chrome Hot clean <= 2.56 ns
chrome Tiny clean <= 0.01 ns
firefox Hot clean <= 9.29 ns
firefox Tiny clean <= 0.03 ns
safari Hot clean <= 5.53 ns
safari Tiny clean <= 0.66 ns

What do the Tiny and Hot workloads represent?

Browser Debugger SDK: 7.16.2 · built 2026-10-27 · S3 ETag 872de873

Full diagnostics
browser  workload  quality  per-call overhead upper  overhead upper          95% CI         A/A diag        block CI  acf(1)   baseline  instrumented                         samples
-------  --------  -------  -----------------------  --------------  --------------  ---------------  --------------  ------  ---------  ------------  ------------------------------
chrome   Hot       clean                 <= 2.56 ns        <= 5.15%   2.52..2.56 ns   -0.01..0.01 ns   2.52..2.56 ns    0.01  52.650 ms     55.342 ms   102 (trim 20%, outliers 5.9%)
chrome   Tiny      clean                 <= 0.01 ns        <= 0.15%  -0.01..0.01 ns   -0.01..0.01 ns  -0.01..0.01 ns   -0.23  57.052 ms     57.012 ms  102 (trim 20%, outliers 10.8%)
firefox  Hot       clean                 <= 9.29 ns       <= 36.85%   9.27..9.29 ns   -0.01..0.00 ns   9.26..9.29 ns    0.05  40.180 ms     54.980 ms   102 (trim 20%, outliers 8.8%)
firefox  Tiny      clean                 <= 0.03 ns        <= 0.22%   0.02..0.03 ns   -0.00..0.01 ns   0.02..0.03 ns    0.38  53.770 ms     53.860 ms   102 (trim 20%, outliers 7.8%)
safari   Hot       clean                 <= 5.53 ns       <= 22.10%   5.52..5.53 ns  -0.01..-0.00 ns   5.52..5.53 ns    0.01  45.380 ms     55.380 ms   102 (trim 20%, outliers 5.9%)
safari   Tiny      clean                 <= 0.66 ns       <= 17.53%   0.63..0.65 ns   -0.00..0.00 ns   0.63..0.66 ns    0.09  46.980 ms     55.060 ms   102 (trim 20%, outliers 1.0%)

Raw samples are in the live-debugger-runtime-bench-results artifact.

@tyffical
tyffical requested a balanced review from Copilot October 27, 2026 18:17
@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T18:20:14.409125Z 249346b Manual request
ℹ️ 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: 249346b996

ℹ️ 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".

Comment thread packages/factory/src/helpers/vite-version.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The shared Node runtime upgrade still needs confirmation from cross-bundler CI and end-to-end checks beyond the reported unit-suite results.

No open issues 🎉

What changed in this PR

This PR raises the Datadog Vite plugin’s minimum supported version to 6.4 and moves the repository’s shared Node runtime pin to Node 24.

Changes:

  • Narrows the Vite peer range to >=6.4.0 <9 and documents the major-version migration.
  • Adds an advisory startup warning for older Vite versions, with tests for version detection and logging behavior.
  • Updates the Volta Node pin from 20.19.4 to 24.14.1.
File Description
yarn.lock Synchronizes the Vite peer range.
packages/​published/​vite-plugin/​package.json Declares the new Vite support range.
packages/​factory/​src/​index.ts Logs the unsupported-Vite warning during initialization.
packages/​factory/​src/​index.test.ts Tests warning behavior and disabled logging.
packages/​factory/​src/​helpers/​vite-version.ts Defines the minimum version, check, and warning message.
packages/​factory/​src/​helpers/​vite-version.test.ts Tests version boundaries and unreadable inputs.
package.json Pins the repository runtime to Node 24.14.1.
MIGRATIONS.md Documents the Vite requirement for v4.

Review effort: Balanced

The peer range becomes `>=6.4.0 <9`, and the startup warning names that range for a Vite outside it, asking for Vite 6.4 or later below it, since Yarn and pnpm only warn about a peer range and npm's check can be skipped. A test ties the check's bounds to the peer range in package.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-6-4-floor branch from 85dc584 to b079239 Compare October 28, 2026 16:08
@tyffical
tyffical changed the base branch from master to tiffany.trinh/apps-2961-vite-deprecation-warning October 28, 2026 16:08
@tyffical tyffical changed the title [APPS-2961] Update: support Vite 6.4 or later and run the repo on Node 24 [APPS-2961] Update: support Vite 6.4 to 8.x Oct 28, 2026
Base automatically changed from tiffany.trinh/apps-2961-vite-deprecation-warning to master October 28, 2026 16:25
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.

2 participants