Skip to content

Conversation

@timea-solid
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings January 23, 2026 10:31
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 updates the @noble/curves dependency from version 1.9.6 to 2.0.1, which includes breaking API changes that require modifications to how the library is used.

Changes:

  • Updated @noble/curves from ^1.9.6 to ^2.0.1 in package.json and package-lock.json
  • Updated import paths in src/chat/signature.ts to use .js extensions and adapted function calls to use hexToBytes conversions for the new API
  • Changed ns import in src/chat/keys.ts from default import to namespace import
  • Added acorn as a production dependency

Reviewed changes

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

File Description
package.json Updated @noble/curves version and added acorn dependency
package-lock.json Updated lockfile with new dependency versions and Node.js requirements
src/chat/signature.ts Updated imports with .js extensions and adapted schnorr API calls to use byte arrays
src/chat/keys.ts Changed ns import style but missing corresponding .js extension updates for @noble imports

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

src/chat/keys.ts Outdated
import { schnorr } from '@noble/curves/secp256k1'
import { bytesToHex } from '@noble/hashes/utils'
import ns from '../ns'
import * as ns from '../ns'
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The import statement for ns should use default import (import ns from) instead of namespace import (import * as ns from), to maintain consistency with the rest of the codebase. All other files in the project use 'import ns from' (e.g., src/acl/access-groups.ts:10, src/chat/chatLogic.js:9, src/utils/keyHelpers/accessData.ts:3, and many others). Since ns.js exports a default export (src/ns.js:6), this should be 'import ns from'.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

done

src/chat/keys.ts Outdated
Comment on lines 2 to 3
import { schnorr } from '@noble/curves/secp256k1'
import { bytesToHex } from '@noble/hashes/utils'
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The imports from @noble/curves and @noble/hashes are missing the .js file extensions that were added in src/chat/signature.ts. For consistency with the changes in signature.ts and to align with @noble/curves v2.0.1 best practices, these imports should be updated to:

  • '@noble/curves/secp256k1.js' (line 2)
  • '@noble/hashes/utils.js' (line 3)

This ensures consistent import patterns across the codebase when using the @noble libraries.

Suggested change
import { schnorr } from '@noble/curves/secp256k1'
import { bytesToHex } from '@noble/hashes/utils'
import { schnorr } from '@noble/curves/secp256k1.js'
import { bytesToHex } from '@noble/hashes/utils.js'

Copilot uses AI. Check for mistakes.
package.json Outdated
"@noble/curves": "^1.9.6",
"@noble/hashes": "^1.8.0",
"@noble/curves": "^2.0.1",
"acorn": "^8.15.0",
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The addition of acorn as a production dependency appears unrelated to the @noble/curves update mentioned in the PR title. Previously, acorn was only used as a dev dependency (via acorn-jsx and acorn-import-phases). If this change is intentional and acorn is now required at runtime, please clarify the reason in the PR description. If it's accidental, this line should be removed.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

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