first commit
Some checks failed
Test examples / Test Examples (20) (push) Has been cancelled
Test examples / Test Examples (22) (push) Has been cancelled
Lock Threads / action (push) Has been cancelled
Trigger Release / start (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Update Font Data / create-pull-request (push) Has been cancelled
build-and-deploy / deploy-target (push) Has been cancelled
build-and-deploy / build (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-musl - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-unknown-linux-gnu - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-pc-windows-msvc - node@16 (push) Has been cancelled
build-and-deploy / stable - aarch64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / stable - x86_64-apple-darwin - node@16 (push) Has been cancelled
build-and-deploy / build-wasm (nodejs) (push) Has been cancelled
build-and-deploy / build-wasm (web) (push) Has been cancelled
build-and-deploy / Deploy preview tarball (push) Has been cancelled
build-and-deploy / Potentially publish release (push) Has been cancelled
build-and-deploy / publish-turbopack-npm-packages (push) Has been cancelled
build-and-deploy / Deploy examples (push) Has been cancelled
build-and-deploy / thank you, build (push) Has been cancelled
build-and-deploy / Upload Turbopack Bytesize metrics to Datadog (push) Has been cancelled
Rspack Next.js development integration tests / Rspack integration tests (push) Has been cancelled
Rspack Next.js production integration tests / Rspack integration tests (push) Has been cancelled
Turbopack Next.js development integration tests / Next.js integration tests (push) Has been cancelled
Turbopack Next.js production integration tests / Next.js integration tests (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack development test manifest (push) Has been cancelled
Update Rspack test manifest / Update and upload Rspack production test manifest (push) Has been cancelled
Upload bundler test manifests to areweturboyet.com / Upload test results (push) Has been cancelled
Update React / create-pull-request (push) Has been cancelled
test-e2e-project-reset-cron / reset-test-project (push) Has been cancelled
Notify about the top 15 issues/PRs/feature requests (most reacted) in the last 90 days / run (push) Has been cancelled

This commit is contained in:
Arian Tron
2026-03-10 19:37:31 +03:30
commit 61f56f997c
27684 changed files with 2784175 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { useEffect, useLayoutEffect, useMemo } from 'react'
import React from 'react'
export default function App() {
useEffect(() => {
console.log('Hello World')
}, [])
useLayoutEffect(() => {
function foo() {}
return () => {}
}, [1, 2, App])
useLayoutEffect(() => {}, [runSideEffect()])
useEffect(() => {}, [1, runSideEffect(), 2])
useEffect(() => {}, getArray())
const a = useMemo(() => {
return 1
}, [])
React.useEffect(() => {
console.log('Hello World')
})
return (
<div>
<h1>Hello World</h1>
</div>
)
}

View File

@@ -0,0 +1,33 @@
import { useEffect, useLayoutEffect, useMemo } from 'react';
import React from 'react';
export default function App() {
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{
console.log('Hello World');
}, []);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useLayoutEffect(()=>{
function foo() {}
return ()=>{};
}, [
1,
2,
App
]);
useLayoutEffect(()=>{}, [
runSideEffect()
]);
useEffect(()=>{}, [
1,
runSideEffect(),
2
]);
useEffect(()=>{}, getArray());
const a = useMemo(()=>{
return 1;
}, []);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && React.useEffect(()=>{
console.log('Hello World');
});
return <div>
<h1>Hello World</h1>
</div>;
}

View File

@@ -0,0 +1,65 @@
// https://github.com/vercel/commerce/blob/18167d22f31fce6c90f98912e514243236200989/components/layout/search/filter/dropdown.tsx#L16
'use client'
import { usePathname, useSearchParams } from 'next/navigation'
import { useEffect, useRef, useState } from 'react'
import { ChevronDownIcon } from '@heroicons/react/24/outline'
import { FilterItem } from './item'
export default function FilterItemDropdown({ list }) {
const pathname = usePathname()
const searchParams = useSearchParams()
const [active, setActive] = useState('')
const [openSelect, setOpenSelect] = useState(false)
const ref = useRef(null)
useEffect(() => {
const handleClickOutside = (event) => {
if (ref.current && !ref.current.contains(event.target)) {
setOpenSelect(false)
}
}
window.addEventListener('click', handleClickOutside)
return () => window.removeEventListener('click', handleClickOutside)
}, [])
useEffect(() => {
list.forEach((listItem) => {
if (
('path' in listItem && pathname === listItem.path) ||
('slug' in listItem && searchParams.get('sort') === listItem.slug)
) {
setActive(listItem.title)
}
})
}, [pathname, list, searchParams])
return (
<div className="relative" ref={ref}>
<div
onClick={() => {
setOpenSelect(!openSelect)
}}
className="flex w-full items-center justify-between rounded border border-black/30 px-4 py-2 text-sm dark:border-white/30"
>
<div>{active}</div>
<ChevronDownIcon className="h-4" />
</div>
{openSelect && (
<div
onClick={() => {
setOpenSelect(false)
}}
className="absolute z-40 w-full rounded-b-md bg-white p-4 shadow-md dark:bg-black"
>
{list.map((item, i) => (
<FilterItem key={i} item={item} />
))}
</div>
)}
</div>
)
}

View File

@@ -0,0 +1,52 @@
// https://github.com/vercel/commerce/blob/18167d22f31fce6c90f98912e514243236200989/components/layout/search/filter/dropdown.tsx#L16
'use client';
import { usePathname, useSearchParams } from 'next/navigation';
import { useEffect, useRef, useState } from 'react';
import { ChevronDownIcon } from '@heroicons/react/24/outline';
import { FilterItem } from './item';
export default function FilterItemDropdown({ list }) {
const pathname = usePathname();
const searchParams = useSearchParams();
const [active, setActive] = [
'',
()=>null
];
const [openSelect, setOpenSelect] = [
false,
()=>null
];
const ref = useRef(null);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{
const handleClickOutside = (event)=>{
if (ref.current && !ref.current.contains(event.target)) {
setOpenSelect(false);
}
};
window.addEventListener('click', handleClickOutside);
return ()=>window.removeEventListener('click', handleClickOutside);
}, []);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{
list.forEach((listItem)=>{
if ('path' in listItem && pathname === listItem.path || 'slug' in listItem && searchParams.get('sort') === listItem.slug) {
setActive(listItem.title);
}
});
}, [
pathname,
list,
searchParams
]);
return <div className="relative" ref={ref}>
<div onClick={()=>{
setOpenSelect(!openSelect);
}} className="flex w-full items-center justify-between rounded border border-black/30 px-4 py-2 text-sm dark:border-white/30">
<div>{active}</div>
<ChevronDownIcon className="h-4"/>
</div>
{openSelect && <div onClick={()=>{
setOpenSelect(false);
}} className="absolute z-40 w-full rounded-b-md bg-white p-4 shadow-md dark:bg-black">
{list.map((item, i)=><FilterItem key={i} item={item}/>)}
</div>}
</div>;
}

