Skip to content

Conversation

@Rel1cx
Copy link
Owner

@Rel1cx Rel1cx commented Nov 4, 2025

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • Test
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • I have added a convincing reason for adding this feature, if necessary

Other information

@vercel
Copy link

vercel bot commented Nov 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
eslint-react Ready Ready Preview Comment Nov 4, 2025 8:23am

@Rel1cx Rel1cx requested a review from Copilot November 4, 2025 08:14
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 internal ID generation mechanism from a simple function to a class-based IdGenerator with configurable prefixes. The implementation changes from decimal string IDs to hexadecimal representation and uses bitwise OR operation on bigint values.

  • Replaced simple getId() function with IdGenerator class supporting custom prefixes
  • Updated all usages across component and hook collectors to use the new IdGenerator instances
  • Fixed a bug in component-collector.ts where duplicate ID generation was causing key collisions

Reviewed Changes

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

Show a summary per file
File Description
packages/shared/src/_id.ts Replaces simple getId() function with IdGenerator class featuring configurable prefixes and hexadecimal output
packages/shared/docs/classes/IdGenerator.md Adds API documentation for the new IdGenerator class
packages/shared/docs/README.md Updates index to include IdGenerator class reference
packages/core/src/hook/hook-collector.ts Migrates from getId() to IdGenerator instance with "hook_" prefix
packages/core/src/component/component-collector.ts Migrates to IdGenerator with "function_component_" prefix and fixes duplicate key generation bug
packages/core/src/component/component-collector-legacy.ts Migrates to IdGenerator instance with "class_component_" prefix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Rel1cx and others added 2 commits November 4, 2025 16:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: REL1CX <rel1cx@proton.me>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: REL1CX <rel1cx@proton.me>
@Rel1cx Rel1cx merged commit d85f9e6 into main Nov 4, 2025
11 of 12 checks passed
@Rel1cx Rel1cx deleted the id-generator branch November 4, 2025 08:34
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