Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Conversation

@montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Mar 8, 2023

TS Migration

This PR introduces the following changes,

  • Named export of the HDKeyring
  • Refactors the hd-keyring code and tests to TypeScript.
  • Add guards logic to ensure the correct logic flow.
  • Updates the package configuration
  • Updates error messages

Description

Itemize the changes you have made into the categories below

CHANGED:

  • Method mnemonicToUint8Array
    • Add more type checking for buffers casted into objects.
  • Method serialize
    • Add guard logic in case mnemonic is undefined.

@montelaidev montelaidev marked this pull request as ready for review March 8, 2023 05:50
@montelaidev montelaidev requested a review from a team as a code owner March 8, 2023 05:50
@gantunesr
Copy link
Member

gantunesr commented Mar 8, 2023

Maybe its better to use the command,

git mv src/index.js src/Hd-keyring.ts

to not lose all the git history from that file.

@BboyAkers
Copy link

BboyAkers commented Mar 11, 2023

You got this done wayyy quicker than me haha @montelaidev
I'll stop working on my fork considering it's definitely not done 🙂 . Also, yours is MUCHHH cleaner!! 💯 🔥
https://github.com/BboyAkers/typed-eth-hd-keyring

@montelaidev montelaidev force-pushed the typescript-migration branch from 80df743 to 9745859 Compare March 13, 2023 03:59
@montelaidev
Copy link
Contributor Author

Maybe its better to use the command,

git mv src/index.js src/Hd-keyring.ts

to not lose all the git history from that file.

Just force pushed to keep the git history.

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

Leaving some comments from a first quick view over the PR

Copy link

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Hi @montelaidev! Thanks for doing this. Just had some suggestions based on how we've been doing things in the module template and across other libraries, as well as some TypeScript standard-related sorts of things.

@montelaidev montelaidev requested review from Gudahtt and mcmire March 28, 2023 02:46
Copy link

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Getting close! Just had a few more suggestions.

@socket-security
Copy link

socket-security bot commented Mar 28, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
typescript@4.9.5 filesystem, shell, environment +0 typescript-bot
ts-node@10.9.1 filesystem, shell, environment +17 cspotcode
ts-jest@29.0.5 eval, filesystem, shell, environment +81 kul
@typescript-eslint/parser@5.57.0 eval, filesystem, environment +2 jameshenry
@typescript-eslint/eslint-plugin@5.57.0 eval, filesystem, environment +9 jameshenry
@types/node@18.15.10 None +0 types
typedoc@0.23.28 filesystem +2 typedoc-bot
⬆️ Updated Package Version Diff Capability Access +/- Transitive Count Publisher
jest@29.5.0 27.5.1...29.5.0 eval, filesystem, shell, environment +77/-102 simenb
@types/jest@29.5.0 27.5.2...29.5.0 eval, environment +14/-6 types

@montelaidev montelaidev requested a review from mcmire March 28, 2023 17:12
Copy link

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Thanks for your patience with all of my feedback. Looks good now! Make sure to update the PR description listing the switch from a default export to a named export as a breaking change, along with any other changes you think would be breaking. This helps in updating the changelog appropriately when we make a new release. But you can do that after you merge.

@montelaidev montelaidev merged commit f2a6d07 into main Mar 29, 2023
@montelaidev montelaidev deleted the typescript-migration branch March 29, 2023 16:57
legobeat added a commit to legobeat/eth-hd-keyring that referenced this pull request Sep 26, 2023
legobeat added a commit that referenced this pull request Sep 26, 2023
legobeat added a commit to legobeat/eth-hd-keyring that referenced this pull request Sep 26, 2023
legobeat added a commit that referenced this pull request Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants