Skip to content

Commit

Permalink
chore: fix chore: fix dependencies versions in the example project & …
Browse files Browse the repository at this point in the history
…upgrade some packages (#40)

* chore: fix dependencies versions in the example project, migrate @tot… (#36)

* chore: fix dependencies versions in the example project, migrate @totejs/walletkit to @node-real/walletkit.

* chore: upgrade the publish flow

* chore: config commit-msg

* chore: update versions (alpha) (#37)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: greenfield-uploadkit auto upgrade version error (#38)

* chore: update versions (alpha) (#39)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 26, 2024
1 parent 4749443 commit 564f074
Show file tree
Hide file tree
Showing 37 changed files with 305 additions and 202 deletions.
16 changes: 16 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"docs": "0.0.1",
"uploadkit-with-nextjs-rainbowkit": "0.1.0",
"uploadkit-with-nextjs-walletkit": "0.1.0",
"uploadkit-with-remix-rainbowkit": "0.0.75",
"uploadkit-with-vite-walletkit": "0.0.1",
"@node-real/greenfield-uploadkit": "0.0.5"
},
"changesets": [
"short-pianos-allow",
"slimy-knives-hunt"
]
}
5 changes: 5 additions & 0 deletions .changeset/short-pianos-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@node-real/greenfield-uploadkit": patch
---

fix: greenfield-uploadkit auto upgrade version error
5 changes: 5 additions & 0 deletions .changeset/slimy-knives-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@node-real/greenfield-uploadkit": patch
---

chore: fix dependencies' versions in the example project, migrate @totejs/walletkit to @node-real/walletkit.
39 changes: 39 additions & 0 deletions .github/workflows/alpha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Alpha release
on:
push:
branches:
- alpha

jobs:
release:
name: release
if: github.repository == 'node-real/greenfield-toolkit'
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: ./.github/actions/setup
with:
npm_token: ${{ secrets.NPM_TOKEN }}

- name: Build packages
run: pnpm build

- name: Enter pre mode
if: github.event.commits[0].author.username != 'github-actions[bot]'
run: pnpm ci:enter

- name: Create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:alpha-version
publish: pnpm ci:publish
commit: 'chore: update versions'
title: 'chore: update versions'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 7 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Release
name: Stable Release
on:
push:
branches:
- main
- alpha
- 0.x
- 0.x-alpha

jobs:
release:
Expand All @@ -20,22 +17,20 @@ jobs:
fetch-depth: 0

- uses: ./.github/actions/setup
with:
npm_token: ${{ secrets.NPM_TOKEN }}

- name: Build packages
run: pnpm build

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Exit pre mode
if: github.event.commits[0].author.username != 'github-actions[bot]'
run: pnpm ci:exit

- name: Create and publish versions
uses: changesets/action@v1
with:
version: pnpm ci:version
version: pnpm ci:stable-version
publish: pnpm ci:publish
commit: 'chore: update versions'
title: 'chore: update versions'
Expand Down
Empty file modified .husky/commit-msg
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
rules: {
'subject-case': [
2,
'never',
'always',
['sentence-case', 'start-case', 'pascal-case', 'upper-case', 'lower-case'],
],
},
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"@emotion/styled": "^11.11.0",
"@mdx-js/mdx": "~2.1.5",
"@mdx-js/react": "~2.2.1",
"@totejs/icons": "^2.19.0",
"@totejs/uikit": "^2.54.2",
"@totejs/walletkit": "^1.0.8",
"@node-real/icons": "^2.19.0",
"@node-real/uikit": "^2.54.2",
"@node-real/walletkit": "^1.0.10-alpha.1",
"@node-real/greenfield-uploadkit": "workspace:*",
"@bnb-chain/greenfield-cosmos-types": "0.4.0",
"@bnb-chain/greenfield-js-sdk": "1.2.0",
Expand Down
4 changes: 2 additions & 2 deletions docs/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';
import '@node-real/greenfield-uploadkit/styles.css';
import { ThemeProvider } from '@totejs/uikit';
import { ThemeProvider } from '@node-real/uikit';
import { Routes, Route } from 'react-router-dom';

import { theme } from './theme';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/CodeBlock/CopyButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, useClipboard } from '@totejs/uikit';
import { Button, useClipboard } from '@node-real/uikit';

interface CopyButtonProps {
code: string;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/CodeBlock/Highlight/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box } from '@totejs/uikit';
import { Box } from '@node-real/uikit';
import BaseHighlight, { Language, defaultProps, PrismTheme } from 'prism-react-renderer';

import CopyButton from '../CopyButton';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/CodeBlock/LiveCode/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live';
import { Language, PrismTheme } from 'prism-react-renderer';
import { Box } from '@totejs/uikit';
import { Box } from '@node-real/uikit';

import scope from './scope';
import { EditorStyles, PreviewStyles } from '../styles';
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/CodeBlock/LiveCode/scope.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as icon from '@totejs/icons';
import * as uikit from '@totejs/uikit';
import * as walletkit from '@totejs/walletkit';
import * as icon from '@node-real/icons';
import * as uikit from '@node-real/uikit';
import * as walletkit from '@node-real/walletkit';
import React from 'react';
import * as wagmi from 'wagmi';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Layout/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex, HStack, Heading, IconButton, Link } from '@totejs/uikit';
import { Flex, HStack, Heading, IconButton, Link } from '@node-real/uikit';

