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

chore: rename @helia/core to @helia/utils #390

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .release-please.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"packages": {
"packages/block-brokers": {},
"packages/car": {},
"packages/core": {},
"packages/dag-cbor": {},
"packages/dag-json": {},
"packages/helia": {},
Expand All @@ -16,6 +15,7 @@
"packages/mfs": {},
"packages/routers": {},
"packages/strings": {},
"packages/unixfs": {}
"packages/unixfs": {},
"packages/utils": {}
}
}
4 changes: 2 additions & 2 deletions packages/car/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@
},
"dependencies": {
"@helia/interface": "^3.0.1",
"@ipld/car": "^5.1.1",
"@ipld/car": "^5.2.5",
"@libp2p/interfaces": "^3.3.1",
"it-drain": "^3.0.5",
"it-map": "^3.0.3",
"it-map": "^3.0.5",
"multiformats": "^13.0.0",
"p-defer": "^4.0.0",
"p-queue": "^8.0.1",
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/version.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/dag-cbor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
},
"dependencies": {
"@helia/interface": "^3.0.1",
"@ipld/dag-cbor": "^9.0.6",
"@ipld/dag-cbor": "^9.0.7",
"@libp2p/interfaces": "^3.3.1",
"multiformats": "^13.0.0",
"progress-events": "^1.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/helia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"@chainsafe/libp2p-noise": "^14.0.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@helia/block-brokers": "^1.0.0",
"@helia/core": "^0.0.0",
"@helia/delegated-routing-v1-http-api-client": "^2.0.2",
"@helia/interface": "^3.0.1",
"@helia/routers": "^0.0.0",
"@helia/utils": "^0.0.0",
"@libp2p/autonat": "^1.0.1",
"@libp2p/bootstrap": "^10.0.2",
"@libp2p/circuit-relay-v2": "^1.0.2",
Expand All @@ -77,7 +77,7 @@
"@libp2p/tcp": "^9.0.2",
"@libp2p/upnp-nat": "^1.0.1",
"@libp2p/webrtc": "^4.0.3",
"@libp2p/websockets": "^8.0.2",
"@libp2p/websockets": "^8.0.10",
"@libp2p/webtransport": "^4.0.3",
"blockstore-core": "^4.3.8",
"datastore-core": "^9.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/helia/src/helia-p2p.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Helia, type HeliaInit } from '@helia/core'
import { Helia, type HeliaInit } from '@helia/utils'
import type { BlockBroker } from './index.js'
import type { Libp2p } from '@libp2p/interface'
import type { Blockstore } from 'interface-blockstore'
Expand Down
2 changes: 1 addition & 1 deletion packages/helia/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { HeliaP2P } from './helia-p2p.js'
import { libp2pDefaults } from './utils/libp2p-defaults.js'
import { createLibp2p } from './utils/libp2p.js'
import type { DefaultLibp2pServices } from './utils/libp2p-defaults.js'
import type { Helia } from '@helia/core'
import type { Helia } from '@helia/interface'
import type { BlockBroker } from '@helia/interface/blocks'
import type { ComponentLogger, Libp2p } from '@libp2p/interface'
import type { KeychainInit } from '@libp2p/keychain'
Expand Down
6 changes: 3 additions & 3 deletions packages/helia/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
{
"path": "../block-brokers"
},
{
"path": "../core"
},
{
"path": "../interface"
},
{
"path": "../routers"
},
{
"path": "../utils"
}
]
}
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
},
"dependencies": {
"@helia/block-brokers": "^1.0.0",
"@helia/core": "^0.0.0",
"@helia/interface": "^3.0.1",
"@helia/routers": "^0.0.0",
"@helia/utils": "^0.0.0",
"blockstore-core": "^4.3.8",
"datastore-core": "^9.2.6"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/http/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
*/

import { trustlessGateway } from '@helia/block-brokers'
import { Helia as HeliaClass, type HeliaInit } from '@helia/core'
import { delegatedHTTPRouting } from '@helia/routers'
import { Helia as HeliaClass, type HeliaInit } from '@helia/utils'
import { MemoryBlockstore } from 'blockstore-core'
import { MemoryDatastore } from 'datastore-core'
import type { Helia } from '@helia/interface'
Expand Down
6 changes: 3 additions & 3 deletions packages/http/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
{
"path": "../block-brokers"
},
{
"path": "../core"
},
{
"path": "../interface"
},
{
"path": "../routers"
},
{
"path": "../utils"
}
]
}
14 changes: 14 additions & 0 deletions packages/interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@

> The Helia API

# About

The API defined by a Helia node

## Example

