Skip to content

Commit

Permalink
feat!: convert to TypeScript and update Kubo (#221)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
achingbrain authored Apr 18, 2024
1 parent 0eed526 commit 9a623bd
Show file tree
Hide file tree
Showing 462 changed files with 22,696 additions and 39,672 deletions.
11 changes: 4 additions & 7 deletions .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,22 @@ import EchoServer from 'aegir/echo-server'
/** @type {import('aegir').PartialOptions} */
export default {
build: {
bundlesizeMax: '66KB'
bundlesizeMax: '42KB'
},
test: {
bail: false,
/**
*
* @param {Parameters<import('aegir').Options['test']['before']>[0]} options
* @returns {Promise<BeforeType>}
*/
async before (options) {
const { PinningService } = await import('./test/utils/mock-pinning-service.js')
const { PinningService } = await import('./dist/test/utils/mock-pinning-service.js')
const pinningService = await PinningService.start()
const server = createServer({
port: 0
}, {
type: 'go',
kuboRpcModule: await import('./src/index.js'),
ipfsBin: (await import('go-ipfs')).default.path()
kuboRpcModule: await import('./dist/src/index.js'),
ipfsBin: (await import('kubo')).default.path()
})

const echoServer = new EchoServer()
Expand All @@ -43,7 +41,6 @@ export default {
echoServer,
pinningService,
env: {
NODE_OPTIONS: '--no-experimental-fetch',
IPFSD_SERVER: `http://${server.host}:${server.server.info.port}`,
PINNING_SERVICE_ENDPOINT: pinningService.endpoint,
PINNING_SERVICE_KEY: 'secret',
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 20
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
.envrc
.tool-versions
package-lock.json
node_modules
.vscode
build
dist
out
.docs
docs
.coverage
.DS_Store
node_modules
package-lock.json
yarn.lock
.vscode
11 changes: 0 additions & 11 deletions maintainer.json

This file was deleted.

Loading

0 comments on commit 9a623bd

Please sign in to comment.