View File

@@ -0,0 +1,16 @@
import { useState } from 'react'
export default function App({ x }) {
const [state, setState] = useState(0)
const [state2, setState2] = useState(() => 0)
const [state3, setState3] = useState(x)
const s = useState(0)
const [state4] = useState(0)
const [{ a }, setState5] = useState({ a: 0 })
return (
<div>
<h1>Hello World</h1>
</div>
)
}

View File

@@ -0,0 +1,20 @@
import { useState } from 'react';
export default function App({ x }) {
const [state, setState] = [
0,
()=>null
];
const [state2, setState2] = useState(()=>0);
const [state3, setState3] = useState(x);
const s = useState(0);
const [state4] = useState(0);
const [{ a }, setState5] = [
{
a: 0
},
()=>null
];
return <div>
<h1>Hello World</h1>
</div>;
}

View File

@@ -0,0 +1,28 @@
const useEffect = 1
import { useLayoutEffect, useMemo } from 'react'
const React = 2
export default function App() {
useEffect(() => {
console.log('Hello World')
}, [])
useLayoutEffect(() => {
function foo() {}
return () => {}
}, [1, 2, App])
const a = useMemo(() => {
return 1
}, [])
React.useEffect(() => {
console.log('Hello World')
})
return (
<div>
<h1>Hello World</h1>
</div>
)
}

View File

@@ -0,0 +1,25 @@
const useEffect = 1;
import { useLayoutEffect, useMemo } from 'react';
const React = 2;
export default function App() {
useEffect(()=>{
console.log('Hello World');
}, []);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useLayoutEffect(()=>{
function foo() {}
return ()=>{};
}, [
1,
2,
App
]);
const a = useMemo(()=>{
return 1;
}, []);
React.useEffect(()=>{
console.log('Hello World');
});
return <div>
<h1>Hello World</h1>
</div>;
}

View File

@@ -0,0 +1,15 @@
import { ClientComponent } from './ClientComponent'
export default async function Page() {
return (
<>
<div>
This fixture is to assert where the bootstrap scripts and other required
scripts emit during SSR
</div>
<div>
<ClientComponent />
</div>
</>
)
}

View File

@@ -0,0 +1,12 @@
import { ClientComponent } from './ClientComponent';
export default async function Page() {
return <>
<div>
This fixture is to assert where the bootstrap scripts and other required
scripts emit during SSR
</div>
<div>
<ClientComponent/>
</div>
</>;
}

View File

@@ -0,0 +1,12 @@
import { useState, useEffect, useLayoutEffect } from 'react'
import React from 'react'
const Component = ({ children, fallback }) => {
const [mounted, setMounted] = useState(false)
useEffect(() => setMounted(true), [])
if (!mounted) {
return fallback ?? /* @__PURE__ */ jsx(Fragment, {})
}
return children
}
export { Component }

View File

@@ -0,0 +1,14 @@
import { useState, useEffect, useLayoutEffect } from 'react';
import React from 'react';
const Component = ({ children, fallback })=>{
const [mounted, setMounted] = [
false,
()=>null
];
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>setMounted(true), []);
if (!mounted) {
return fallback ?? /* @__PURE__ */ jsx(Fragment, {});
}
return children;
};
export { Component };

View File

@@ -0,0 +1,31 @@
import { useEffect, useLayoutEffect, useMemo } from 'react'
import * as React from 'react'
export default function App() {
useEffect(() => {
console.log('Hello World')
}, [])
useLayoutEffect(() => {
function foo() {}
return () => {}
}, [1, 2, App])
useLayoutEffect(() => {}, [runSideEffect()])
useEffect(() => {}, [1, runSideEffect(), 2])
useEffect(() => {}, getArray())
const a = useMemo(() => {
return 1
}, [])
React.useEffect(() => {
console.log('Hello World')
})
return (
<div>
<h1>Hello World</h1>
</div>
)
}

View File

@@ -0,0 +1,33 @@
import { useEffect, useLayoutEffect, useMemo } from 'react';
import * as React from 'react';
export default function App() {
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{
console.log('Hello World');
}, []);
process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useLayoutEffect(()=>{
function foo() {}
return ()=>{};
}, [
1,
2,
App
]);
useLayoutEffect(()=>{}, [
runSideEffect()
]);
useEffect(()=>{}, [
1,
runSideEffect(),
2
]);
useEffect(()=>{}, getArray());
const a = useMemo(()=>{
return 1;
}, []);
React.useEffect(()=>{
console.log('Hello World');
});
return <div>
<h1>Hello World</h1>
</div>;
}