Skip to content

fix: don't mis-split event namespace when it contains a dot - #240

Open
lio-p wants to merge 1 commit into
clickgemsfrom
fix/galaxy-namespace-dot-split-clickgems
Open

fix: don't mis-split event namespace when it contains a dot#240
lio-p wants to merge 1 commit into
clickgemsfrom
fix/galaxy-namespace-dot-split-clickgems

Conversation

@lio-p

@lio-p lio-p commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

What

GalaxyClient.track() split the event string on every . and kept the
first 3 parts, so a namespace containing a literal dot (e.g. a package
name like ruamel.yaml) shifted the split and corrupted component/event.

Fix

Take the last two segments as component/eventName (short fixed literals,
never dotted) and everything before as namespace. No-op for the common
case; correct for dotted namespaces.

Same shared root-cause fix as #239 (against main), applied here for the
clickgems deployment where the dotted-namespace case is actively hit.

Testing

Added test/galaxy-client.test.js using Node's built-in node:test (no new
runtime dependency). Run with npm test. A tiny zero-dependency ESM resolver
hook (test/register.mjs, test/extensionless-resolver.mjs) lets the test
import the bundler-style source directly.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clickgems Ready Ready Preview, Comment Jul 22, 2026 4:58pm
clickpy Error Error Jul 22, 2026 4:58pm

Request Review

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