From d487cd26a80d02cc2cb9edf8c522767255eb5fdb Mon Sep 17 00:00:00 2001 From: M <44983729+mgavillo@users.noreply.github.com> Date: Mon, 13 Nov 2023 15:06:50 +0000 Subject: [PATCH] Update create starknet v2 Add non pushed package.json and fix provider to meet new version of @startnet-react/core. --- .../templates/next/package.json | 18 ++++++++++++------ .../templates/next/pages/_app.tsx | 4 ++-- .../templates/vite/package.json | 16 ++++++++++++---- .../templates/vite/src/main.tsx | 4 ++-- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/packages/create-starknet/templates/next/package.json b/packages/create-starknet/templates/next/package.json index 4c47bb16..b0f15469 100644 --- a/packages/create-starknet/templates/next/package.json +++ b/packages/create-starknet/templates/next/package.json @@ -10,17 +10,23 @@ }, "dependencies": { "@next/font": "13.1.6", - "@starknet-react/core": "^1.0.1", - "next": "13.1.6", - "react": "18.2.0", - "react-dom": "18.2.0" + "@starknet-react/chains": "^0.1.0-next.1", + "@starknet-react/core": "2.0.0-next.6", + "get-starknet-core": "^3.2.0", + "next": "^14.0.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "starknet": "^5.19.5", + "tailwindcss": "^3.3.5" }, "devDependencies": { "@types/node": "18.11.18", - "@types/react": "18.0.27", - "@types/react-dom": "18.0.10", + "@types/react": "^18.2.37", + "@types/react-dom": "^18.2.15", + "autoprefixer": "^10.4.16", "eslint": "8.33.0", "eslint-config-next": "13.1.6", + "postcss": "^8.4.31", "typescript": "4.9.5" } } diff --git a/packages/create-starknet/templates/next/pages/_app.tsx b/packages/create-starknet/templates/next/pages/_app.tsx index d4a5d325..27cc766d 100644 --- a/packages/create-starknet/templates/next/pages/_app.tsx +++ b/packages/create-starknet/templates/next/pages/_app.tsx @@ -11,7 +11,7 @@ import "./globals.css" export default function App({ Component, pageProps }: AppProps) { const chains = [goerli, mainnet, devnet]; - const providers = [publicProvider()]; + const provider = publicProvider(); const { connectors } = useInjectedConnectors({ // Show these connectors if the user has no connector installed. recommended: [ @@ -25,7 +25,7 @@ export default function App({ Component, pageProps }: AppProps) { return ( diff --git a/packages/create-starknet/templates/vite/package.json b/packages/create-starknet/templates/vite/package.json index 0b148f08..03c89b9c 100644 --- a/packages/create-starknet/templates/vite/package.json +++ b/packages/create-starknet/templates/vite/package.json @@ -9,17 +9,25 @@ "preview": "vite preview" }, "dependencies": { - "@starknet-react/core": "^1.0.1", + "@starknet-react/chains": "^0.1.0-next.1", + "@starknet-react/core": "2.0.0-next.6", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "get-starknet-core": "^3.2.0", + "next": "^14.0.1", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "starknet": "^5.19.5", + "tailwindcss": "^3.3.5" }, "devDependencies": { "@types/react": "^18.0.27", "@types/react-dom": "^18.0.10", "@vitejs/plugin-react": "^3.1.0", - "eslint": "^8.26.0", + "autoprefixer": "^10.4.16", + "eslint": "8.33.0", "eslint-plugin-react": "^7.31.4", - "typescript": "^4.9.3", + "postcss": "^8.4.31", + "typescript": "4.9.5", "vite": "^4.1.0", "vite-plugin-checker": "^0.5.1" } diff --git a/packages/create-starknet/templates/vite/src/main.tsx b/packages/create-starknet/templates/vite/src/main.tsx index 4c736c3d..5e38534f 100644 --- a/packages/create-starknet/templates/vite/src/main.tsx +++ b/packages/create-starknet/templates/vite/src/main.tsx @@ -7,7 +7,7 @@ import "./globals.css" function Root({ children }: { children: React.ReactNode }) { const chains = [goerli, mainnet, devnet]; - const providers = [publicProvider()]; + const provider = publicProvider(); const { connectors } = useInjectedConnectors({ // Show these connectors if the user has no connector installed. recommended: [ @@ -21,7 +21,7 @@ function Root({ children }: { children: React.ReactNode }) { return ( {children}