Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: fs-router to use new_createPages & fix staticPaths #1003

Merged
merged 38 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
745d701
fix: render type test issues with new_createPages
tylersayshi Nov 12, 2024
dbf430b
Merge remote-tracking branch 'upstream/main' into refactor-e2e-test-c…
tylersayshi Nov 14, 2024
15931b2
wrong mapping
tylersayshi Nov 14, 2024
0cf6fa6
fix: render type with right mapping
tylersayshi Nov 15, 2024
12c8770
Merge remote-tracking branch 'upstream/main' into refactor-e2e-test-c…
tylersayshi Nov 15, 2024
474adb6
fix: regression to layouts
tylersayshi Nov 15, 2024
48bb258
fix: remove stale comment
tylersayshi Nov 15, 2024
bdfec76
refactor: use new_createPages for fs-router
tylersayshi Nov 15, 2024
4500c06
Merge branch 'dai-shi:main' into refactor-fs-router
tylersayshi Nov 18, 2024
8232409
Merge branch 'dai-shi:main' into refactor-fs-router
tylersayshi Nov 18, 2024
cd89be0
Merge remote-tracking branch 'upstream/main' into refactor-fs-router
tylersayshi Nov 24, 2024
0a950ad
Merge branch 'main' into refactor-fs-router
dai-shi Nov 25, 2024
f7f0887
Merge branch 'main' into refactor-fs-router
dai-shi Nov 25, 2024
4a8723c
try updating rsc managed
tylersayshi Nov 26, 2024
4edcfa9
fix static paths in create pages
tylersayshi Nov 26, 2024
b7c6cbd
Merge branch 'main' into refactor-fs-router
tylersayshi Nov 26, 2024
a20a274
add test
tylersayshi Nov 26, 2024
26e09b8
logs and refactor of new_createPages
tylersayshi Nov 28, 2024
8586f6b
fix OOM!!!!
tylersayshi Nov 29, 2024
4d51add
Merge remote-tracking branch 'upstream/main' into refactor-fs-router
tylersayshi Nov 29, 2024
e187fae
test fixes
tylersayshi Nov 29, 2024
7741c0b
fix complex test
tylersayshi Nov 29, 2024
c9bff5d
revert to writeFile from writeFileSync
tylersayshi Nov 29, 2024
27092f9
remove log
tylersayshi Nov 29, 2024
5ab2859
revert rsc-renderer
tylersayshi Nov 29, 2024
b412f5f
slice emitStaticFiles parrallelization
tylersayshi Nov 29, 2024
8c04a31
Merge remote-tracking branch 'upstream/main' into refactor-fs-router
tylersayshi Dec 3, 2024
e03912c
revert create pages changes
tylersayshi Dec 3, 2024
f6e4e05
fix: staticPath items should have matching patterns
tylersayshi Dec 3, 2024
92d3676
fix: Use page path prop for ssg-performance
tylersayshi Dec 4, 2024
81ad79d
Merge branch 'main' into refactor-fs-router
tylersayshi Dec 4, 2024
edfc3e1
fix: path and slug name
tylersayshi Dec 5, 2024
15af92b
fix: type import and path as prop for layout
tylersayshi Dec 5, 2024
00e317b
fix: error on [path] file use in fs-router
tylersayshi Dec 5, 2024
f8a084e
fix: createLayout type remove hash
tylersayshi Dec 5, 2024
727f65e
Merge remote-tracking branch 'upstream/main' into refactor-fs-router
tylersayshi Dec 6, 2024
0ec5ac6
chore: remove ssg-performance _layout
tylersayshi Dec 6, 2024
f132c4f
Revert "chore: remove ssg-performance _layout"
tylersayshi Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions e2e/fixtures/ssg-performance/src/Path.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { getPath } from './context.js';

export function Path() {
return <h1>{getPath()}</h1>;
export function Path({ path }: { path: string }) {
return <h1>{path}</h1>;
}
17 changes: 0 additions & 17 deletions e2e/fixtures/ssg-performance/src/context.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { PageProps } from 'waku/router';
import { Path } from '../Path.js';

export default async function Test() {
export default async function Test({ path }: PageProps<'/[slug]'>) {
await new Promise((resolve) => setTimeout(resolve, 1000));
return <Path />;
return <Path path={path} />;
tylersayshi marked this conversation as resolved.
Show resolved Hide resolved
}

export async function getConfig() {
Expand Down
9 changes: 2 additions & 7 deletions e2e/fixtures/ssg-performance/src/pages/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import type { PropsWithChildren } from 'react';
import { setPath } from '../context.js';

export default function Layout({
children,
path,
}: PropsWithChildren<{ path: string }>) {
setPath(path);
return children;
export default function Layout({ children }: PropsWithChildren) {
return <div>{children}</div>;
}
tylersayshi marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion e2e/fixtures/ssg-wildcard/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "waku-example",
"name": "ssg-wildcard",
"version": "0.1.0",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/11_fs-router/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { Router } from 'waku/router/client';
import { NewRouter as Router } from 'waku/router/client';

const rootElement = (
<StrictMode>
Expand Down
5 changes: 1 addition & 4 deletions examples/44_cloudflare/waku.cloudflare-dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ export const cloudflareDevServer = (cfOptions: any) => {
Object.assign(globalThis, { WebSocketPair });
});
return async (req: Request, app: Hono<BlankEnv, BlankSchema>) => {
const [proxy, _] = await Promise.all([
await wranglerPromise,
await miniflarePromise,
]);
const [proxy, _] = await Promise.all([wranglerPromise, miniflarePromise]);
Object.assign(req, { cf: proxy.cf });
Object.assign(globalThis, {
caches: proxy.caches,
Expand Down
Loading
Loading