Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Dec 29, 2023
1 parent 8d8c1bc commit 7eb925b
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 45 deletions.
26 changes: 26 additions & 0 deletions .changeset/clever-flies-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
"@abstract-money/cli": minor
"@abstract-money/core": minor
"@abstract-money/cosmwasm-utils": minor
"@abstract-money/react": minor
---

First release of **abstract.js** revamped SDK!

New SDK structure involves multiple packages, each with its own dependencies.
This allows for more flexibility and better control over the SDK.

Old-new packages mapping:

- `@abstract-money/abstract.js` -> `@abstract-money/core`
- `@abstract-money/abstract.js-react` -> `@abstract-money/react`
- `@abstract-money/cosmwasm` -> `@abstract-money/cosmwasm-utils`

A new package was introduced, `@abstract-money/cli` that adopts a quicker
development setup when using Abstract contracts.
A developer is now not obligated to download the Abstract contract schemas himself,
and can simply enumerate the required contracts via the `registry` plugin,
available at `@abstract-money/cli/plugins`, and the CLI will download and cache them
itself.
This feature also allowed to cut out the boilerplate code from the old `@abstract-money/abstract.js`,
yet keeping the backwards compatibility.
7 changes: 0 additions & 7 deletions .changeset/violet-suns-jam.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Main
on:
push:
branches: [main]
branches: [mainline]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Create version pull request or publish to npm
id: changesets
uses: changesets/action@v1
uses: changesets/action@v1.4.1
with:
title: "chore: version packages"
commit: "chore: version packages"
Expand Down
6 changes: 3 additions & 3 deletions examples/wagemos-cosmoskit-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"lint": "next lint"
},
"dependencies": {
"@abstract-money/core": "workspace:@abstract-money/core@*",
"@abstract-money/react": "workspace:@abstract-money/react@*",
"@abstract-money/core": "workspace:*",
"@abstract-money/react": "workspace:*",
"@chain-registry/types": "^0.13.1",
"@cosmjs/amino": "^0.31.0",
"@cosmjs/cosmwasm-stargate": "^0.31.0",
Expand Down Expand Up @@ -44,7 +44,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@abstract-money/cli": "workspace:@abstract-money/cli@*",
"@abstract-money/cli": "workspace:*",
"@keplr-wallet/types": "^0.12.44",
"@types/node": "^20",
"@types/react": "^18",
Expand Down
6 changes: 3 additions & 3 deletions examples/wagemos-graz-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"generate": "graz generate -g -b"
},
"dependencies": {
"@abstract-money/core": "workspace:@abstract-money/core@*",
"@abstract-money/react": "workspace:@abstract-money/react@*",
"@abstract-money/core": "workspace:*",
"@abstract-money/react": "workspace:*",
"@cosmjs/amino": "^0.31.0",
"@cosmjs/cosmwasm-stargate": "^0.31.0",
"@cosmjs/encoding": "^0.31.0",
Expand Down Expand Up @@ -43,7 +43,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
"@abstract-money/cli": "workspace:@abstract-money/cli@*",
"@abstract-money/cli": "workspace:*",
"@keplr-wallet/types": "^0.12.44",
"@types/node": "^20",
"@types/react": "^18",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"workspaces": ["examples/*", "packages/*"],
"scripts": {
"build": "turbo --filter \"./packages/**\" build",
"changeset:release": "turbo build && changeset publish",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"codegen:subgraph:watch": "graphql-codegen --watch"
},
"dependencies": {
"@abstract-money/cosmwasm": "workspace:@abstract-money/cosmwasm@*",
"@abstract-money/cosmwasm-utils": "workspace:*",
"@chain-registry/types": "^0.13.1",
"@cosmjs/amino": "^0.31.0",
"@cosmjs/cosmwasm-stargate": "^0.31.0",
Expand All @@ -54,7 +54,7 @@
},
"type": "module",
"devDependencies": {
"@abstract-money/cli": "workspace:@abstract-money/cli@*",
"@abstract-money/cli": "workspace:*",
"@graphql-codegen/cli": "^2.13.1",
"@graphql-codegen/client-preset": "^1.2.6",
"@graphql-typed-document-node/core": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/clients/AbstractClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
BatchCosmWasmClient,
type BatchCosmWasmClientOptions,
} from '@abstract-money/cosmwasm'
} from '@abstract-money/cosmwasm-utils'
import { Coin } from '@cosmjs/amino'
import {
CosmWasmClient,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/clients/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BatchCosmWasmClient } from '@abstract-money/cosmwasm'
import { BatchCosmWasmClient } from '@abstract-money/cosmwasm-utils'
import { Mixin } from 'ts-mixer'

export * from './errors'
Expand Down
4 changes: 2 additions & 2 deletions packages/core/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"pipeline": {
"build": {
"dependsOn": [
"@abstract-money/cosmwasm#build",
"@abstract-money/cosmwasm-utils#build",
"@abstract-money/cli#build",
"codegen:abstract",
"codegen:subgraph",
Expand All @@ -14,7 +14,7 @@
},
"typecheck": {
"dependsOn": [
"@abstract-money/cosmwasm#build",
"@abstract-money/cosmwasm-utils#build",
"@abstract-money/cli#build",
"codegen:abstract",
"codegen:subgraph",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Generated file. Do not edit directly.
client/**
utils/**
query/**
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@abstract-money/cosmwasm",
"version": "0.1.3",
"description": "Cosmwasm helpers",
"name": "@abstract-money/cosmwasm-utils",
"version": "0.0.0",
"description": "Cosmwasm utils",
"author": "adairrr",
"license": "MIT",
"repository": "",
Expand Down Expand Up @@ -40,15 +40,15 @@
"types": "./dist/client/index.d.ts",
"default": "./dist/client/index.js"
},
"./utils": {
"types": "./dist/utils/index.d.ts",
"default": "./dist/utils/index.js"
"./query": {
"types": "./dist/query/index.d.ts",
"default": "./dist/query/index.js"
},
"./package.json": "./package.json"
},
"files": [
"/client",
"/utils",
"/query",
"/dist"
],
"sideEffects": false
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './utils'
export * from './client'
export * from './query'
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineConfig(
getConfig({
outDir: 'dist',
//dev: process.env.DEV === 'true',
entry: ['src/index.ts', 'src/client/index.ts', 'src/utils/index.ts'],
entry: ['src/index.ts', 'src/client/index.ts', 'src/query/index.ts'],
external: [...Object.keys(dependencies)],
}),
)
File renamed without changes.
4 changes: 4 additions & 0 deletions packages/cosmwasm-utils/utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "module",
"main": "../dist/utils/index.js"
}
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@abstract-money/core": "workspace:@abstract-money/core@*",
"@abstract-money/core": "workspace:*",
"@tanstack/react-query": "^4",
"zustand": "^4.4.6"
},
Expand Down
24 changes: 12 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
packages:
- 'docs'
- 'examples/*'
- 'packages/*'

0 comments on commit 7eb925b

Please sign in to comment.