-
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.
feat!: update trpc to v10 and make CLI synchronous (#575)
- Loading branch information
1 parent
62e86c4
commit 75fcb49
Showing
93 changed files
with
2,769 additions
and
2,524 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
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": minor | ||
--- | ||
|
||
enable vercel_url to pass default env-schema |
This file was deleted.
Oops, something went wrong.
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": major | ||
--- | ||
|
||
upgrades trpc to v10 and improves cli performance by making it synchronous |
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners | ||
|
||
|
||
* @juliusmarminge @nexxeln @TheoBr | ||
- @juliusmarminge @nexxeln @TheoBr @c-ehrlich |
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
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
"area: cli": | ||
- any: ["cli/src/**"] | ||
"📌 area: cli": | ||
- any: ["cli/**/*"] | ||
|
||
"area: t3-app": | ||
- any: ["cli/template/**"] | ||
"📌 area: t3-app": | ||
- any: ["cli/template/**/*"] | ||
|
||
"documentation": | ||
- any: ["www/**", "**/*.md"] | ||
"📚 documentation": | ||
- any: ["www/**/*"] | ||
- any: ["**/*.md"] | ||
|
||
"📌 area: ci": | ||
- any: [".github/**/*"] |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# this workflow will run on every pr to make sure the project is following the guidelines | ||
|
||
# after labeler, run other actions with strict permissions | ||
name: CI | ||
|
||
on: | ||
|
@@ -30,11 +31,10 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/action-setup@v2.0.1 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7.9.5 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
|
@@ -63,11 +63,10 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/action-setup@v2.0.1 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7.9.5 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
|
@@ -96,11 +95,10 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/action-setup@v2.0.1 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7.9.5 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
|
@@ -118,51 +116,6 @@ jobs: | |
|
||
- run: pnpm typecheck | ||
|
||
build-t3-app: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
trpc: ["trpc", "nope"] | ||
tailwind: ["tailwind", "nope"] | ||
nextAuth: ["nextAuth", "nope"] | ||
prisma: ["prisma", "nope"] | ||
|
||
name: "Build and Start T3 App ${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7.9.5 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- 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 run --filter=create-t3-app build | ||
# 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 | ||
|
||
build-www: | ||
runs-on: ubuntu-latest | ||
name: Build and Check Astro | ||
|
@@ -174,11 +127,10 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/action-setup@v2.0.1 | ||
- uses: pnpm/action-setup@v2.2.2 | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
version: 7.9.5 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
|
@@ -194,8 +146,7 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install | ||
|
||
# No need to lint & typecheck here (which is otherwise done by the `check` script), done in above jobs | ||
- run: pnpm run --filter=www astro check | ||
- run: pnpm turbo run --filter=www build | ||
- run: pnpm run --filter=www check | ||
- run: pnpm turbo --filter=www build | ||
env: | ||
PUBLIC_GITHUB_TOKEN: ${{ secrets.PUBLIC_GITHUB_TOKEN }} |
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,63 @@ | ||
# this workflow will run on every pr to make sure the project is following the guidelines | ||
|
||
# after labeler, run other actions with strict permissions | ||
name: E2E Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
paths: | ||
- "cli/**/*" | ||
|
||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | ||
|
||
jobs: | ||
build-t3-app: | ||
runs-on: ubuntu-latest | ||
# if: | | ||
# contains(github.event.pull_request.labels.*.name, '📌 area: cli') || | ||
# contains(github.event.pull_request.labels.*.name, '📌 area: t3-app') | ||
strategy: | ||
matrix: | ||
trpc: ["trpc", "nope"] | ||
tailwind: ["tailwind", "nope"] | ||
nextAuth: ["nextAuth", "nope"] | ||
prisma: ["prisma", "nope"] | ||
|
||
name: "Build and Start T3 App ${{ matrix.trpc }}-${{ matrix.tailwind }}-${{ matrix.nextAuth }}-${{ matrix.prisma }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- uses: pnpm/[email protected] | ||
name: Install pnpm | ||
id: pnpm-install | ||
with: | ||
run_install: false | ||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
run: | | ||
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" | ||
- 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 | ||
# 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 |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Write Beta Release comment | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Release - Beta"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
comment: | ||
if: | | ||
github.repository_owner == 't3-oss' && | ||
${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
name: Write comment to the PR | ||
steps: | ||
- name: "Comment on PR" | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: context.payload.workflow_run.id, | ||
}); | ||
for (const artifact of allArtifacts.data.artifacts) { | ||
// Extract the PR number and package version from the artifact name | ||
const match = /^npm-package-create-t3-app@(.*?)-pr-(\d+)/.exec(artifact.name); | ||
if (match) { | ||
require("fs").appendFileSync( | ||
process.env.GITHUB_ENV, | ||
`\nBETA_PACKAGE_VERSION=${match[1]}` + | ||
`\nWORKFLOW_RUN_PR=${match[2]}` + | ||
`\nWORKFLOW_RUN_ID=${context.payload.workflow_run.id}` | ||
); | ||
break; | ||
} | ||
} | ||
- name: "Comment on PR with Link" | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
number: ${{ env.WORKFLOW_RUN_PR }} | ||
message: | | ||
A new create-t3-app prerelease is available for testing. You can install this latest build in your project with: | ||
```sh | ||
npx create-t3-app@${{ env.BETA_PACKAGE_VERSION }} | ||
``` |
Oops, something went wrong.