Skip to content

Commit

Permalink
Update packages version
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Le Cam committed Feb 5, 2024
1 parent 65b342d commit bd8d35a
Show file tree
Hide file tree
Showing 34 changed files with 1,523 additions and 1,253 deletions.
19 changes: 5 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,23 @@
"@jest/globals": "^29.7.0",
"@skypack/package-check": "^0.2.2",
"@swc/cli": "^0.1.63",
"@swc/core": "^1.3.107",
"@swc/jest": "^0.2.32",
"@types/jest": "^29.5.11",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"del-cli": "^5.1.0",
"eslint": "^8.56.0",
"eslint-config-3box": "^1.0.0",
"eslint-plugin-jest": "^27.6.3",
"jest": "^29.7.0",
"prettier": "^3.2.4",
"prettier": "^3.2.5",
"turbo": "^1.12.2",
"typedoc": "0.25.7",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.3.3"
},
"pnpm": {
"overrides": {
"@ceramicnetwork/3id-did-resolver": "^3.4.1-nightly.0",
"@ceramicnetwork/cli": "^3.4.1-nightly.0",
"@ceramicnetwork/common": "^4.0.1-nightly.0",
"@ceramicnetwork/core": "^4.0.1-nightly.0",
"@ceramicnetwork/http-client": "^4.0.1-nightly.0",
"@ceramicnetwork/stream-model-instance": "^2.4.1-nightly.0",
"@ceramicnetwork/stream-model": "^2.4.1-nightly.0",
"@ceramicnetwork/streamid": "^3.4.1-nightly.0"
}
"overrides": {}
}
}
9 changes: 9 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/cli

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
26 changes: 13 additions & 13 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composedb/cli",
"version": "0.6.1",
"version": "0.7.0",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
"homepage": "https://composedb.js.org",
Expand Down Expand Up @@ -69,19 +69,19 @@
]
},
"dependencies": {
"@ceramicnetwork/3id-did-resolver": "^3.4.1-nightly.0",
"@ceramicnetwork/cli": "^3.4.1-nightly.0",
"@ceramicnetwork/http-client": "^4.0.1-nightly.0",
"@ceramicnetwork/stream-model": "^2.4.1-nightly.0",
"@ceramicnetwork/stream-model-instance": "^2.4.1-nightly.0",
"@ceramicnetwork/streamid": "^3.4.1-nightly.0",
"@ceramicnetwork/3id-did-resolver": "^4.1.0",
"@ceramicnetwork/cli": "^4.1.0",
"@ceramicnetwork/http-client": "^4.1.0",
"@ceramicnetwork/stream-model": "^3.1.0",
"@ceramicnetwork/stream-model-instance": "^3.1.0",
"@ceramicnetwork/streamid": "^4.1.0",
"@composedb/client": "workspace:^",
"@composedb/devtools": "workspace:^",
"@composedb/devtools-node": "workspace:^",
"@composedb/runtime": "workspace:^",
"@oclif/core": "^3.18.2",
"@oclif/plugin-help": "^6.0.12",
"@oclif/plugin-version": "^2.0.11",
"@oclif/plugin-version": "^2.0.12",
"cli-table3": "^0.6.3",
"did-resolver": "^4.1.0",
"dids": "^5.0.2",
Expand All @@ -96,18 +96,18 @@
"uint8arrays": "^5.0.1"
},
"devDependencies": {
"@ceramicnetwork/common": "^4.0.1-nightly.0",
"@ceramicnetwork/common": "^4.1.0",
"@composedb/types": "workspace:^",
"@swc-node/register": "^1.6.8",
"@swc-node/register": "^1.8.0",
"@types/fs-extra": "^11.0.4",
"@types/jest": "^29.5.11",
"@types/jest": "^29.5.12",
"@types/listr": "^0.14.9",
"@types/node": "^20.11.15",
"@types/node": "^20.11.16",
"@types/update-notifier": "^6.0.8",
"ajv": "^8.12.0",
"execa": "^8.0.1",
"jest-dev-server": "^9.0.2",
"oclif": "^4.4.2",
"oclif": "^4.4.4",
"strip-ansi": "~7.1.0"
},
"jest": {
Expand Down
9 changes: 9 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/client

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composedb/client",
"version": "0.6.0",
"version": "0.7.0",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
"homepage": "https://composedb.js.org",
Expand Down Expand Up @@ -39,9 +39,9 @@
"prepublishOnly": "package-check"
},
"dependencies": {
"@ceramicnetwork/http-client": "^4.0.1-nightly.0",
"@ceramicnetwork/stream-model": "^2.4.1-nightly.0",
"@ceramicnetwork/stream-model-instance": "^2.4.1-nightly.0",
"@ceramicnetwork/http-client": "^4.1.0",
"@ceramicnetwork/stream-model": "^3.1.0",
"@ceramicnetwork/stream-model-instance": "^3.1.0",
"@composedb/constants": "workspace:^",
"@composedb/graphql-scalars": "workspace:^",
"@composedb/runtime": "workspace:^",
Expand All @@ -53,7 +53,7 @@
"graphql-relay": "^0.10.0"
},
"devDependencies": {
"@ceramicnetwork/common": "^4.0.1-nightly.0",
"@ceramicnetwork/common": "^4.1.0",
"@composedb/devtools": "workspace:^",
"@composedb/test-schemas": "workspace:^",
"@composedb/types": "workspace:^",
Expand Down
9 changes: 9 additions & 0 deletions packages/devtools-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/devtools-node

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composedb/devtools-node",
"version": "0.6.1",
"version": "0.7.0",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
"homepage": "https://composedb.js.org",
Expand Down Expand Up @@ -37,7 +37,7 @@
"prepublishOnly": "package-check"
},
"dependencies": {
"@ceramicnetwork/http-client": "^4.0.1-nightly.0",
"@ceramicnetwork/http-client": "^4.1.0",
"@composedb/client": "workspace:^",
"@composedb/runtime": "workspace:^",
"@composedb/server": "workspace:^",
Expand Down
9 changes: 9 additions & 0 deletions packages/devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/devtools

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composedb/devtools",
"version": "0.6.1",
"version": "0.7.0",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
"homepage": "https://composedb.js.org",
Expand Down Expand Up @@ -39,9 +39,9 @@
"prepublishOnly": "package-check"
},
"dependencies": {
"@ceramicnetwork/common": "^4.0.1-nightly.0",
"@ceramicnetwork/stream-model": "^2.4.1-nightly.0",
"@ceramicnetwork/streamid": "^3.4.1-nightly.0",
"@ceramicnetwork/common": "^4.1.0",
"@ceramicnetwork/stream-model": "^3.1.0",
"@ceramicnetwork/streamid": "^4.1.0",
"@composedb/graphql-scalars": "workspace:^",
"@didtools/cacao": "^3.0.1",
"@graphql-tools/schema": "^10.0.2",
Expand All @@ -57,9 +57,9 @@
"devDependencies": {
"@composedb/test-schemas": "workspace:^",
"@composedb/types": "workspace:^",
"@types/jest": "^29.5.11",
"@types/jest": "^29.5.12",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.11.15",
"@types/node": "^20.11.16",
"@types/object-hash": "^3.0.6",
"ajv": "^8.12.0",
"dids": "^5.0.2",
Expand Down
10 changes: 4 additions & 6 deletions packages/devtools/src/composite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,12 +395,10 @@ export class Composite {
* Get the StreamID of the given model `alias` if present in the Composite.
*/
getModelID(alias: string): string | null {
for (const [modelID, modelAlias] of Object.entries(this.#definition.aliases)) {
if (modelAlias == alias) {
return modelID
}
}
return null
const found = Object.entries(this.#definition.aliases).find(
([_, modelAlias]) => modelAlias === alias,
)
return found ? found[0] : null
}

/**
Expand Down
42 changes: 20 additions & 22 deletions packages/devtools/src/formats/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,28 +338,26 @@ export function createRuntimeDefinition(
Object.assign(runtime.objects, builtModel.objects)
Object.assign(runtime.enums, builtModel.enums)
// Attach entry-point to account store based on relation type
if (modelDefinition.accountRelation != null) {
const key = camelCase(modelName)
if (modelDefinition.version !== '1.0' && modelDefinition.interface) {
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
} else {
const relationType = modelDefinition.accountRelation.type
switch (relationType) {
case 'list':
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
break
case 'set':
// relation to single document in the set based on input
runtime.accountData[key] = { type: 'set', name: modelName }
// relation to all documents in the set
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
break
case 'single':
runtime.accountData[key] = { type: 'node', name: modelName }
break
default:
throw new Error(`Unsupported account relation type: ${relationType}`)
}
const key = camelCase(modelName)
if (modelDefinition.version !== '1.0' && modelDefinition.interface) {
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
} else {
const relationType = modelDefinition.accountRelation.type
switch (relationType) {
case 'list':
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
break
case 'set':
// relation to single document in the set based on input
runtime.accountData[key] = { type: 'set', name: modelName }
// relation to all documents in the set
runtime.accountData[key + 'List'] = { type: 'connection', name: modelName }
break
case 'single':
runtime.accountData[key] = { type: 'node', name: modelName }
break
default:
throw new Error(`Unsupported account relation type: ${relationType}`)
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions packages/devtools/src/schema/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,7 @@ export class SchemaParser {
`Unsupported @relationFrom directive on field ${fieldName} of object ${objectName}, @relationFrom can only be set on a list of referenced object`,
)
}
const model = directive.args?.model as string | void
if (model == null) {
throw new Error(
`Missing model argument for @relationFrom directive on field ${fieldName} of object ${objectName}`,
)
}
const model = type.ofType.name === NODE_INTERFACE_NAME ? null : type.ofType.name
const property = directive.args?.property as string | void
if (property == null) {
throw new Error(
Expand Down
9 changes: 9 additions & 0 deletions packages/graphql-scalars/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/graphql-scalars

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-scalars/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@composedb/graphql-scalars",
"version": "0.6.0",
"version": "0.7.0",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
"homepage": "https://composedb.js.org",
Expand Down Expand Up @@ -37,7 +37,7 @@
"prepublishOnly": "package-check"
},
"dependencies": {
"@ceramicnetwork/streamid": "^3.4.1-nightly.0",
"@ceramicnetwork/streamid": "^4.1.0",
"@composedb/types": "workspace:^",
"caip": "^1.1.0",
"graphql": "^16.8.1",
Expand Down
9 changes: 9 additions & 0 deletions packages/jest-environment-composedb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# jest-environment-composedb

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-environment-composedb/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jest-environment-composedb",
"private": true,
"version": "0.6.0",
"version": "0.7.0",
"description": "ComposeDB environment for Jest",
"author": "3Box Labs",
"license": "(Apache-2.0 OR MIT)",
Expand All @@ -23,7 +23,7 @@
"lint": "eslint index.js --fix"
},
"dependencies": {
"@ceramicnetwork/core": "^4.0.1-nightly.0",
"@ceramicnetwork/core": "^4.1.0",
"dids": "^5.0.2",
"ipfs-core": "^0.18.1",
"jest-environment-node": "^29.7.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @composedb/runtime

## 0.7.0

### Minor Changes

- Add support for models using the new `set` account relation
- Add support for the `shouldIndex` metadata flag
- Add support for immutable fields
- Add support for optional relation fields

## 0.6.0

### Minor Changes
Expand Down
Loading

0 comments on commit bd8d35a

Please sign in to comment.