Skip to content

Commit

Permalink
Merge branch 'main' into node20
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew authored Nov 16, 2024
2 parents 0654f45 + 2881b1b commit ad52ba0
Show file tree
Hide file tree
Showing 36 changed files with 3,809 additions and 2,841 deletions.
11 changes: 1 addition & 10 deletions .github/turbo-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,7 @@

labeler:
labels:
# owned-by
- label: "owned-by: turborepo"
when:
isAnyFileOwnedByMatch: '@vercel\/turbo-oss'

- label: "created-by: turborepo"
when:
isPRAuthorMatch: "^(anthonyshew|dimitropoulos|tknickman|chris-olszewski|NicholasLYang)$"

# needs: triage when not any of the turbopack or turborepo team
# needs: triage when not any of the turborepo team
- label: "needs: triage"
when:
isNotPRAuthorMatch: "^(padmaia|anthonyshew|dimitropoulos|tknickman|chris-olszewski|NicholasLYang)$"
Expand Down
1 change: 0 additions & 1 deletion .github/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
changelog:
exclude:
labels:
- "owned-by: turbopack"
- "area: ci"
- "release: turborepo"
categories:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/bench-turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
run: pnpm -F @turbo/benchmark ttft "${{ steps.filename.outputs.filename }}"

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: profiles # This name will be the folder each file gets downloaded to
name: profiles-${{ matrix.os.name }} # This name will be the folder each file gets downloaded to
if-no-files-found: error
# cwd is root of the repository, so we need the benchmark/ prefixed path
path: |
Expand All @@ -112,10 +112,11 @@ jobs:
uses: ./.github/actions/setup-node

- name: Download profiles
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiles
path: packages/turbo-benchmark/profiles/
pattern: profiles-*
merge-multiple: true

- name: Display TTFT Data
shell: bash
Expand Down Expand Up @@ -146,10 +147,11 @@ jobs:
uses: ./.github/actions/setup-node

- name: Download profiles
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiles
path: packages/turbo-benchmark/profiles/
pattern: profiles-*
merge-multiple: true

- name: Display TTFT Data
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo-lsp -p turborepo-lsp --target ${{ matrix.settings.target }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turborepo-lsp-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo-lsp/turborepo-lsp*
4 changes: 2 additions & 2 deletions .github/workflows/turborepo-compare-cache-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
turbo run build --filter=docs --filter=web --summarize --skip-infer -vvv
- name: Grab Turborepo artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cache-item-${{ matrix.os }}-${{ inputs.version }}
path: |
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
pnpm dlx create-turbo@${{ inputs.version }} my-turborepo pnpm
- name: Download cache artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cache-item-${{ matrix.cache_os }}-${{ inputs.version }}
path: my-turborepo
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/turborepo-library-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
${{ matrix.settings.rust_env }} pnpm build:release --target=${{ matrix.settings.target }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-library-${{ matrix.settings.target }}
path: packages/turbo-repository/native
Expand All @@ -138,7 +138,7 @@ jobs:
git config --global user.email '[email protected]'
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: native-packages

Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
mv *.tgz tarballs/
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Upload Tarballs
path: tarballs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo -p turbo --target ${{ matrix.settings.target }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo/turbo*
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Download Rust artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: rust-artifacts

Expand All @@ -239,7 +239,7 @@ jobs:

# Upload published artifacts in case they are needed for debugging later
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-combined
path: cli/dist
Expand Down
11 changes: 11 additions & 0 deletions examples/basic/apps/docs/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,19 @@ a {
text-decoration: none;
}

.imgDark {
display: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}

.imgLight {
display: none;
}
.imgDark {
display: unset;
}
}
51 changes: 27 additions & 24 deletions examples/basic/apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
import Image from "next/image";
import Image, { type ImageProps } from "next/image";
import { Button } from "@repo/ui/button";
import styles from "./page.module.css";

type Props = Omit<ImageProps, "src"> & {
srcLight: string;
srcDark: string;
};

const ThemeImage = (props: Props) => {
const { srcLight, srcDark, ...rest } = props;

return (
<>
<Image {...rest} src={srcLight} className="imgLight" />
<Image {...rest} src={srcDark} className="imgDark" />
</>
);
};

export default function Home() {
return (
<div className={styles.page}>
<main className={styles.main}>
<Image
<ThemeImage
className={styles.logo}
src="/next.svg"
alt="Next.js logo"
srcLight="turborepo-dark.svg"
srcDark="turborepo-light.svg"
alt="Turborepo logo"
width={180}
height={38}
priority
/>
<ol>
<li>
Get started by editing <code>app/page.tsx</code>
Get started by editing <code>apps/docs/app/page.tsx</code>
</li>
<li>Save and see your changes instantly.</li>
</ol>

<div className={styles.ctas}>
<a
className={styles.primary}
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
href="https://vercel.com/new/clone?demo-description=Learn+to+implement+a+monorepo+with+a+two+Next.js+sites+that+has+installed+three+local+packages.&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F4K8ZISWAzJ8X1504ca0zmC%2F0b21a1c6246add355e55816278ef54bc%2FBasic.png&demo-title=Monorepo+with+Turborepo&demo-url=https%3A%2F%2Fexamples-basic-web.vercel.sh%2F&from=templates&project-name=Monorepo+with+Turborepo&repository-name=monorepo-turborepo&repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fturborepo%2Ftree%2Fmain%2Fexamples%2Fbasic&root-directory=apps%2Fdocs&skippable-integrations=1&teamSlug=vercel&utm_source=create-turbo"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -38,7 +55,7 @@ export default function Home() {
Deploy now
</a>
<a
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
href="https://turbo.build/repo/docs?utm_source"
target="_blank"
rel="noopener noreferrer"
className={styles.secondary}
Expand All @@ -52,21 +69,7 @@ export default function Home() {
</main>
<footer className={styles.footer}>
<a
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file-text.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
href="https://vercel.com/templates?search=turborepo&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -80,7 +83,7 @@ export default function Home() {
Examples
</a>
<a
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
href="https://turbo.build?utm_source=create-turbo"
target="_blank"
rel="noopener noreferrer"
>
Expand All @@ -91,7 +94,7 @@ export default function Home() {
width={16}
height={16}
/>
Go to nextjs.org
Go to turbo.build
</a>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/apps/docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
17 changes: 9 additions & 8 deletions examples/basic/apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,26 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbo --port 3001",
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"check-types": "tsc --noEmit"
},
"dependencies": {
"@repo/ui": "workspace:*",
"next": "14.2.6",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.0.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.6",
"eslint-config-next": "15.0.3",
"typescript": "5.5.4"
}
}
19 changes: 19 additions & 0 deletions examples/basic/apps/docs/public/turborepo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions examples/basic/apps/docs/public/turborepo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions examples/basic/apps/web/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,19 @@ a {
text-decoration: none;
}

.imgDark {
display: none;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}

.imgLight {
display: none;
}
.imgDark {
display: unset;
}
}
Loading

0 comments on commit ad52ba0

Please sign in to comment.