import { GitHubIcon } from '../../SvgIcon/GitHubIcon';
import { SwitchColorMode } from '../SwitchColorMode';
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/Layout/SwitchColorMode/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MoonIcon, SunIcon } from '@totejs/icons';
import { Circle, Flex, useColorMode } from '@totejs/uikit';
import { MoonIcon, SunIcon } from '@node-real/icons';
import { Circle, Flex, useColorMode } from '@node-real/uikit';

export function SwitchColorMode() {
const { colorMode, toggleColorMode } = useColorMode();
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex } from '@totejs/uikit';
import { Box, Flex } from '@node-real/uikit';
import { Header } from './Header';

export function Layout(props: React.PropsWithChildren) {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/MDXComponent/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as UIKit from '@totejs/uikit';
import * as UIKit from '@node-real/uikit';

import CodeBlock from '../CodeBlock';
import PropsTable from '../PropsTable';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/PropsTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Flex, Text } from '@totejs/uikit';
import { Box, Flex, Text } from '@node-real/uikit';

interface RowProps {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/SvgIcon/GitHubIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Icon, IconProps } from '@totejs/icons';
import { Icon, IconProps } from '@node-real/icons';

export const GitHubIcon = (props: IconProps) => (
<Icon viewBox="0 0 20 20" fill="currentColor" {...props}>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/components/UploadKit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import {
getDefaultConfig,
WalletKitOptions,
SwitchNetworkModal,
} from '@totejs/walletkit';
import { metaMask, trustWallet, walletConnect } from '@totejs/walletkit/wallets';
} from '@node-real/walletkit';
import { metaMask, trustWallet, walletConnect } from '@node-real/walletkit/wallets';
import {
UploadKitProvider,
UploadKitOptions,
UploadKitButton,
} from '@node-real/greenfield-uploadkit';

import { chains } from './chains';
import { Box, useColorMode } from '@totejs/uikit';
import { Box, useColorMode } from '@node-real/uikit';
import { client } from './client';

