Skip to content

Commit

Permalink
Merge branch 'canary' into fix-x-forwarded-port
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Mar 18, 2024
2 parents 5ba1bbc + 51b878f commit 89c65d1
Show file tree
Hide file tree
Showing 17 changed files with 67 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A workflow to run next.js integration test with turbopack for each day.
# This runs against main branch with latest Next.js release.
name: Daily Next.js integration test with turbopack
name: Daily Next.js integration test with Turbopack

on:
schedule:
Expand All @@ -26,10 +26,8 @@ jobs:
version: ${{ inputs.version || 'canary' }}

# Upload test results to KV, but only for scheduled runs.
upload_test_results:
name: Upload test results
needs: [next_js_integration]
# if: github.repository_owner == 'vercel' && ${{ github.event_name == 'schedule' }} && always()
if: always()
uses: ./.github/workflows/upload-nextjs-integration-test-results.yml
upload_turbopack_tests_manifest:
name: Upload Turbopack tests manifest to areweturboyet.com
if: ${{ !cancelled() }}
uses: ./.github/workflows/turbopack-upload-tests-manifest.yml
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@
#
# Refer test.yml for how this workflow is being initialized
# - Workflow can specify `inputs.version` to specify which version of next.js to use, otherwise will use latest release version.
name: Turbopack Next.js integration test

on:
workflow_call:
inputs:
# Allow to specify Next.js version to run integration test against.
# If not specified, will use latest release version including canary.
version:
type: string
# The base of the test results to compare against. If not specified, will try to compare with latest main branch's test results.
diff_base:
type: string
default: 'main'
name: Turbopack Next.js integration tests

# Workflow-common env variables
env:
Expand Down Expand Up @@ -180,7 +168,7 @@ jobs:
- 'x64'
- 'metal'

if: always()
if: ${{ !cancelled() }}
steps:
- name: Download test report artifacts
id: download-test-reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Update Turbopack test manifest
on:
schedule:
# Every day at 9AM https://crontab.guru/#0_9_*_*_*
- cron: '0 9 * * *'
- cron: '0 7 * * *'
workflow_dispatch:

jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reusable workflow to upload next.js integration test results to KV for https://areweturboyet.com/
# This workflow assumes the `next-integration-test` workflow has been executed
# and test reports have been uploaded to the `test-results` artifact.
name: Update next.js integration test results
name: Upload Turbopack tests manifest to areweturboyet.com

on:
workflow_call:
Expand Down
24 changes: 14 additions & 10 deletions docs/02-app/02-api-reference/01-components/script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<body>{children}</body>
<Script
src="https://example.com/script.js"
strategy="beforeInteractive"
/>
<body>
{children}
<Script
src="https://example.com/script.js"
strategy="beforeInteractive"
/>
</body>
</html>
)
}
Expand All @@ -112,11 +114,13 @@ import Script from 'next/script'
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
<Script
src="https://example.com/script.js"
strategy="beforeInteractive"
/>
<body>
{children}
<Script
src="https://example.com/script.js"
strategy="beforeInteractive"
/>
</body>
</html>
)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};

export default config;
2 changes: 1 addition & 1 deletion packages/create-next-app/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const installTemplate = async ({
if (!tailwind)
copySource.push(
mode == "ts" ? "tailwind.config.ts" : "!tailwind.config.js",
"!postcss.config.cjs",
"!postcss.config.mjs",
);

await copy(copySource, root, {
Expand Down
9 changes: 6 additions & 3 deletions packages/next/src/lib/find-root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { dirname } from 'path'
import findUp from 'next/dist/compiled/find-up'

export function findRootLockFile(cwd: string) {
return findUp.sync(['pnpm-lock.yaml', 'package-lock.json', 'yarn.lock'], {
cwd,
})
return findUp.sync(
['pnpm-lock.yaml', 'package-lock.json', 'yarn.lock', 'bun.lockb'],
{
cwd,
}
)
}

export function findRootDir(cwd: string) {
Expand Down
8 changes: 4 additions & 4 deletions test/integration/create-next-app/lib/specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const projectSpecification: ProjectSpecification = {
'pages/_app.js',
'pages/api/hello.js',
'pages/index.js',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.js',
],
deps: [],
Expand All @@ -80,7 +80,7 @@ export const projectSpecification: ProjectSpecification = {
'pages/_app.tsx',
'pages/api/hello.ts',
'pages/index.tsx',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.ts',
'tsconfig.json',
],
Expand Down Expand Up @@ -125,7 +125,7 @@ export const projectSpecification: ProjectSpecification = {
'app/layout.js',
'app/page.js',
'jsconfig.json',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.js',
],
},
Expand All @@ -143,7 +143,7 @@ export const projectSpecification: ProjectSpecification = {
'app/layout.tsx',
'app/page.tsx',
'next-env.d.ts',
'postcss.config.cjs',
'postcss.config.mjs',
'tailwind.config.ts',
'tsconfig.json',
],
Expand Down
2 changes: 1 addition & 1 deletion test/integration/create-next-app/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const shouldBeTemplateProject = ({
files: getProjectSetting({ template, mode, setting: 'files', srcDir }),
})

// Tailwind templates share the same files (tailwind.config.js, postcss.config.cjs)
// Tailwind templates share the same files (tailwind.config.js, postcss.config.mjs)
if (template !== 'app-tw' && template !== 'default-tw') {
projectFilesShouldNotExist({
cwd,
Expand Down

0 comments on commit 89c65d1

Please sign in to comment.