Skip to content

Commit

Permalink
Bump dependencies (#151)
Browse files Browse the repository at this point in the history
* deps: update oceanjs

* test: update integration test network and fix oceanjs

* deps: update typescript and node types

* deps: update mocha and chai

* deps: update graphql-codegen

* deps: bump biome

* deps: bump dotenv

* deps: bump react

* deps: bump rimraf

* deps: bump vocs

* docs: add changeset

* deps: add nautilus docs dependency

* deps: use vocs alpha.54

* docs: fix codesample

* Revert "deps: use vocs alpha.54"

This reverts commit 71fa45a.

* docs: fix codesample

* docs: fix codesample
  • Loading branch information
moritzkirstein authored Jan 17, 2025
1 parent f112dea commit 034fd2d
Show file tree
Hide file tree
Showing 11 changed files with 2,091 additions and 3,570 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-peas-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@deltadao/nautilus": patch
---

Bump dependencies
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vocs preview"
},
"devDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vocs": "1.0.0-alpha.52"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vocs": "^1.0.0-alpha.62"
}
}
3 changes: 2 additions & 1 deletion docs/pages/docs/api/nautilus/getComputeResult.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const resultFileUri = await nautilus.getComputeResult({ // [!code focus]
providerUri: 'https://provider.dev.pontus-x.eu' // [!code focus]
})

