Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: next merge 2022 09 19 #482

Merged
merged 115 commits into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
f436382
fix: typo in T3 axiom #3
nexxeln Aug 16, 2022
9ad9bd7
chore: update ci stuff
juliusmarminge Aug 16, 2022
3a74fd9
Merge branch 'main' of https://github.com/t3-oss/create-t3-app
juliusmarminge Aug 16, 2022
86fd3d6
docs: write some docs (#323)
nexxeln Aug 17, 2022
fb5498c
feat: wrap createContext in helperfunc to make it independent of req/…
juliusmarminge Aug 17, 2022
6e656ea
fix: typo in auth-context.ts (#328)
Omer-Shahar Aug 18, 2022
45e405a
chore(release): version packages (#326)
github-actions[bot] Aug 18, 2022
a107f14
fix: build fails on trpc, trpc+prisma (#334)
c-ehrlich Aug 19, 2022
5745ad7
fix: invalid typeof window comparison to undefined (#335)
julianread Aug 19, 2022
db62b3e
chore(release): version packages (#336)
github-actions[bot] Aug 19, 2022
fabcb4d
feat: make links in docs a contrasting color (#339)
c-ehrlich Aug 20, 2022
5ba03fd
fix: use auth instead of question while merging the router (#330)
nexxeln Aug 21, 2022
9936bd8
chore(release): version packages (#341)
github-actions[bot] Aug 22, 2022
a8a2fd8
chore(docs): migrate docs to astro (#340)
nexxeln Aug 22, 2022
8ee2ea0
fix: tsconfig include + clean script (#345)
juliusmarminge Aug 23, 2022
de8cc44
chore(release): version packages (#347)
github-actions[bot] Aug 23, 2022
f1174f9
chore: add eol to eslint prettier (#351)
juliusmarminge Aug 25, 2022
0c336a9
chore: update ci
juliusmarminge Aug 25, 2022
b5ef550
docs: add new landing page (#350)
kroucher Aug 25, 2022
cdb6ad6
docs: write tailwind section in Why page (#349)
bdsqqq Aug 26, 2022
ccdcaf0
chore: update ci
juliusmarminge Aug 26, 2022
74b5982
feat: updated docker instructions (#333)
c-ehrlich Aug 26, 2022
c039ddb
docs: Begin migration to Tailwind (#359)
kroucher Aug 27, 2022
7a20de9
feat: add loggers during dev (#353)
Gejsi Aug 27, 2022
946f8cf
feat: more updated docker instructions (#354)
c-ehrlich Aug 27, 2022
63b10ab
chore(release): version packages (#360)
github-actions[bot] Aug 27, 2022
b032074
chore: Sort `package.json` when in `noInstallMode` (#357)
virtuoushub Aug 27, 2022
844eaf8
docs: Fix Mobile Menu, Light Mode Updated, Copy to Clipboard Fixed (#…
kroucher Aug 28, 2022
b3ce004
fix: revert prisma client teardown (#365)
juliusmarminge Aug 28, 2022
f5cb815
chore(release): version packages (#361)
github-actions[bot] Aug 28, 2022
1f43f83
feat: add wrapper for `unstable_getServerSession` (#366)
juliusmarminge Aug 29, 2022
e34e544
fix(www): build errors and CI improvements (#367)
juliusmarminge Aug 29, 2022
3986b45
fix: version and env + refactor file structure (#370)
juliusmarminge Aug 29, 2022
1fbcfe1
chore(release): version packages (#369)
github-actions[bot] Aug 29, 2022
3784ea2
fix: throw error on missing snowpack github token (#373)
c-ehrlich Aug 29, 2022
9fd0b53
fix: astro build (#372)
c-ehrlich Aug 29, 2022
296c79b
feat: add continue and overwrite option on existing dir (#375)
c-ehrlich Aug 30, 2022
08fe3e8
docs: update styling + add environment variables page (#376)
kroucher Aug 30, 2022
1cb7ced
chore: ci caching etc (#374)
juliusmarminge Aug 31, 2022
773b27e
feat: all technology cards in all templates (#381)
c-ehrlich Aug 31, 2022
7ed85d6
docs: improve docker instuctions (#384)
kyuuaria Aug 31, 2022
3ab73b7
feat: updated UI design of landing page (#385)
PiotrekPKP Aug 31, 2022
e05bc3d
feat: safeguards for git repos (#383)
juliusmarminge Sep 1, 2022
2bc89a9
docs: add tailwind, prisma, nextauth (#382)
kroucher Sep 2, 2022
86d053c
feat: styling on index.tsx without tailwind (#388)
c-ehrlich Sep 2, 2022
b2357c9
refactor: move stuff around (#391)
juliusmarminge Sep 2, 2022
852a427
chore(ci): matrix e2e test (#392)
juliusmarminge Sep 3, 2022
38e9af5
chore(ci): fix typo in index.ts (#393)
eltociear Sep 3, 2022
52e9db7
refactor: easier to understand client env warning (#394)
nadilas Sep 3, 2022
a293aee
chore(release): version packages (#377)
github-actions[bot] Sep 3, 2022
6306473
chore: git script
juliusmarminge Sep 4, 2022
30f3db6
feat: forward pass trpc headers during ssr (#396)
rhenriquez28 Sep 5, 2022
ec109fe
docs: update tRPC v10 docs link again (#403)
Samathingamajig Sep 6, 2022
962768a
refactor: move createProtectedRouter to auth-context.ts (#395)
Pearcekieser Sep 6, 2022
23458b8
fix: docker guide doesn't work with prisma (#399)
c-ehrlich Sep 6, 2022
e8561d3
chore(release): version packages (#400)
github-actions[bot] Sep 6, 2022
0f8f59c
feat: add basic i18n configuration in next.config (#387)
Vallerem Sep 8, 2022
01183fb
chore(release): version packages (#408)
github-actions[bot] Sep 8, 2022
ff64216
fix: gitignore
juliusmarminge Sep 8, 2022
2b14518
docs: add typescript, nextjs, remove old style tags (#411)
kroucher Sep 10, 2022
554de8f
fix: remove unnecessary singlequote in tailwind classname (#419)
sor4chi Sep 10, 2022
12d2225
docs: minor improvements (#420)
rhenriquez28 Sep 10, 2022
af3bdc2
chore(release): version packages (#421)
github-actions[bot] Sep 10, 2022
14b6d4a
fix(template): missing ctx when using ssr with trpc (#416)
xpressivecode Sep 11, 2022
36c3f2b
feat: error handler for trpc (#413)
ted-pulsen Sep 11, 2022
4416a09
docs: Flesh out learning resource section of FAQ (#425)
ajcwebdev Sep 12, 2022
306777a
feat: direct developer to add schema from .env to schema.mjs for zod …
benmarg Sep 12, 2022
6da0b1e
chore(release): version packages (#423)
github-actions[bot] Sep 13, 2022
ded8c7c
fix: contributor avatar layout (#433)
c-ehrlich Sep 13, 2022
4675cb6
feat: add prettier-plugin-astro to .prettierrc (#434)
c-ehrlich Sep 13, 2022
0ed4b88
fix(ui): copy btn + lighthouse ci (#437)
juliusmarminge Sep 13, 2022
507ad82
fix: regex matcher
juliusmarminge Sep 13, 2022
fbae7d7
fix: get preview url (#438)
juliusmarminge Sep 13, 2022
927efbb
fix: get url script
juliusmarminge Sep 13, 2022
aa56eab
chore: merge main
juliusmarminge Sep 13, 2022
73ab069
fix: invalid script
juliusmarminge Sep 13, 2022
ab5e0e1
fix: script
juliusmarminge Sep 13, 2022
f40142f
fix: script
juliusmarminge Sep 13, 2022
a5cd010
Update lighthouse.yml
juliusmarminge Sep 13, 2022
9f8c947
Update lighthouse.yml
juliusmarminge Sep 13, 2022
04b1a9c
chore(www): ui contrasts + disable lightmode (#439)
juliusmarminge Sep 13, 2022
c91d492
feat: cursor-pointer on theme toggle button (#435)
c-ehrlich Sep 14, 2022
75f6a77
don't make lighthouse comment if vercel_url not found
juliusmarminge Sep 14, 2022
6c4ba5a
docs: clear helper types description (#441)
c-ehrlich Sep 14, 2022
07a7fee
feat: added light mode back (#443)
gabrielelpidio Sep 15, 2022
6f63ec6
feat: better cli text when scaffolding in '.' (#446)
c-ehrlich Sep 15, 2022
bbd5f27
feat(docs): refined instructions for contributing (#452)
benmarg Sep 16, 2022
ee27f73
chore(release): version packages (#451)
github-actions[bot] Sep 16, 2022
1d8e059
refactor(docs): major refactor and configure theme (#447)
juliusmarminge Sep 16, 2022
4236220
fix: astro build (#458)
c-ehrlich Sep 16, 2022
b8a3c93
fix: some ui (#459)
juliusmarminge Sep 17, 2022
a64d6c3
fix: ui improvements (#460)
Coyenn Sep 17, 2022
c9cda8d
fix: add astro formatting to .lintstagedrc (#463) (#464)
HansGabriel Sep 18, 2022
d8854d2
docs: write Prisma section in Why page (#402)
bdsqqq Sep 18, 2022
afd6b4c
refactor(blog): rework blog ui and improve scrolling behavior (#465)
gabrielelpidio Sep 18, 2022
a17ed15
refactor: rename layout and use mdx (#466)
juliusmarminge Sep 18, 2022
90c44ac
fix: docs right sidebar overlaying content (#467)
c-ehrlich Sep 18, 2022
211b935
feat(docs): minor tweaks and improvements (#469)
nexxeln Sep 18, 2022
c94196f
fix: apply and use theme colors on landing page and algolia (#462)
Coyenn Sep 18, 2022
11d9f6f
fix(ci): graceful cancel?
juliusmarminge Sep 18, 2022
e20bcaa
fix(ci): graceful cancel 2?
juliusmarminge Sep 18, 2022
44331d6
fix(ci): graceful cancel 3?
juliusmarminge Sep 18, 2022
0fd0eb5
fix(ci): graceful cancel 4?
juliusmarminge Sep 18, 2022
7f2ee74
fix(ci): graceful cancel 5?
juliusmarminge Sep 18, 2022
850da3d
refactor: docs and landing page layouts (#475)
Coyenn Sep 18, 2022
f4ba53d
feat: add gitpod support (#471)
Coyenn Sep 18, 2022
10ebdda
create CODEOWNERS
juliusmarminge Sep 18, 2022
951db41
Update CODEOWNERS
juliusmarminge Sep 18, 2022
a46be8a
Update CODEOWNERS
juliusmarminge Sep 18, 2022
16b31c3
docs: added portfolio to OSS links (#478)
JoshHyde9 Sep 18, 2022
fd43aac
chore: merge main into next
juliusmarminge Sep 19, 2022
3da2a14
chore: bump to v10 beta
juliusmarminge Sep 19, 2022
e5901fd
fix: bad merge 1
juliusmarminge Sep 19, 2022
b471ff3
fix: bad merge 2
juliusmarminge Sep 19, 2022
7d2237e
chore: check build
juliusmarminge Sep 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners


* @juliusmarminge @nexxeln @TheoBr
92 changes: 92 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Vercel Preview URL Lighthouse Audit

on:
issue_comment:
types: [created, edited]

jobs:
generate_lighthouse_audit:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Get Vercel preview URL
id: get_preview_url
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const comment = context.payload.comment;
const regex = /https:\/\/[a-z0-9-]+\.vercel\.app/g;
const matches = comment.body.match(regex);
let previewUrl = "";
if (matches && matches.length) {
previewUrl = matches[0];
console.log('Preview url found:', previewUrl);
}
console.log("No preview url found.");
core.setOutput('vercel_preview_url', previewUrl);

- name: Add comment to PR
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: loading_comment_to_pr
uses: marocchino/sticky-pull-request-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
header: lighthouse
message: |
Running Lighthouse audit...

- name: Checkout repository
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
uses: actions/checkout@v3

- name: Audit preview URL with Lighthouse
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v3
with:
urls: |
${{ steps.get_preview_url.outputs.vercel_preview_url }}
uploadArtifacts: true
temporaryPublicStorage: true
- name: Format lighthouse score
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: format_lighthouse_score
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[0].summary
const links = ${{ steps.lighthouse_audit.outputs.links }}

const formatResult = (res) => Math.round((res * 100))
Object.keys(result).forEach(key => result[key] = formatResult(result[key]))

const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴'

const comment = [
`⚡️ [Lighthouse report](${Object.values(links)[0]}) for the changes in this PR:`,
'| Category | Score |',
'| --- | --- |',
`| ${score(result.performance)} Performance | ${result.performance} |`,
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`,
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`,
`| ${score(result.seo)} SEO | ${result.seo} |`,
`| ${score(result.pwa)} PWA | ${result.pwa} |`,
' ',
`*Lighthouse ran on [${Object.keys(links)[0]}](${Object.keys(links)[0]})*`
].join('\n')

core.setOutput("comment", comment);

- name: Add comment to PR
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: comment_to_pr
uses: marocchino/sticky-pull-request-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.issue.number }}
header: lighthouse
message: |
${{ steps.format_lighthouse_score.outputs.comment }}
6 changes: 6 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tasks:
- init: pnpm install
vscode:
extensions:
- astro-build.astro-vscode
- bradlc.vscode-tailwindcss
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
],
"*.{json,md,mdx}": [
"prettier --write"
],
"www/**/*.astro": [
"prettier --write"
]
}
7 changes: 5 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"jsxSingleQuote": false,
"semi": true,
"trailingComma": "all",
"tabWidth": 2
}
"tabWidth": 2,
"plugins": [
"prettier-plugin-astro"
]
}
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pnpm install

### Implement your changes

This project is a [Turborepo](https://turborepo.org/) monorepo. The code for the CLI is in the `cli` directory, and the docs is in the `www` directory. Now you're all setup and can start implementing your changes.
This project is a [Turborepo](https://turborepo.org/) monorepo. The code for the CLI is in the `cli` directory, and the docs is in the `www` directory. This project is a [Turborepo](https://turborepo.org/) monorepo. The code for the CLI is in the `cli` directory, and the docs is in the `www` directory. Now you're all setup and can start implementing your changes.

Here are some useful scripts for when you are developing:

Expand All @@ -57,7 +57,11 @@ Here are some useful scripts for when you are developing:
| `pnpm lint:fix` | Lints the code and fixes any errors |
| `pnpm check` | Checks your code for typeerrors, formatting and linting |

When making commits, make sure to follow the [convential commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines, i.e. prepending the message with `feat:`, `fix:`, `chore:`, `docs:`, etc...
When making commits, make sure to follow the [convential commit](https://www.conventionalcommits.org/en/v1.0.0/) guidelines, i.e. prepending the message with `feat:`, `fix:`, `chore:`, `docs:`, etc... You can use `git status` to double check which files have not yet been staged for commit:

```bash
git add <file> && git commit -m "feat/fix/chore/docs: commit message"
```

### When you're done

Expand Down
22 changes: 22 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Changelog

## 5.12.0

### Minor Changes

- [#446](https://github.com/t3-oss/create-t3-app/pull/446) [`6f63ec6`](https://github.com/t3-oss/create-t3-app/commit/6f63ec65201a077e534ec89c4ef18bfa07a30331) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - feat: better cli text when scaffolding in '.'

## 5.11.0

### Minor Changes

- [#430](https://github.com/t3-oss/create-t3-app/pull/430) [`306777a`](https://github.com/t3-oss/create-t3-app/commit/306777a5513c365dfb3525c1484459236734a289) Thanks [@benmarg](https://github.com/benmarg)! - feat: direct developer to add schema from .env to schema.mjs for zod validation

### Patch Changes

- [#416](https://github.com/t3-oss/create-t3-app/pull/416) [`14b6d4a`](https://github.com/t3-oss/create-t3-app/commit/14b6d4a0764f57ece45749724c5b12a85544733e) Thanks [@xpressivecode](https://github.com/xpressivecode)! - fix(template): missing ctx when using ssr with trpc

## 5.10.3

### Patch Changes

- [#419](https://github.com/t3-oss/create-t3-app/pull/419) [`554de8f`](https://github.com/t3-oss/create-t3-app/commit/554de8f2838a8d539d81bcb520f121a7e14e3c84) Thanks [@sor4chi](https://github.com/sor4chi)! - Remove unnecessary singlequote in tailwind classname

## 5.10.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-t3-app",
"version": "5.10.2",
"version": "5.12.0",
"description": "Create web application with the t3 stack",
"license": "MIT",
"repository": {
Expand Down
12 changes: 8 additions & 4 deletions cli/src/installers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ export const dependencyVersionMap = {
postcss: "^8.4.14",

// tRPC
"@trpc/client": "10.0.0-proxy-alpha.70",
"@trpc/server": "10.0.0-proxy-alpha.70",
"@trpc/react": "10.0.0-proxy-alpha.70",
"@trpc/next": "10.0.0-proxy-alpha.70",
"@trpc/client": "10.0.0-proxy-alpha.81",
"@trpc/server": "10.0.0-proxy-alpha.81",
"@trpc/react": "10.0.0-proxy-alpha.81",
"@trpc/next": "10.0.0-proxy-alpha.81",
// "@trpc/client": "10.0.0-beta.1",
// "@trpc/server": "10.0.0-beta.1",
// "@trpc/react": "10.0.0-beta.1",
// "@trpc/next": "10.0.0-beta.1",
"@tanstack/react-query": "^4.2.3",
superjson: "^1.9.1",
} as const;
Expand Down
1 change: 1 addition & 0 deletions cli/template/addons/env/auth-schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { z } from "zod";
* This way you can ensure the app isn't built with invalid env vars.
*/
export const serverSchema = z.object({
NODE_ENV: z.enum(["development", "test", "production"]),
NEXTAUTH_SECRET: z.string(),
NEXTAUTH_URL: z.string().url(),
DISCORD_CLIENT_ID: z.string(),
Expand Down
1 change: 1 addition & 0 deletions cli/template/base/.env-example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Note that not all variables here might be in use for your selected configuration
# When adding additional env variables, the schema in /env/schema.mjs should be updated accordingly

# Prisma
DATABASE_URL=file:./db.sqlite
Expand Down
9 changes: 8 additions & 1 deletion cli/template/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ If you are not familiar with the different technologies used in this project, pl
- [Next-Auth.js](https://next-auth.js.org)
- [Prisma](https://prisma.io)
- [TailwindCSS](https://tailwindcss.com)
- [tRPC](https://trpc.io) (using @next version? [see v10 docs here](https://alpha.trpc.io))
- [tRPC](https://trpc.io) (using @next version? [see v10 docs here](https://trpc.io/docs/v10/))

Also checkout these awesome tutorials on `create-t3-app`.

- [Build a Blog With the T3 Stack - tRPC, TypeScript, Next.js, Prisma & Zod](https://www.youtube.com/watch?v=syEWlxVFUrY)
- [Build a Live Chat Application with the T3 Stack - TypeScript, Tailwind, tRPC](https://www.youtube.com/watch?v=dXRRY37MPuk)
- [Build a full stack app with create-t3-app](https://www.nexxel.dev/blog/ct3a-guestbook)
- [A first look at create-t3-app](https://dev.to/ajcwebdev/a-first-look-at-create-t3-app-1i8f)

Also checkout these awesome tutorials on `create-t3-app`.

Expand Down
2 changes: 1 addition & 1 deletion cli/template/base/src/env/schema.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { z } from "zod";
* This way you can ensure the app isn't built with invalid env vars.
*/
export const serverSchema = z.object({
// SERVERVAR: z.string(),
NODE_ENV: z.enum(["development", "test", "production"]),
});

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"eslint": "^8.22.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-turbo": "^0.0.3",
"eslint-plugin-astro": "^0.17.1",
"eslint-plugin-astro": "^0.19.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.0",
Expand Down
Loading