Skip to content

Commit

Permalink
Merge branch 'next' into turkish-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
EgeOnder committed Sep 3, 2023
2 parents 61c7063 + e345e56 commit 487651e
Show file tree
Hide file tree
Showing 259 changed files with 10,004 additions and 2,820 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"access": "public",
"baseBranch": "next",
"updateInternalDependencies": "patch",
"ignore": ["@ct3a/www"],
"ignore": ["@ct3a/www", "@ct3a/upgrade"],
"changedFilePatterns": ["src/**", "template/**"]
}
5 changes: 0 additions & 5 deletions .changeset/itchy-cooks-sell.md

This file was deleted.

29 changes: 16 additions & 13 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const config = {
parser: "@typescript-eslint/parser",
plugins: ["isaacscript", "import"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:prettier/recommended",
],
parserOptions: {
Expand All @@ -15,11 +15,20 @@ const config = {
project: [
"./tsconfig.json",
"./cli/tsconfig.eslint.json", // separate eslint config for the CLI since we want to lint and typecheck differently due to template files
"./upgrade/tsconfig.json",
"./www/tsconfig.json",
],
},
overrides: [
// Template files don't have reliable type information
{
files: ["./cli/template/**/*.{ts,tsx}"],
extends: ["plugin:@typescript-eslint/disable-type-checked"],
},
],
rules: {
"@typescript-eslint/restrict-template-expressions": "off",
// These off/not-configured-the-way-we-want lint rules we like & opt into
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{ argsIgnorePattern: "^_", destructuredArrayIgnorePattern: "^_" },
Expand All @@ -30,19 +39,13 @@ const config = {
],
"import/consistent-type-specifier-style": ["error", "prefer-inline"],

// These rules are only disabled because we hit a bug in linting.
// See https://github.com/t3-oss/create-t3-app/pull/1036#discussion_r1060505136
// If you still see the bug once TypeScript@5 is used, please let typescript-eslint know!
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",

// For educational purposes we format our comments/jsdoc nicely
"isaacscript/complete-sentences-jsdoc": "warn",
"isaacscript/format-jsdoc-comments": "warn",

// These lint rules don't make sense for us but are enabled in the preset configs
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/restrict-template-expressions": "off",
},
};

Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# mdx
*.mdx linguist-detectable=false
3 changes: 2 additions & 1 deletion .github/version-script-beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ try {
console.log(err);
process.exit(1);
}
pkg.version = "6.0.0-beta." + stdout.trim();
const [major, minor, patch] = pkg.version.split(".").map(Number);
pkg.version = `${major}.${minor}.${patch + 1}-beta.${stdout.trim()}`;
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n");
});
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion .github/version-script-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ try {
console.log(err);
process.exit(1);
}
pkg.version = "6.0.0-next." + stdout.trim();
const [major, minor, patch] = pkg.version.split(".").map(Number);
pkg.version = `${major}.${minor}.${patch + 1}-next.${stdout.trim()}`;
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkg, null, "\t") + "\n");
});
} catch (error) {
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,66 @@ jobs:
- run: cd ../ci-${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }} && pnpm build
env:
NEXTAUTH_SECRET: foo

build-t3-app-with-bun:
runs-on: ubuntu-latest

name: "Build and Start T3 App with Bun"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# First install everything and build the CLI with Node
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- uses: pnpm/action-setup@v2.2.4
name: Install pnpm
id: pnpm-install
with:
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- run: pnpm turbo --filter=create-t3-app build

# Then, run the CLI and build the generated app with Bun
# Let's just build a full app with Bun, we don't need the matrix here
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- run: cd cli && bun run dist/index.js ../../ci-bun --default

