Skip to content

Add hash deterministic object method#2217

Open
MarceloRGonc wants to merge 6 commits intomainfrom
mg/hashDeterministicObject
Open

Add hash deterministic object method#2217
MarceloRGonc wants to merge 6 commits intomainfrom
mg/hashDeterministicObject

Conversation

@MarceloRGonc
Copy link
Copy Markdown
Contributor

Fixes OPS-4106.

Copilot AI review requested due to automatic review settings April 10, 2026 16:21
@linear
Copy link
Copy Markdown

linear bot commented Apr 10, 2026

Copy link
Copy Markdown
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

Adds a deterministic object hashing utility to the server-shared library to support use cases where object key order must not affect the resulting hash (OPS-4106).

Changes:

  • Added hashUtils.hashDeterministicObject() using stable JSON stringification prior to SHA-256 hashing.
  • Introduced fast-json-stable-stringify as a dependency and updated the lockfile accordingly.

Reviewed changes

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

File Description
packages/server/shared/src/lib/hash.ts Adds deterministic hashing via stable JSON stringify and exports it via hashUtils.
package.json Adds fast-json-stable-stringify dependency needed by the new utility.
package-lock.json Updates lockfile for the new dependency (and includes additional lockfile churn).

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

@sonarqubecloud
Copy link
Copy Markdown

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