const file = await fetch(resultFileUri)
if(resultFileUri)
await fetch(resultFileUri)
```


Expand Down
5,560 changes: 2,035 additions & 3,525 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 23 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"workspaces": ["docs", "src", "test"],
"workspaces": [
"docs",
"src",
"test"
],
"type": "module",
"private": true,
"scripts": {
Expand Down Expand Up @@ -28,39 +32,43 @@
"typecheck": "tsc --noEmit && cd test && tsc --noEmit"
},
"devDependencies": {
"@biomejs/biome": "^1.6.1",
"@biomejs/biome": "^1.9.4",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/cli": "^5.0.3",
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.11",
"@graphql-codegen/typescript": "^4.1.2",
"@graphql-codegen/typescript-operations": "^4.4.0",
"@types/chai": "^4.3.20",
"@types/mocha": "^10.0.10",
"@types/node": "^18.19.71",
"@types/sinon": "^10.0.16",
"chai": "^4.3.7",
"dotenv": "^16.0.3",
"mocha": "^10.2.0",
"rimraf": "^5.0.5",
"chai": "^4.5.0",
"dotenv": "^16.4.7",
"mocha": "^10.8.2",
"rimraf": "^5.0.10",
"sinon": "^15.2.0",
"ts-node": "^9.1.1",
"typescript": "^5.4.2"
"typescript": "^5.7.3"
},
"codegen": {
"schema": "https://v4.subgraph.goerli.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph",
"documents": "./src/**/*.gql.ts",
"generates": {
"./src/@types/subgraph/api.ts": {
"plugins": ["typescript"]
"plugins": [
"typescript"
]
},
"./src/": {
"preset": "near-operation-file",
"presetConfig": {
"baseTypesPath": "@types/subgraph/api.ts",
"extension": ".generated.ts"
},
"plugins": ["typescript-operations"],
"plugins": [
"typescript-operations"
],
"config": {
"omitOperationSuffix": true,
"typesPrefix": "I"
Expand Down
12 changes: 4 additions & 8 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}
},
"peerDependencies": {
"@oceanprotocol/lib": "3.3.0",
"@oceanprotocol/lib": "3.4.6",
"ethers": "^5.7.2"
},
"overrides": {
"graphql": "15.8.0"
},
"dependencies": {
"@oceanprotocol/lib": "3.3.0",
"@oceanprotocol/lib": "3.4.6",
"axios": "^1.3.4",
"decimal.js": "^10.4.3",
"ethers": "^5.7.2",
Expand All @@ -33,19 +33,15 @@
"documents": "./src/**/*.gql.ts",
"generates": {
"./src/@types/subgraph/api.ts": {
"plugins": [
"typescript"
]
"plugins": ["typescript"]
},
"./src/": {
"preset": "near-operation-file",
"presetConfig": {
"baseTypesPath": "@types/subgraph/api.ts",
"extension": ".generated.ts"
},
"plugins": [
"typescript-operations"
],
"plugins": ["typescript-operations"],
"config": {
"omitOperationSuffix": true,
"typesPrefix": "I"
Expand Down
5 changes: 3 additions & 2 deletions test/fixtures/Ethers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import dotenv from 'dotenv'
import { type Signer, Wallet, providers } from 'ethers'
dotenv.config()

export const MUMBAI_NODE_URI = 'https://polygon-mumbai-bor-rpc.publicnode.com'
const PONTUSX_DEVNET_NODE_URI = 'https://rpc.dev.pontus-x.eu' as const
export const TESTING_NODE_URI = PONTUSX_DEVNET_NODE_URI

export function getSigner(key: 1 | 2 = 1, nodeUri?: string): Signer {
const providerUrl = nodeUri || MUMBAI_NODE_URI
const providerUrl = nodeUri || PONTUSX_DEVNET_NODE_URI

console.log(`Using test key ${key} on ${providerUrl} to create wallet.`)

Expand Down
8 changes: 4 additions & 4 deletions test/integration/access-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
getPricing
} from '../fixtures/AssetConfig'
import { getTestConfig } from '../fixtures/Config'
import { MUMBAI_NODE_URI, getSigner } from '../fixtures/Ethers'
import { TESTING_NODE_URI, getSigner } from '../fixtures/Ethers'
import { nftParams } from '../fixtures/NftCreateData'

describe('Access Flow Integration', function () {
Expand All @@ -29,7 +29,7 @@ describe('Access Flow Integration', function () {
// 1. Publish Download Asset -> store did
it('publishes a download asset', async () => {
// Setup Nautilus instance for publisher (PRIVATE_KEY_TESTS_1)
const signer = getSigner(1, MUMBAI_NODE_URI)
const signer = getSigner(1, TESTING_NODE_URI)
const nautilus = await Nautilus.create(signer, await getTestConfig(signer))

const { providerUri } = nautilus.getOceanConfig()
Expand Down Expand Up @@ -69,15 +69,15 @@ describe('Access Flow Integration', function () {
// 2. Access the Download Asset (1.)
it('accesses a download asset', async () => {
// Setup Nautilus instance for consumer (PRIVATE_KEY_TESTS_2)
const signer = getSigner(2, MUMBAI_NODE_URI)
const signer = getSigner(2, TESTING_NODE_URI)
const nautilus = await Nautilus.create(signer, await getTestConfig(signer))

// wait until ddo is found in metadata cache
const aquarius = new Aquarius(nautilus.getOceanConfig().metadataCacheUri)
console.log(
`Waiting for aquarius at ${aquarius.aquariusURL} to access ${downloadAssetDid}`
)
await aquarius.waitForAqua(downloadAssetDid)
await aquarius.waitForIndexer(downloadAssetDid)

const accessUrl = await nautilus.access({
assetDid: downloadAssetDid
Expand Down
10 changes: 5 additions & 5 deletions test/integration/compute-flow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
getPricing
} from '../fixtures/AssetConfig'
import { getTestConfig } from '../fixtures/Config'
import { MUMBAI_NODE_URI, getSigner } from '../fixtures/Ethers'
import { TESTING_NODE_URI, getSigner } from '../fixtures/Ethers'
import { nftParams } from '../fixtures/NftCreateData'

describe('Compute Flow Integration', async function () {
Expand All @@ -41,7 +41,7 @@ describe('Compute Flow Integration', async function () {
Nautilus.setLogLevel(LogLevel.Verbose)

// PRIVATE_KEY_TESTS_1 (algorithm publisher)
algoPublisherSigner = getSigner(1, MUMBAI_NODE_URI)
algoPublisherSigner = getSigner(1, TESTING_NODE_URI)
algoPublisherAddress = await algoPublisherSigner.getAddress()

nautilusAlgoPublisher = await Nautilus.create(
Expand All @@ -50,7 +50,7 @@ describe('Compute Flow Integration', async function () {
)

// PRIVATE_KEY_TESTS_2 (dataset publisher)
datasetPublisherSigner = getSigner(2, MUMBAI_NODE_URI)
datasetPublisherSigner = getSigner(2, TESTING_NODE_URI)
datasetPublisherAddress = await datasetPublisherSigner.getAddress()

nautilusDatasetPublisher = await Nautilus.create(
Expand Down Expand Up @@ -142,8 +142,8 @@ describe('Compute Flow Integration', async function () {
console.log(
`Waiting for aquarius at ${aquarius.aquariusURL} to cache algo and dataset...`
)
await aquarius.waitForAqua(computeAlgorithmDid)
await aquarius.waitForAqua(computeDatasetDid)
await aquarius.waitForIndexer(computeAlgorithmDid)
await aquarius.waitForIndexer(computeDatasetDid)

const startedJob = await nautilusDatasetPublisher.compute({
dataset: {
Expand Down
8 changes: 4 additions & 4 deletions test/integration/edit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import {
getPricing
} from '../fixtures/AssetConfig'
import { getTestConfig } from '../fixtures/Config'
import { MUMBAI_NODE_URI, getSigner } from '../fixtures/Ethers'
import { TESTING_NODE_URI, getSigner } from '../fixtures/Ethers'

const nodeUri = MUMBAI_NODE_URI
const nodeUri = TESTING_NODE_URI

describe('Edit Integration tests', function () {
// set timeout for this describe block
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('Edit Integration tests', function () {
console.log(
`asset published (${fixedPricedAlgoWithCredentials?.id}), waiting for aquarius indexing...`
)
await aquarius.waitForAqua(fixedPricedAlgoWithCredentials?.id)
await aquarius.waitForIndexer(fixedPricedAlgoWithCredentials?.id)

assert(result)
})
Expand Down Expand Up @@ -149,7 +149,7 @@ describe('Edit Integration tests', function () {
console.log(
`asset published (${fixedPriceComputeDataset?.id}), waiting for aquarius indexing...`
)
await aquarius.waitForAqua(fixedPriceComputeDataset?.id)
await aquarius.waitForIndexer(fixedPriceComputeDataset?.id)

assert(result)
})
Expand Down
6 changes: 3 additions & 3 deletions test/integration/publish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import {
getPricing
} from '../fixtures/AssetConfig'
import { getTestConfig } from '../fixtures/Config'
import { MUMBAI_NODE_URI, getSigner } from '../fixtures/Ethers'
import { TESTING_NODE_URI, getSigner } from '../fixtures/Ethers'

const nodeUri = MUMBAI_NODE_URI
const nodeUri = TESTING_NODE_URI

describe('Publish Integration tests', function () {
// set timeout for this describe block considering tsx will happen
Expand Down Expand Up @@ -167,7 +167,7 @@ describe('Publish Integration tests', function () {
console.log(
`asset published (${fixedPriceComputeDataset?.id}), waiting for aquarius indexing...`
)
await aquarius.waitForAqua(fixedPriceComputeDataset?.id)
await aquarius.waitForIndexer(fixedPriceComputeDataset?.id)

assert(result)
})
Expand Down

0 comments on commit 034fd2d

Please sign in to comment.