replaces the CRC32 and CRC32C implementations #553
Merged
shinyoshiaki merged 6 commits intodevelopfrom Feb 16, 2026
Merged
Conversation
【懸念事項】 `package-lock.json` 内には `import-test/node_modules/werift@0.22.7` 由来で `buffer-crc32` / `turbo-crc32` の記録が残っていますが、今回変更対象のワークスペース実装(ice/sctp/webrtc)には未使用で、要件達成の阻害は見当たりません。 【改善提案】 - 依存の完全整理を厳密に求めるなら、`import-test` の参照バージョン更新も別チケットで検討してください。 - 追加安心材料として、STUN fingerprint/SCTP checksum の既存テストケース名をレビュー記録に明記すると追跡性が上がります。 残りイテレーション回数: 0回
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request replaces the CRC32 and CRC32C implementations used in the STUN and SCTP modules with a unified, ESM-compatible, and type-safe solution. The main change is the removal of legacy dependencies (
buffer-crc32andturbo-crc32) in favor of a new, TypeScript-friendly implementation inpackages/common. This improves build compatibility, type safety, and maintainability across the codebase.Dependency and Compatibility Improvements
buffer-crc32andturbo-crc32dependencies frompackages/ice,packages/sctp, andpackages/webrtc, and replaced them with a new internal implementation for CRC32/CRC32C inpackages/common/src/crc.ts. This ensures ESM and TypeScript compatibility throughout the project. [1] [2] [3] [4]Core Implementation Changes
crc.tsmodule inpackages/commonproviding pure TypeScript implementations for both CRC32 and CRC32C, supporting Buffer, Uint8Array, and string inputs.packages/common/src/index.tsto include the new CRC utilities.Refactoring of CRC Usage
packages/ice/src/stun/message.tsto use the newcrc32function, removing the need for@ts-ignoreand buffer XOR logic. [1] [2]packages/sctp/src/chunk.tsto use the newcrc32cfunction.Documentation and Task Tracking
TICKET-ticket-b6bc5609-0a50-4bca-a29c-4e129c1f1f87.md, outlining the motivation, technical approach, and test coverage for this migration.