Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rewrite in typescript #128

Closed
wants to merge 2 commits into from
Closed

feat: rewrite in typescript #128

wants to merge 2 commits into from

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented Jan 17, 2023

This is part of #129.

  • Rewrite source code
  • Rewrite tests (ongoing)
  • DHT API moved to Routing. DHT calls kept, but marked as deprecated.

@hacdias hacdias mentioned this pull request Jan 17, 2023
7 tasks
@hacdias hacdias changed the title refactor: move to TypeScript feat: rewrite in typescript Jan 17, 2023
@hacdias
Copy link
Member Author

hacdias commented Jan 23, 2023

@achingbrain I'm invoking your expertise here. I just finished moving all src/ to TypeScript and now it's time to update the tests. However, js-ipfsd-ctl relies ipfs-core-types so I don't get the right type out of the factory. One option could be to just ignore the error:

  let ipfs: KuboClient

  before(async function () {
    // @ts-expect-error: js-ipfsd-ctl relies on core types.
    ipfs = (await f.spawn()).api
  })

But that would probably not the best option. Any recommendations?

This is already revealing to be a larger effort than I expected, but makes sense since all the JS things are tied together. /cc @lidel

@hacdias
Copy link
Member Author

hacdias commented Feb 9, 2024

@SgtPooki I'm assigning you here since you said yesterday you could probably take this on. I think this is an important thing to get finished since: (1) it is used by the interop tests from helia and kubo, (2) kubo development is slowed down because of this.

There are some things to solve:

  1. Migrate all the remaining tests to typescript.
  2. Figure out the js-ipfsd-ctl situation (feat: rewrite in typescript #128 (comment)): do we want to keep this? Is this used anywhere else besides here and in IPFS Desktop?
    • If it's only used for Kubo in IPFS Desktop and interop, I think we could move the relevant code to this repo. Some utility function that helps spawning the daemon.

@SgtPooki
Copy link
Member

Figure out the js-ipfsd-ctl situation (#128 (comment)): do we want to keep this? Is this used anywhere else besides here and in IPFS Desktop?

@hacdias that library is still used by a number of helia things for benchmarks and tests

@hacdias hacdias removed their assignment Mar 22, 2024
achingbrain added a commit that referenced this pull request Apr 18, 2024
- Convert all files to TypeScript
- Remove legacy `ipfs-core-types` and `ipfs-utils` dependencies
- Copies code from `ipfs-core-types` and `ipfs-utils` used by this module here since those modules will not see any updates
- Update all deps to the latest versions
- Removes old object api methods that Kubo has removed and their tests
- Adds new `.routing` API and converts old DHT tests to routing tests
- Bundle size reduction 57.34KB -> 41.3KB

BREAKING CHANGE: parts of the Kubo object and dht APIs have been removed, this project is now TypeScript

Closes #128
github-actions bot pushed a commit that referenced this pull request Apr 18, 2024
## [4.0.0](v3.0.4...v4.0.0) (2024-04-18)

### ⚠ BREAKING CHANGES

* parts of the Kubo object and dht APIs have been removed, this project is now TypeScript

### Features

* convert to TypeScript and update Kubo ([#221](#221)) ([9a623bd](9a623bd)), closes [#128](#128)

### Documentation

* update docs config ([0f7cac2](0f7cac2))
Copy link
Contributor

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

2 participants