Skip to content

Conversation

@davidjbradshaw
Copy link
Owner

No description provided.

@davidjbradshaw davidjbradshaw requested a review from Copilot August 29, 2025 12:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the codebase to replace commonly used string literals with named constants to improve maintainability and reduce the risk of typos. The refactoring extracts event names, message types, and dimension strings into centralized constants defined in the common/consts.js file.

Key changes:

  • Added 20+ new string constants to packages/common/consts.js for events, messages, and properties
  • Updated packages/core/index.js to use the new constants instead of string literals throughout message handling, event listeners, and DOM operations
  • Updated packages/child/index.js to use the new constants for consistency across the codebase

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/common/consts.js Defines new string constants for events, messages, and DOM properties
packages/core/index.js Replaces string literals with imported constants for message types, events, and dimensions
packages/child/index.js Replaces string literals with imported constants to maintain consistency

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@davidjbradshaw davidjbradshaw merged commit 44c323c into master Aug 29, 2025
7 checks passed
@davidjbradshaw davidjbradshaw deleted the new_consts branch August 29, 2025 12:18
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