-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: c-ehrlich <[email protected]> Co-authored-by: Midas <[email protected]> Co-authored-by: wiktrek <[email protected]>
- Loading branch information
1 parent
db6a204
commit 8034db0
Showing
50 changed files
with
1,218 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"create-t3-app": patch | ||
--- | ||
|
||
refactor: swap inquirer for clack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
"create-t3-app": minor | ||
--- | ||
|
||
feat: add drizzle | ||
|
||
This release adds a new option to use [`drizzle-orm`](https://orm.drizzle.team/docs/overview) as an alternative to Prisma. | ||
|
||
To make the different ORM options as similar as possible, some minor changes has also been made to the Prisma installer: | ||
|
||
- a new script `db:push` has been added and is included in both ORM options. | ||
- the prisma client has been renamed to `db` in the trpc context - you now access your database client like | ||
```ts | ||
examples: publicProcedure.query((opts) => { | ||
// prisma | ||
opts.ctx.db.example.findMany() | ||
// drizzle | ||
opts.ctx.db.query.example.findMany() | ||
}), | ||
``` | ||
|
||
You cannot choose the two options in the same app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,30 +27,40 @@ jobs: | |
tailwind: ["true", "false"] | ||
nextAuth: ["true", "false"] | ||
prisma: ["true", "false"] | ||
drizzle: ["true", "false"] | ||
|
||
name: "Build and Start T3 App ${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}" | ||
name: "Build and Start T3 App ${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}-${{ matrix.drizzle}}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check valid matrix | ||
id: matrix-valid | ||
run: | | ||
echo "continue=${{ matrix.prisma == 'false' || matrix.drizzle == 'false' }}" >> $GITHUB_OUTPUT | ||
- name: Install Node.js | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- uses: pnpm/[email protected] | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | ||
|
@@ -59,14 +69,19 @@ jobs: | |
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
run: pnpm install | ||
|
||
- run: pnpm turbo --filter=create-t3-app build | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
|
||
# has to be scaffolded outside the CLI project so that no lint/tsconfig are leaking | ||
# through. this way it ensures that it is the app's configs that are being used | ||
# FIXME: this is a bit hacky, would rather have --packages=trpc,tailwind,... but not sure how to setup the matrix for that | ||
- run: cd cli && pnpm start ../../ci-${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }} --noGit --CI --trpc=${{ matrix.trpc }} --tailwind=${{ matrix.tailwind }} --nextAuth=${{ matrix.nextAuth }} --prisma=${{ matrix.prisma }} | ||
- run: cd ../ci-${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }} && pnpm build | ||
- run: cd cli && pnpm start ../../ci-${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}-${{ matrix.drizzle}} --noGit --CI --trpc=${{ matrix.trpc }} --tailwind=${{ matrix.tailwind }} --nextAuth=${{ matrix.nextAuth }} --prisma=${{ matrix.prisma }} --drizzle=${{ matrix.drizzle }} | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
- run: cd ../ci-${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}-${{ matrix.drizzle}} && pnpm build | ||
if: ${{ steps.matrix-valid.outputs.continue == 'true' }} | ||
env: | ||
NEXTAUTH_SECRET: foo | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8034db0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
create-t3-app – ./www
www.ct3.app
create-t3-app-t3-oss.vercel.app
ct3.app
create-t3-app-nu.vercel.app
create-t3-app-git-next-t3-oss.vercel.app
beta.create.t3.gg
create.t3.gg
create.t3.wtf
8034db0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
t3-upgrade – ./upgrade
t3-upgrade-git-next-t3-oss.vercel.app
t3-upgrade.vercel.app
t3-upgrade-t3-oss.vercel.app