Skip to content

[APPS-2961] Update: warn that Vite below 6.4 is deprecated and run the repo on Node 24 - #627

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
tiffany.trinh/apps-2961-vite-deprecation-warning
Oct 28, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
tiffany.trinh/apps-2961-vite-deprecation-warning

Conversation

@tyffical

@tyffical tyffical commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Changes

8 changes across vite-version.ts, index.ts, vite-version.test.ts, index.test.ts, package.json, publish.yaml and nockInterceptors.test.ts
What changed File
Adds the supported range, 6.4 to 8.x, and one function that parses a version with semver and returns the warning for one outside it, or nothing for an unreadable one. vite-version.ts
Below 6.4 the warning says the version is deprecated and asks for Vite 6.4 or later; above 8.x it says the plugin is tested up to 8.x. vite-version.ts
Warns once at startup, for every plugin, when the bundler is a Vite outside that range. index.ts
Tests the warning for each version, other bundlers and logLevel: 'none', and ties the upper bound to the declared peer range. vite-version.test.ts, index.test.ts
Adds semver 7.7.2, already in the lockfile, as a dependency of @dd/factory and so of each published plugin. package.json
Moves the Volta pin, which local development and every CI job use, from Node 20.19.4 to 24.14.1. package.json
Points the publish job at that pin instead of its own "24", as the other workflows do. publish.yaml
Corrects the comment on the nock suite, which now skips on the pinned Node. nockInterceptors.test.ts

QA Instructions

  • All 3 checks pass on a minimal Vite app with this branch's packed plugin, verified at f55653d9. Setup: build-plugins: Testing and QA Guide.
  • No staging QA: the change is a startup message, with no request to Datadog.
Check Result Evidence
vite build on Vite 5.4.21 and 6.3.5 Installs and builds, with the warning Vite 5.4.21 is deprecated in Datadog's Vite plugin: 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 19ms
Full unit suite on Node 24.14.1 Pass 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.3.5 6.4.5 8.3.4
# 5.4.21 and 6.3.5: [warn|vite|factory] Vite <version> is deprecated in Datadog's Vite plugin: please upgrade to Vite 6.4 or later.
# 6.4.5 and 8.3.4: ✓ built, no warning
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 (installed 5.4.21): build exit 0
[warn|vite|factory] Vite 5.4.21 is deprecated in Datadog's Vite plugin: 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] Vite 6.3.5 is deprecated in Datadog's Vite plugin: please upgrade to Vite 6.4 or later.
✓ built in 29ms
== 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 19ms

Blast Radius

  • No feature flag. Low risk: a startup warning only; the peer range and every install stay the same.
  • Builds on Vite below 6.4 or above 8.x print one more warning line, which also counts toward the metrics plugin's warnings.count.

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
Narrowing the peer range to >=6.4.0 <9 Deferred to the next major #626
Publishing Independent Tiffany cuts the release

Documentation

🤖 Generated with Claude Code

@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

@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 <= 4.76 ns
chrome Tiny clean <= 0.01 ns
firefox Hot clean <= 9.86 ns
firefox Tiny clean <= 0.18 ns
safari Hot clean <= 5.29 ns
safari Tiny clean <= 1.01 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                 <= 4.76 ns        <= 8.57%   4.73..4.76 ns  -0.01..0.01 ns   4.72..4.76 ns   -0.01  50.485 ms     54.785 ms  102 (trim 20%, outliers 10.8%)
chrome   Tiny      clean                 <= 0.01 ns        <= 0.09%  -0.01..0.01 ns  -0.02..0.01 ns  -0.01..0.01 ns   -0.24  53.658 ms     53.640 ms  102 (trim 20%, outliers 10.8%)
firefox  Hot       clean                 <= 9.86 ns       <= 35.96%   9.84..9.86 ns  -0.01..0.00 ns   9.84..9.86 ns    0.05  40.660 ms     55.260 ms  102 (trim 20%, outliers 10.8%)
firefox  Tiny      clean                 <= 0.18 ns        <= 1.19%   0.17..0.18 ns  -0.00..0.00 ns   0.17..0.18 ns    0.16  53.220 ms     53.840 ms   102 (trim 20%, outliers 6.9%)
safari   Hot       clean                 <= 5.29 ns       <= 19.46%   5.27..5.28 ns  -0.00..0.00 ns   5.27..5.29 ns    0.00  46.380 ms     55.380 ms   102 (trim 20%, outliers 2.9%)
safari   Tiny      clean                 <= 1.01 ns       <= 24.02%   0.99..1.01 ns  -0.00..0.00 ns   1.00..1.01 ns    0.32  46.380 ms     57.400 ms   102 (trim 20%, outliers 4.9%)

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

@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-27T20:33:19.965081Z 55ed924 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.

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.

🟡 Changes recommended

Four remaining style findings require named locals for nested calls and regular-expression setup in warning logging and test assertions to follow repository conventions.

4 open issues
What changed in this PR

Adds advisory Vite version warnings through the shared plugin factory while preserving the existing peer dependency range. It also moves the repository’s Node.js pin to 24.14.1.

Changes:

  • Warns for Vite below 6.4 or above the tested 8.x range without blocking builds.
  • Adds version-check and factory tests covering warning text, other bundlers, and disabled logging.
  • Updates the Volta Node.js pin from 20.19.4 to 24.14.1.
File Description
packages/​factory/​src/​index.ts Emits the Vite version warning during initialization.
packages/​factory/​src/​index.test.ts Tests warning behavior and logging suppression.
packages/​factory/​src/​helpers/​vite-version.ts Defines version bounds, checks, and warning messages.
packages/​factory/​src/​helpers/​vite-version.test.ts Tests version handling, message wording, and peer-range alignment.
package.json Pins repository development to Node.js 24.14.1.

Review effort: Balanced

Comment thread packages/factory/src/helpers/vite-version.test.ts Outdated
Comment thread packages/factory/src/helpers/vite-version.test.ts Outdated
Comment thread packages/factory/src/index.test.ts Outdated
Comment thread packages/factory/src/index.ts Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 55ed924ba0

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

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

Active style findings call for named locals to separate warning formatting from logging and test computations from assertions.

4 open issues

Review effort: Balanced

Comment thread packages/factory/src/helpers/vite-version.ts Outdated
Comment thread package.json
tyffical and others added 2 commits October 28, 2026 11:06
Volta's pin sets the Node version for local development and for every CI job (setup-node reads it). Node 20 reached end of life on 2026-04-30; the publish job already uses Node 24.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every plugin now warns at startup on an older Vite, and on a Vite above 8.x, while the peer range stays `>= 5.x <= 8.x` so no install breaks. A test ties the upper bound 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-deprecation-warning branch from 281bc20 to f55653d Compare October 28, 2026 15:06

@yoannmoinet yoannmoinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@tyffical

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-28 16:24:05 UTC ℹ️ Start processing command /merge


2026-10-28 16:24:10 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2m (p90).


2026-10-28 16:25:33 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 2c90f11 into master Oct 28, 2026
9 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the tiffany.trinh/apps-2961-vite-deprecation-warning branch October 28, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants