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

step 3 for middleware architecture #557

Merged
merged 44 commits into from
Mar 3, 2024
Merged

step 3 for middleware architecture #557

merged 44 commits into from
Mar 3, 2024

Conversation

dai-shi
Copy link
Owner

@dai-shi dai-shi commented Mar 1, 2024

step 3 for #513 following #545 and #550

  • customizable middleware
  • rsc without ssr fixture
  • windows support
  • cookie middleware and example
  • cleanup code 👉 next PR

Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
waku ⬜️ Ignored (Inspect) Visit Preview Mar 3, 2024 8:42am

Copy link
Contributor

@himself65 himself65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crashed inside analyzeEntries

Copy link
Contributor

@himself65 himself65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subject: [PATCH] fix
---
Index: e2e/fixtures/rsc-basic/tsconfig.config.json
===================================================================
diff --git a/e2e/fixtures/rsc-basic/tsconfig.config.json b/e2e/fixtures/rsc-basic/tsconfig.config.json
deleted file mode 100644
--- a/e2e/fixtures/rsc-basic/tsconfig.config.json	(revision 29c465342cef32a272d0cb3228d5505d37e4b49f)
+++ /dev/null	(revision 29c465342cef32a272d0cb3228d5505d37e4b49f)
@@ -1,7 +0,0 @@
-{
-  "extends": "./tsconfig.json",
-  "compilerOptions": {
-    "outDir": "./dist/config"
-  },
-  "include": ["waku.config.ts"]
-}
Index: e2e/fixtures/rsc-basic/tsconfig.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/e2e/fixtures/rsc-basic/tsconfig.json b/e2e/fixtures/rsc-basic/tsconfig.json
--- a/e2e/fixtures/rsc-basic/tsconfig.json	(revision 29c465342cef32a272d0cb3228d5505d37e4b49f)
+++ b/e2e/fixtures/rsc-basic/tsconfig.json	(date 1709342708116)
@@ -13,10 +13,5 @@
     "outDir": "./dist",
     "composite": true
   },
-  "include": ["./src"],
-  "references": [
-    {
-      "path": "./tsconfig.config.json"
-    }
-  ]
+  "include": ["./src", "./waku.config.ts"]
 }

@himself65
Copy link
Contributor

I believe this is a vite related issue, let me check where it comes from

@himself65
Copy link
Contributor

OHHH, related: vitejs/vite#15870

@dai-shi
Copy link
Owner Author

dai-shi commented Mar 3, 2024

#557 (comment) fixes it. pretty interesting.
Thanks a lot @himself65 !

Copy link

codesandbox-ci bot commented Mar 3, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

packages/waku/src/server.ts Outdated Show resolved Hide resolved
* import('waku/middleware/rsc'),
* ]
*/
middleware?: (cmd: 'dev' | 'start') => Promise<{ default: Middleware }>[];
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to do loadMiddleware: (cmd) => Promise<Middleware[]>?

@@ -18,7 +18,7 @@
"react": "18.3.0-canary-6c3b8dbfe-20240226",
"react-dom": "18.3.0-canary-6c3b8dbfe-20240226",
"react-server-dom-webpack": "18.3.0-canary-6c3b8dbfe-20240226",
"waku": "https://pkg.csb.dev/dai-shi/waku/commit/07b708cd/waku"
"waku": "workspace:*"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll go back to csb version later, or maybe "file" one.

@dai-shi dai-shi merged commit f9111ed into main Mar 3, 2024
28 checks passed
@dai-shi dai-shi deleted the middleware-api-3 branch March 3, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants