Skip to content

Commit

Permalink
Merge branch 'canary' into fix/hmr-ping
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Aug 23, 2023
2 parents cb94e56 + 7a6b6c8 commit d0bf1ca
Show file tree
Hide file tree
Showing 86 changed files with 1,291 additions and 241 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ test/production/emit-decorator-metadata/**/*.js
test/e2e/app-dir/rsc-errors/app/swc/use-client/page.js
test-timings.json
packages/next-swc/crates/**
bench/nested-deps/pages/**
bench/nested-deps/components/**
bench/nested-deps/**
bench/nested-deps-app-router/**
packages/next-bundle-analyzer/index.d.ts
examples/with-typescript-graphql/lib/gql/
test/development/basic/hmr/components/parse-error.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ test/node_modules
*.log
pids
*.cpuprofile
*.heapsnapshot

# coverage
.nyc_output
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions bench/app-router-server/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "bench-app-router-server",
"private": true,
"license": "MIT",
"dependencies": {
"webpack-bundle-analyzer": "^4.6.1",
"webpack-stats-plugin": "^1.1.0",
"next": "workspace:*",
"next-minimal-server": "workspace:*"
},
"scripts": {
"build-application": "next build",
"start": "next-minimal-server"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ if (require.main === module) {
type: 'string',
}).argv

fs.mkdirSync(outdir, { recursive: true })
generateFuzzponents(outdir, seed, depth, opts)
}

Expand Down
12 changes: 12 additions & 0 deletions bench/fuzzponent/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "fuzzponent",
"bin": {
"fuzzponent": "./bin/fuzzponent.js"
},
"dependencies": {
"@babel/types": "7.18.0",
"@babel/generator": "7.18.0",
"random-seed": "0.3.0",
"yargs": "16.2.0"
}
}
39 changes: 39 additions & 0 deletions bench/fuzzponent/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Fuzzponent

Originally built by [Dale Bustad](https://github.com/divmain/fuzzponent) while at Vercel.

[Original repository](https://github.com/divmain/fuzzponent).

Generate a nested React component dependency graph, useful for benchmarking.

## Example

To create a dependency tree with `3020` files in the `components` directory:

```
fuzzponent --depth 2 --seed 206 --outdir components
```

You can then import the entrypoint of the dependency tree at `components/index.js`.

## Options

```
Options:
--help Show help [boolean]
--version Show version number [boolean]
-d, --depth component hierarchy depth [number] [required]
-s, --seed prng seed [number] [required]
-o, --outdir the directory where components should be written
[string] [default: "/Users/timneutkens/projects/next.js/bench/nested-deps"]
--minLen the smallest acceptable component name length
[number] [default: 18]
--maxLen the largest acceptable component name length
[number] [default: 24]
--minChild the smallest number of acceptable component children
[number] [default: 4]
--maxChild the largest number of acceptable component children
[number] [default: 80]
--extension extension to use for generated components
[string] [default: "jsx"]
```
14 changes: 0 additions & 14 deletions bench/minimal-server/benchmark-app/package.json

This file was deleted.

2 changes: 2 additions & 0 deletions bench/nested-deps-app-router/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
components/*
CPU*
13 changes: 13 additions & 0 deletions bench/nested-deps-app-router/app/client-components-only/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client'
import React from 'react'

import Comp from '../../components/index.jsx'

export default function Home() {
return (
<>
<h1>Hello!!!!!!!!!!!!</h1>
<Comp />
</>
)
}
14 changes: 14 additions & 0 deletions bench/nested-deps-app-router/app/layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'

export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}

export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use client'
import React from 'react'

import Comp from '../../components/index.jsx'

export default function Home() {
return <Comp />
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import Comp from '../../components/index.jsx'
import ClientComponent from './client-component'

export default function Home() {
return (
<>
<Comp />
<ClientComponent />
</>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react'
import Comp from '../../components/index.jsx'

export default function Home() {
return <Comp />
}
Loading

0 comments on commit d0bf1ca

Please sign in to comment.