- name: We should have a Bun lockfile
run: |
if [ ! -f "../ci-bun/bun.lockb" ]; then
echo "Bun lockfile not found"
exit 1
fi
# FIXME: This doesn't actually run the build script using bun, since Next.js doesn't support it yet.
# But you should still be able to use `bun` as a package manager for any Next.js app.
# If/When Next.js supports it, we should be able to run `bun --bun run build` here to override any Node binaries.
# See: https://bun.sh/docs/cli/bunx#shebangs
- run: cd ../ci-bun && bun run build
# - run: cd ../ci-bun && bun --bun run build
env:
NEXTAUTH_SECRET: foo
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Audit preview URL with Lighthouse
if: ${{ steps.get_preview_url.outputs.vercel_preview_url != '' }}
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v3
uses: treosh/lighthouse-ci-action@v9
with:
urls: |
${{ steps.get_preview_url.outputs.vercel_preview_url }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
const CODEOWNERS = {
ar: ["a4addel", "Sboonny"],
fr: ["Defranos", "joachimjusth"],
fr: ["Defranos", "joachimjusth", "vdeva"],
ja: ["t6adev", "uehaj"],
no: ["estubmo", "josephayman"],
pl: ["matibox", "Infiplaya", "PiotrekPKP"],
pt: ["minsk-dev", "Sn0wye", "victoriaquasar", "MattFerreira18", "gilhrpenner"],
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ yarn-error.log*
.idea
.cache/
.next/
next-env.d.ts
.nuxt/
tmp/
temp/
.docusaurus
*.tsbuildinfo

# MAC
._*
Expand All @@ -48,3 +50,10 @@ Thumbs.db

.turbo
.vercel

# Emacs backup files
\#*
.\#*

# TYPESCRIPT
*.tsbuildinfo
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dbaeumer.vscode-eslint",
"astro-build.astro-vscode",
"bradlc.vscode-tailwindcss",
"unifiedjs.vscode-mdx"
"unifiedjs.vscode-mdx",
"yoavbls.pretty-ts-errors"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"typescript",
"typescriptreact"
],
"eslint.workingDirectories": ["cli", "upgrade", "www"],

"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"typescript.tsdk": "node_modules/typescript/lib",
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
When contributing to `create-t3-app`, whether on GitHub or in other community spaces:

- Be respectful, civil, and open-minded.
- Before opening a new pull request, try searching through the [issue tracker](https://github.com/nexxeln/create-t3-app/issues) for known issues or fixes.
- Before opening a new pull request, try searching through the [issue tracker](https://github.com/t3-oss/create-t3-app/issues) for known issues or fixes.
- If you want to make code changes based on your personal opinion(s), make sure you open an issue first describing the changes you want to make, and open a pull request only when your suggestions get approved by maintainers.

## How to Contribute
Expand Down
1 change: 1 addition & 0 deletions cli/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
8 changes: 0 additions & 8 deletions cli/.prettierrc.cjs

This file was deleted.

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

## 7.19.0

### Minor Changes

- [#1375](https://github.com/t3-oss/create-t3-app/pull/1375) [`d781f08`](https://github.com/t3-oss/create-t3-app/commit/d781f0861ba05aee6b3d460fc53e126868409fb5) Thanks [@Zeko369](https://github.com/Zeko369)! - feat: detect and support usage of Bun as package manager

## 7.18.0

### Minor Changes

- [#1532](https://github.com/t3-oss/create-t3-app/pull/1532) [`941a0fc`](https://github.com/t3-oss/create-t3-app/commit/941a0fc79bcfb24c894525c93aab87c2860b2ad4) Thanks [@spicybackend](https://github.com/spicybackend)! - chore(deps): upgrade Prisma to v5.1.1, bump patch versions of other dependencies

- [#1507](https://github.com/t3-oss/create-t3-app/pull/1507) [`fe5755c`](https://github.com/t3-oss/create-t3-app/commit/fe5755c2d575ce27e8e9c86e6fc79e7903af0390) Thanks [@LevinUncu](https://github.com/LevinUncu)! - If the project is not in a Git repo, the next steps will show git init instead of git commit -m "initial commit".

## 7.17.0

### Minor Changes

- [#1523](https://github.com/t3-oss/create-t3-app/pull/1523) [`c441a9e`](https://github.com/t3-oss/create-t3-app/commit/c441a9ecfaeb61866a76379712b297fc6c2c36b3) Thanks [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)! - reduced stylistic linting

## 7.16.0

### Minor Changes

- [#1476](https://github.com/t3-oss/create-t3-app/pull/1476) [`f3fd50f`](https://github.com/t3-oss/create-t3-app/commit/f3fd50fbd5dfd705507b1a2b53e8e6fd39b2dadb) Thanks [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)! - Upgraded typescript-eslint to v6, with reworked ESLint configurations

- [#1508](https://github.com/t3-oss/create-t3-app/pull/1508) [`e9c862e`](https://github.com/t3-oss/create-t3-app/commit/e9c862e7e114214139f05572d62af45d87d3fc1c) Thanks [@Sn0wye](https://github.com/Sn0wye)! - chore(deps): bump prisma to v5.0.0

## 7.15.0

### Minor Changes

- [#1484](https://github.com/t3-oss/create-t3-app/pull/1484) [`23a9d60`](https://github.com/t3-oss/create-t3-app/commit/23a9d60cd013c40d76ab96d0340425e1e3d8efa2) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - reminder to git commit after creating an application with the CLI

### Patch Changes

- [#1493](https://github.com/t3-oss/create-t3-app/pull/1493) [`a230d9f`](https://github.com/t3-oss/create-t3-app/commit/a230d9f7bb3a78669f2003ae9084c868f06639b7) Thanks [@dcottr](https://github.com/dcottr)! - Remove trailing newlines in generated app that aren't allowed by the generated prettier config

## 7.14.1

### Patch Changes

- [#1479](https://github.com/t3-oss/create-t3-app/pull/1479) [`bb7324c`](https://github.com/t3-oss/create-t3-app/commit/bb7324c9503995949c61c0a5abe736c38f07b815) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - use custom error class for IsTTYError

## 7.14.0

### Minor Changes

- [#1466](https://github.com/t3-oss/create-t3-app/pull/1466) [`e8b68d9`](https://github.com/t3-oss/create-t3-app/commit/e8b68d92af093361bf73eed7eacd7ed6848500c3) Thanks [@brunoeduardodev](https://github.com/brunoeduardodev)! - Ignore trailing slashes when prompting the app name.

## 7.13.2

### Patch Changes

- [#1469](https://github.com/t3-oss/create-t3-app/pull/1469) [`547f504`](https://github.com/t3-oss/create-t3-app/commit/547f504b91c3da9b6419ea7f9f43d03e6c243839) Thanks [@ericshively](https://github.com/ericshively)! - Replace React.FC with basic function syntax

## 7.13.1

### Patch Changes

- [#1436](https://github.com/t3-oss/create-t3-app/pull/1436) [`b0facee`](https://github.com/t3-oss/create-t3-app/commit/b0facee2736e3e0afc909c3d80b38499174fd84c) Thanks [@harrismcc](https://github.com/harrismcc)! - When using NextAuth but not Prisma, the session user's id is now set to `token.sub` instead of `user.id` because `user` is undefined when not using database sessions.

- [#1433](https://github.com/t3-oss/create-t3-app/pull/1433) [`7fbe991`](https://github.com/t3-oss/create-t3-app/commit/7fbe991175f4da02184e0e43a5439515d1ef7439) Thanks [@FinnDore](https://github.com/FinnDore)! - fix: SKIP_ENV_VALIDATION not skipping env validation

## 7.13.0

### Minor Changes

- [#1397](https://github.com/t3-oss/create-t3-app/pull/1397) [`be9a834`](https://github.com/t3-oss/create-t3-app/commit/be9a83483339f8bb799be7a3d69cf67e64882daf) Thanks [@brieyla1](https://github.com/brieyla1)! - feat: Added JsonProtocol as the Default Prisma Engine for Serverless speedups

modified:

- cli/template/extras/prisma/schema/base.prisma

- cli/template/extras/prisma/schema/with-auth.prisma

Description: This pull request proposes the enabling of the JsonProtocol by default. The rationale for this change is based on the performance improvements provided by the JsonProtocol without compromising stability, even though it is still a preview feature. Empirical evidence gathered from large-scale projects, with 100+ Prisma calls, demonstrates the significant time reductions enabled by this optimization, particularly in serverless environments such as Vercel. Another point worth adding is that most projects using nextJS create-t3-app will be deployed on serverless platforms such as vercel, where the real impact is.

## 7.12.3

### Patch Changes

- [#1404](https://github.com/t3-oss/create-t3-app/pull/1404) [`48dd89a`](https://github.com/t3-oss/create-t3-app/commit/48dd89adb33ff9625dba82f6e149cf111f02e488) Thanks [@michalbundyra](https://github.com/michalbundyra)! - update nextjs dependency to ^13.4.1

## 7.12.2

### Patch Changes

- [#1401](https://github.com/t3-oss/create-t3-app/pull/1401) [`b1a35dd`](https://github.com/t3-oss/create-t3-app/commit/b1a35dd66c5c9abab13daebfee93c08b67317272) Thanks [@c-ehrlich](https://github.com/c-ehrlich)! - temporarily pin next to fix vercel build error

## 7.12.1

### Patch Changes

- [#1377](https://github.com/t3-oss/create-t3-app/pull/1377) [`00018ff`](https://github.com/t3-oss/create-t3-app/commit/00018ff0cbe5904f0bb37b8cb0a64814ca5f9410) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - move env validation logic out to a separate package

- [#1385](https://github.com/t3-oss/create-t3-app/pull/1385) [`ac12abb`](https://github.com/t3-oss/create-t3-app/commit/ac12abb92a77d251b2c4bc72caceb422ab4ca706) Thanks [@iAverages](https://github.com/iAverages)! - Fixed issue with creating git repository with git versions below 2.28
Fixed bug with check to use --inital-branch set in git v2.28

## 7.12.0

### Minor Changes

- [#1370](https://github.com/t3-oss/create-t3-app/pull/1370) [`18bc6a7`](https://github.com/t3-oss/create-t3-app/commit/18bc6a73a77b0b48191792ddfd0c296b58cc8221) Thanks [@chungweileong94](https://github.com/chungweileong94)! - Enforce `NEXT_PUBLIC_` env key on client

## 7.11.0

### Minor Changes

- [#1358](https://github.com/t3-oss/create-t3-app/pull/1358) [`1a8a97e`](https://github.com/t3-oss/create-t3-app/commit/1a8a97e42b8991596fc70e50dd6870c987a59075) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - improve boolean coercion of `SKIP_ENV_VALIDATION` environment variable

If defined, "0" and "false" are now considered falsey values, all other values are considered truthy.

### Patch Changes

- [#1352](https://github.com/t3-oss/create-t3-app/pull/1352) [`c48b38f`](https://github.com/t3-oss/create-t3-app/commit/c48b38f522b81097e2f0e883ede053dbac620c12) Thanks [@Tungetyt](https://github.com/Tungetyt)! - refactor: make destructuring consistent

## 7.10.3

### Patch Changes

- [#1330](https://github.com/t3-oss/create-t3-app/pull/1330) [`85997e0`](https://github.com/t3-oss/create-t3-app/commit/85997e0cc26a2ae6fbcd08458734bd6335ba467a) Thanks [@juliusmarminge](https://github.com/juliusmarminge)! - fix: create a new object for the session callback

## 7.10.2

### Patch Changes
Expand Down
11 changes: 10 additions & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<p align="center">
<img src="https://user-images.githubusercontent.com/95541290/184307358-ebf8be63-e434-49d9-8181-90269ad79599.png" width="130" alt="Logo for T3" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/t3-oss/create-t3-app/99286f37324330ecdf75132fae1f246440a88035/www/public/images/t3-light.svg">
<img src="https://raw.githubusercontent.com/t3-oss/create-t3-app/99286f37324330ecdf75132fae1f246440a88035/www/public/images/t3-dark.svg" width="130" alt="Logo for T3">
</picture>
</p>

<h1 align="center">
Expand Down Expand Up @@ -96,6 +99,12 @@ yarn create t3-app
pnpm create t3-app@latest
```

### bun

```bash
bunx create-t3-app@latest
```

For more advanced usage, check out the [CLI docs](https://create.t3.gg/en/installation).

<h2 id="community">Community</h2>
Expand Down
Loading

0 comments on commit 487651e

Please sign in to comment.