Skip to content

fix(core): key the global registry to major 3 - #902

Merged
HugoRCD merged 1 commit into
v3from
fix/registry-major-v3
Oct 17, 2026
Merged

HugoRCD merged 1 commit into
v3from
fix/registry-major-v3

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Written by an AI agent on behalf of @HugoRCD. @HugoRCD has reviewed it.

globalRegistry.ts still keyed the process-wide registry to major 2 after #878 bumped evlog to 3.0.0-beta.0. This sets it to 3.

What went wrong

EVLOG_MAJOR is a hardcoded constant, kept in sync with package.json only by test/toolkit/duplicate-install.test.ts. The version bump in #878 made that test fail on the v3 push (run 39044979143), but release.yml does not wait for ci, so 3.0.0-beta.0 was published with the old key.

In that beta, evlog 3 reads and writes the same Symbol.for('evlog.registry.v2') slot as evlog 2. With both majors in one process, for example a dependency still on 2.x, each copy overwrites the other's config, drain and redaction, and the multi-major warning never fires because both copies report major 2.

Before / after

Same test, on origin/v3 and on this branch:

# before (EVLOG_MAJOR = 2)
     × keys the registry to the package major so majors never share state 3ms
      Tests  1 failed | 9 passed (10)

# after (EVLOG_MAJOR = 3)
      Tests  10 passed (10)

CI on v3, same failure on Node 22 and 24:

FAIL  test/toolkit/duplicate-install.test.ts > duplicate installs (#462) > keys the registry to the package major so majors never share state
AssertionError: expected undefined to be { Object (env, pretty, ...) } // Object.is equality
 ❯ test/toolkit/duplicate-install.test.ts:143:26
    143|     expect(slot?.config).toBe(globalConfig)

Testing

  • pnpm test:coverage: 119 test files pass, thresholds met.
  • pnpm build:package and ESLint on the edited file: clean.
  • pnpm content:lint .changeset/registry-major-3.md: score 100.

The patch changeset makes the next beta 3.0.0-beta.1.

Not in this PR: release.yml publishing without waiting for ci, which is what let this ship.

ELI5: evlog keeps its settings in one shared place per major version so two copies of the same version agree, and two different versions stay apart. The first v3 beta still used version 2's place, so v2 and v3 could overwrite each other's settings. This gives v3 its own place.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
evi Ready Ready Preview Oct 17, 2026 3:39pm UTC
evlog-docs Ready Ready Preview, v0 Oct 17, 2026 3:39pm UTC
evlog-render-lab Ready Ready Preview Oct 17, 2026 3:39pm UTC
evlog-telemetry Ready Ready Preview Oct 17, 2026 3:39pm UTC
just-use-evlog Ready Ready Preview Oct 17, 2026 3:39pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3296c668-d5be-4702-9516-6c79ea0073e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Oct 17, 2026

Copy link
Copy Markdown
@evlog/cli

npm i https://pkg.pr.new/@evlog/cli@902

evlog

npm i https://pkg.pr.new/evlog@902

@evlog/nuxthub

npm i https://pkg.pr.new/@evlog/nuxthub@902

@evlog/signals

npm i https://pkg.pr.new/@evlog/signals@902

@evlog/telemetry

npm i https://pkg.pr.new/@evlog/telemetry@902

commit: 0b5fcb0

@HugoRCD
HugoRCD merged commit 7f74e73 into v3 Oct 17, 2026
16 of 21 checks passed

This branch was successfully deployed

5 active deployments
Preview – evlog-telemetry — 0b5fcb0f Deployed Oct 17, 2026 by vercel[bot]
Preview – evi — 0b5fcb0f Deployed Oct 17, 2026 by vercel[bot]
Preview – evlog-docs — 0b5fcb0f Deployed Oct 17, 2026 by vercel[bot]
Preview – just-use-evlog — 0b5fcb0f Deployed Oct 17, 2026 by vercel[bot]
Preview – evlog-render-lab — 0b5fcb0f Deployed Oct 17, 2026 by vercel[bot]
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