const config = createConfig(
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ReactDOM from 'react-dom/client';
import { ColorModeScript } from '@totejs/uikit';
import { ColorModeScript } from '@node-real/uikit';
import { HashRouter } from 'react-router-dom';

import App from './App';
Expand Down
10 changes: 5 additions & 5 deletions docs/src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ export const client = Client.create(GRPC_URL, String(GREEN_CHAIN_ID), {
});
```

### 4. Integrate [@totejs/walletkit](https://github.com/node-real/walletkit) as the wallet connection library, or connect with [rainbowkit](https://github.com/rainbow-me/rainbowkit)
### 4. Integrate [@node-real/walletkit](https://github.com/node-real/walletkit) as the wallet connection library, or connect with [rainbowkit](https://github.com/rainbow-me/rainbowkit)

```bash
npm install @totejs/walletkit
npm install @node-real/walletkit
```

### 5. Add WagmiConfig, WalletKitProvider and UploadKitProvider configuration to your project
Expand All @@ -144,8 +144,8 @@ import {
WalletKitOptions,
WalletKitProvider,
getDefaultConfig,
} from '@totejs/walletkit';
import { trustWallet, metaMask, walletConnect } from '@totejs/walletkit/wallets';
} from '@node-real/walletkit';
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import {
UploadKitButton,
UploadKitOptions,
Expand All @@ -155,7 +155,7 @@ import { chains } from './chains';
import { client } from './client';

import '@node-real/greenfield-uploadkit/styles.css';
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';

const config = createConfig(
getDefaultConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Theme } from '@totejs/uikit';
import { Theme } from '@node-real/uikit';

export const theme: Theme = {
config: {
Expand Down
8 changes: 4 additions & 4 deletions examples/uploadkit-with-nextjs-rainbowkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "latest",
"@bnb-chain/greenfield-js-sdk": "latest",
"@bnb-chain/reed-solomon": "latest",
"@node-real/greenfield-uploadkit": "latest",
"@bnb-chain/greenfield-cosmos-types": "0.4.0",
"@bnb-chain/greenfield-js-sdk": "1.2.0",
"@bnb-chain/reed-solomon": "1.1.3",
"@node-real/greenfield-uploadkit": "workspace:*",
"@rainbow-me/rainbowkit": "^1.3.3",
"axios": "^1.6.3",
"next": "14.0.4",
Expand Down
10 changes: 5 additions & 5 deletions examples/uploadkit-with-nextjs-walletkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"lint": "next lint"
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "latest",
"@bnb-chain/greenfield-js-sdk": "latest",
"@bnb-chain/reed-solomon": "latest",
"@totejs/walletkit": "^1.0.8",
"@node-real/greenfield-uploadkit": "latest",
"@bnb-chain/greenfield-cosmos-types": "0.4.0",
"@bnb-chain/greenfield-js-sdk": "1.2.0",
"@bnb-chain/reed-solomon": "1.1.3",
"@node-real/greenfield-uploadkit": "workspace:*",
"@node-real/walletkit": "^1.0.10-alpha.1",
"axios": "^1.6.3",
"next": "14.0.4",
"react": "^18",
Expand Down
4 changes: 2 additions & 2 deletions examples/uploadkit-with-nextjs-walletkit/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use client';
import { WalletKitButton } from '@totejs/walletkit';
import { WalletKitButton } from '@node-real/walletkit';
import { UploadKitButton } from '@node-real/greenfield-uploadkit';

import '@node-real/greenfield-uploadkit/styles.css';
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';

export default function Home() {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
WalletKitOptions,
WalletKitProvider,
getDefaultConfig,
} from '@totejs/walletkit';
import { trustWallet, metaMask, walletConnect } from '@totejs/walletkit/wallets';
} from '@node-real/walletkit';
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import { UploadKitOptions, UploadKitProvider } from '@node-real/greenfield-uploadkit';
import { client } from './client';

import '@node-real/greenfield-uploadkit/styles.css';
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';

const config = createConfig(
getDefaultConfig({
Expand Down
8 changes: 4 additions & 4 deletions examples/uploadkit-with-remix-rainbowkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"start": "remix-serve build"
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "latest",
"@bnb-chain/greenfield-js-sdk": "latest",
"@bnb-chain/reed-solomon": "latest",
"@node-real/greenfield-uploadkit": "^0.0.4",
"@bnb-chain/greenfield-cosmos-types": "0.4.0",
"@bnb-chain/greenfield-js-sdk": "1.2.0",
"@bnb-chain/reed-solomon": "1.1.3",
"@node-real/greenfield-uploadkit": "workspace:*",
"@rainbow-me/rainbowkit": "1.3.3",
"@remix-run/node": "^1.5.1",
"@remix-run/react": "^1.5.1",
Expand Down
10 changes: 5 additions & 5 deletions examples/uploadkit-with-vite-walletkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"preview": "vite preview"
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "latest",
"@bnb-chain/greenfield-js-sdk": "latest",
"@bnb-chain/reed-solomon": "latest",
"@node-real/greenfield-uploadkit": "latest",
"@totejs/walletkit": "^1.0.8",
"@bnb-chain/greenfield-cosmos-types": "0.4.0",
"@bnb-chain/greenfield-js-sdk": "1.2.0",
"@bnb-chain/reed-solomon": "1.1.3",
"@node-real/greenfield-uploadkit": "workspace:*",
"@node-real/walletkit": "1.0.10-alpha.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^1.19.9",
Expand Down
6 changes: 3 additions & 3 deletions examples/uploadkit-with-vite-walletkit/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import {
getDefaultConfig,
WalletKitOptions,
SwitchNetworkModal,
} from '@totejs/walletkit';
import { trustWallet, metaMask, walletConnect } from '@totejs/walletkit/wallets';
} from '@node-real/walletkit';
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import {
UploadKitButton,
UploadKitOptions,
UploadKitProvider,
} from '@node-real/greenfield-uploadkit';
import { client } from './client';
import '@node-real/greenfield-uploadkit/styles.css';
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';

const config = createConfig(
getDefaultConfig({
Expand Down
2 changes: 1 addition & 1 deletion examples/uploadkit-with-vite-walletkit/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@totejs/walletkit/styles.css';
import '@node-real/walletkit/styles.css';
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
Expand Down
Loading

0 comments on commit 564f074

Please sign in to comment.