```typescript
import type { Helia } from '@helia/interface'

export function doSomething(helia: Helia) {
// use helia node functions here
}
```

# Install

```console
Expand Down
2 changes: 1 addition & 1 deletion packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@ipld/dag-cbor": "^9.0.7",
"@libp2p/interface": "^1.1.1",
"@libp2p/kad-dht": "^12.0.2",
"@libp2p/peer-id": "^4.0.3",
"@libp2p/peer-id": "^4.0.5",
"@libp2p/peer-id-factory": "^4.0.3",
"@libp2p/websockets": "^8.0.10",
"@multiformats/sha3": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/ipns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,20 @@
"@libp2p/interface": "^1.1.1",
"@libp2p/kad-dht": "^12.0.2",
"@libp2p/logger": "^4.0.4",
"@libp2p/peer-id": "^4.0.4",
"@libp2p/peer-id": "^4.0.5",
"dns-over-http-resolver": "^3.0.0",
"dns-packet": "^5.6.0",
"hashlru": "^2.3.0",
"interface-datastore": "^8.2.9",
"ipns": "^8.0.0",
"ipns": "^8.0.3",
"is-ipfs": "^8.0.1",
"multiformats": "^13.0.0",
"p-queue": "^8.0.1",
"progress-events": "^1.0.0",
"uint8arrays": "^5.0.1"
},
"devDependencies": {
"@libp2p/peer-id-factory": "^4.0.3",
"@libp2p/peer-id-factory": "^4.0.5",
"@types/dns-packet": "^5.6.4",
"aegir": "^42.1.0",
"datastore-core": "^9.2.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/mfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@
"interface-datastore": "^8.2.9",
"ipfs-unixfs": "^11.0.0",
"ipfs-unixfs-exporter": "^13.1.0",
"ipfs-unixfs-importer": "^15.1.0",
"ipfs-unixfs-importer": "^15.2.3",
"multiformats": "^13.0.0"
},
"devDependencies": {
"@ipld/dag-pb": "^4.0.7",
"@ipld/dag-pb": "^4.0.8",
"aegir": "^42.1.0",
"blockstore-core": "^4.3.10",
"datastore-core": "^9.2.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/unixfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

`@helia/unixfs` is an implementation of a filesystem compatible with Helia.

See the interface for all available operations.
See the [API docs](https://ipfs.github.io/helia/modules/_helia_unixfs.html) for all available operations.

## Example - Creating files and directories

Expand Down
4 changes: 2 additions & 2 deletions packages/unixfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@
"hamt-sharding": "^3.0.2",
"ipfs-unixfs": "^11.0.0",
"ipfs-unixfs-exporter": "^13.1.0",
"ipfs-unixfs-importer": "^15.1.0",
"ipfs-unixfs-importer": "^15.2.3",
"it-glob": "^2.0.4",
"it-last": "^3.0.1",
"it-last": "^3.0.4",
"it-pipe": "^3.0.1",
"merge-options": "^3.0.4",
"multiformats": "^13.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions packages/core/README.md → packages/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pre-configure Helia for certain use-cases (p2p or pure-HTTP).
## Example

```typescript
import { Helia } from '@helia/core'
import { Helia } from '@helia/utils'

const node = new Helia({
// ...options
Expand All @@ -31,20 +31,20 @@ const node = new Helia({
# Install

```console
$ npm i @helia/core
$ npm i @helia/utils
```

## Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `HeliaCore` in the global namespace.
Loading this module through a script tag will make it's exports available as `HeliaUtils` in the global namespace.

```html
<script src="https://unpkg.com/@helia/core/dist/index.min.js"></script>
<script src="https://unpkg.com/@helia/utils/dist/index.min.js"></script>
```

# API Docs

- <https://ipfs.github.io/helia/modules/_helia_core.html>
- <https://ipfs.github.io/helia/modules/_helia_utils.html>

# License

Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json → packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@helia/core",
"name": "@helia/utils",
"version": "0.0.0",
"description": "Shared code that implements the Helia API",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/helia/tree/main/packages/core#readme",
"homepage": "https://github.com/ipfs/helia/tree/main/packages/utils#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/helia.git"
Expand Down Expand Up @@ -54,7 +54,7 @@
},
"dependencies": {
"@helia/interface": "^3.0.1",
"@ipld/dag-cbor": "^9.0.6",
"@ipld/dag-cbor": "^9.0.7",
"@ipld/dag-json": "^10.1.5",
"@ipld/dag-pb": "^4.0.6",
"@libp2p/interface": "^1.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @example
*
* ```typescript
* import { Helia } from '@helia/core'
* import { Helia } from '@helia/utils'
*
* const node = new Helia({
* // ...options
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.