Skip to content

Commit

Permalink
Merge pull request #21 from valorem-labs-inc/subgraph-position
Browse files Browse the repository at this point in the history
v0.0.10
  • Loading branch information
nickadamson authored Dec 22, 2023
2 parents 5b3be6e + 05dcc56 commit 8085105
Show file tree
Hide file tree
Showing 42 changed files with 5,116 additions and 568 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'@vercel/style-guide/eslint/node',
'@vercel/style-guide/eslint/typescript',
].map(require.resolve),
plugins: ['canonical'],
rules: {
'no-bitwise': 'off',
'no-console': 'warn',
Expand All @@ -31,7 +32,21 @@ module.exports = {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'canonical/no-barrel-import': 'error',
'canonical/no-export-all': 'error',
},
overrides: [
{
files: ['**/*.test.*', 'test/**/*'],
rules: {
'canonical/no-barrel-import': 'off',
'import/no-default-export': 'off',
'import/no-relative-packages': 'off',
'no-console': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
],
ignorePatterns: [
'*.config.*',
'tsup*',
Expand All @@ -43,5 +58,9 @@ module.exports = {
'trade-interfaces',
'codegen',
'docs',
'codegen.ts',
'package.json',
'buf.gen.yaml',
'buf.work.yaml',
],
};
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install packages, compile SDK, and build docs
run: |
pnpm i
pnpm codegen
pnpm generate
pnpm gen-docs
- name: Deploy Docs to Github Pages
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @valorem-labs-inc/sdk

## 0.0.10

### Patch Changes

- add subgraph utils/classes
- add supported assets
- fix bug where OptionsGreeks would throw an error calculating IV

## 0.0.9

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: v1
plugins:
- plugin: es
opt: target=ts+js+dts
out: src/lib/codegen
out: src/lib/codegen/grpc
- plugin: connect-es
opt: target=ts+js+dts
out: src/lib/codegen
out: src/lib/codegen/grpc
34 changes: 34 additions & 0 deletions codegen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { CodegenConfig } from '@graphql-codegen/cli';
import { ARBITRUM_SUBGRAPH } from './src/constants';

const config: CodegenConfig = {
schema: ARBITRUM_SUBGRAPH,
documents: ['src/**/!(*.d).{ts,tsx}'],
ignoreNoDocuments: true,
generates: {
'./src/lib/codegen/gql/': {
preset: 'client',
config: {
strictScalars: true,
scalars: {
ID: {
input: 'string | number | bigint | `0x${string}`',
output: 'string | `0x${string}`',
},
BigInt: { input: 'bigint', output: 'string' },
BigDecimal: { input: 'bigint', output: 'string' },
Bytes: '`0x${string}`',
Int8: 'number',
},
useTypeImports: true,
skipTypename: true,
enumAsTypes: true,
dedupeFragments: true,
avoidOptionals: true,
arrayInputCoercion: true,
},
},
},
};

export default config;
26 changes: 18 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@valorem-labs-inc/sdk",
"version": "0.0.9",
"version": "0.0.10",
"repository": {
"type": "git",
"url": "https://github.com/valorem-labs-inc/typescript-sdk.git"
Expand All @@ -12,12 +12,14 @@
"source": "src/index.ts",
"types": "dist/types.d.ts",
"scripts": {
"build": "pnpm clean && pnpm codegen && pnpm parcel build --no-cache",
"build": "pnpm clean && pnpm generate && pnpm parcel build --no-cache",
"ci:release": "pnpm build && pnpm changeset publish",
"clean": "rm -rf ./dist",
"codegen": "rm -rf ./src/lib/codegen && npx buf generate",
"format": "prettier --write \"**/*.{ts,tsx,md,json}\"",
"gen-docs": "typedoc",
"generate": "pnpm generate:clean && pnpm generate:grpc && pnpm generate:gql",
"generate:clean": "rm -rf ./src/lib/codegen",
"generate:gql": "graphql-codegen",
"generate:grpc": "npx buf generate",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
Expand All @@ -26,7 +28,10 @@
},
"prettier": "@vercel/style-guide/prettier",
"dependencies": {
"mathjs": "^12.2.0"
"@graphql-typed-document-node/core": "^3.2.0",
"date-fns": "^3.0.5",
"graphql": "^16.8.1",
"mathjs": "^12.2.1"
},
"devDependencies": {
"@bufbuild/buf": "^1.28.1",
Expand All @@ -35,19 +40,24 @@
"@connectrpc/connect-node": "^1.2.0",
"@connectrpc/connect-web": "^1.2.0",
"@connectrpc/protoc-gen-connect-es": "^1.2.0",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@parcel/config-default": "^2.10.3",
"@parcel/packager-ts": "^2.10.3",
"@parcel/transformer-typescript-tsc": "^2.10.3",
"@parcel/transformer-typescript-types": "^2.10.3",
"@types/node": "^20.10.4",
"@types/node": "^20.10.5",
"@vercel/style-guide": "^5.1.0",
"@vitest/coverage-v8": "^1.0.4",
"eslint": "^8.55.0",
"@vitest/coverage-v8": "^1.1.0",
"eslint": "^8.56.0",
"eslint-config-canonical": "^42.8.0",
"parcel": "^2.10.3",
"prettier": "^3.1.1",
"typedoc": "^0.25.4",
"typedoc-plugin-missing-exports": "^2.1.0",
"vitest": "^1.0.4"
"vitest": "^1.1.0"
},
"peerDependencies": {
"@bufbuild/protobuf": "^1.6.0",
Expand Down
Loading

0 comments on commit 8085105

Please sign in to comment.