Skip to content

Commit

Permalink
trpc: move to @tanstack/solid-query@alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
OrJDev committed Feb 28, 2023
1 parent 22680c1 commit e351894
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 183 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-cherries-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-jd-app": patch
---

trpc: move to @tanstack/solid-query@alpha
151 changes: 0 additions & 151 deletions CHANGELOG.md

This file was deleted.

39 changes: 33 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
# Changesets
# Create JD App

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
Create modern Solid / SolidStart web application within seconds.

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
> Now fully supports ssr - all installers including tRPC
## Getting Started

```bash
npm create jd-app@latest
```

## Base Template

- [Solid Start](https://github.com/solidjs/solid-start)
- [TypeScript](https://github.com/microsoft/TypeScript)
- [Zod](https://github.com/colinhacks/zod)
- [Solid EsLint](https://github.com/solidjs-community/eslint-plugin-solid)

## Addons

All addons are optional, you may select some, you may select all and you may select none.

- [Prisma](https://github.com/prisma/prisma)
- [tRPC](https://github.com/trpc/trpc)
- [TailwindCSS](https://github.com/tailwindlabs/tailwindcss)
- [UnoCSS](https://github.com/unocss/unocss)
- [AuthJS](https://github.com/nextauthjs/next-auth)
- [Upstash Ratelimit](https://github.com/upstash/ratelimit)

#### Preview

![Screenshot_1](https://user-images.githubusercontent.com/91349014/201010596-4578b981-4183-4197-be43-6e01ed582954.png)

This project was inspired by [create t3 app](https://github.com/t3-oss/create-t3-app) and was created in order to make it easier to create a solid app. (and replace `npm init solid`)
14 changes: 0 additions & 14 deletions config.json

This file was deleted.

5 changes: 0 additions & 5 deletions fluffy-owls-crash.md

This file was deleted.

8 changes: 3 additions & 5 deletions src/helpers/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ const packages = {
// prisma
"@prisma/client": "^4.10.1",
// trpc
"@tanstack/solid-query": "^4.24.9",
"@tanstack/solid-query": "^5.0.0-alpha.0",
"@trpc/client": "^10.12.0",
"@trpc/server": "^10.12.0",
"solid-start-trpc": "^0.0.16",
"solid-trpc": "^0.0.11-rc.2",
// trpc ssr
"solid-trpc->ssr": "0.1.0-sssr.6",
"@adeora/solid-query": "0.19.0",
"solid-trpc": "^0.0.11-rc.3",
"solid-trpc->ssr": "0.1.0-sssr.7",
// next auth
"@auth/solid-start": "^0.1.0",
"@auth/core": "^0.4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/installers/tRPC/files/ssr-utils.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { QueryClient } from "@adeora/solid-query";
import { QueryClient } from "@tanstack/solid-query";
import type { IAppRouter } from "~/server/trpc/router/_app";
import { createTRPCSolidStart } from "solid-trpc";
import { httpBatchLink } from "@trpc/client";

const getBaseUrl = () => {
if (typeof window !== "undefined") return "";
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
// replace example.com with your actual production url
if (process.env.NODE_ENV === "production") return "https://example.com";
return `http://localhost:${process.env.PORT ?? 3000}`;
Expand Down
2 changes: 1 addition & 1 deletion src/installers/tRPC/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const config: IInstaller = (ctx) => ({
pkgs: withPackages({
normal: [
ctx.ssr ? "solid-trpc->ssr" : "solid-trpc",
ctx.ssr ? "@adeora/solid-query" : "@tanstack/solid-query",
"@tanstack/solid-query",
"solid-start-trpc",
"@trpc/client",
"@trpc/server",
Expand Down

0 comments on commit e351894

Please sign in to comment.