-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 runtime packages to conform to the Remix server runtime interface #2359
Conversation
8bff58c
to
cad4543
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks solid so far 👍
3872cc7
to
d61a333
Compare
bad50d4
to
01756cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited about this!
3dabd9c
to
be83e02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. I think the only thing that remains to be done is the examples, which we can do in an other PR so this one doesn't get too big.
Would you agree?
Edit: I totally spaced it on docs changes. I think those should be done in this PR as well.
fab8c58
to
b77aae0
Compare
…-run/server-runtime`
…instead of `@remix-run/server-runtime`
…stead of `@remix-run/server-runtime`
… `createRequestHandler`
bc4e760
to
bd2fadf
Compare
…rface (remix-run#2359) * feat(@remix-run/server-runtime): define interface for remix server runtimes * refactor(@remix-run/server-runtime): organize exports group types that should be re-exported by each remix server runtime * refactor(@remix-run/server-runtime): factories for crypto-dependent interface functions * docs(@remix-run/server-runtime): rewrite readme to explain the "remix server runtime interface" * refactor(@remix-run/node): conform to the remix server runtime interface instead of relying on magic exports * refactor(@remix-run/node): implement crypto-dependent interface functions * feat(@remix-run/cloudflare): create new server runtime package for cloudflare * refactor(@remix-run/cloudflare): implement crypto-dependent interface functions * refactor(remix-deno): conform to the remix server runtime interface * refactor(remix-deno): implement crypto-dependent interface functions * refactor(@remix-run/architect): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/express): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/netlify): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/vercel): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/cloudflare-workers): use `@remix-run/cloudflare` instead of `@remix-run/server-runtime` * refactor(@remix-run/cloudflare-pages): use `@remix-run/cloudflare` instead of `@remix-run/server-runtime` * refactor(server-runtimes,adapters): remove unused `platform` arg from `createRequestHandler`
…rface (#2359) * feat(@remix-run/server-runtime): define interface for remix server runtimes * refactor(@remix-run/server-runtime): organize exports group types that should be re-exported by each remix server runtime * refactor(@remix-run/server-runtime): factories for crypto-dependent interface functions * docs(@remix-run/server-runtime): rewrite readme to explain the "remix server runtime interface" * refactor(@remix-run/node): conform to the remix server runtime interface instead of relying on magic exports * refactor(@remix-run/node): implement crypto-dependent interface functions * feat(@remix-run/cloudflare): create new server runtime package for cloudflare * refactor(@remix-run/cloudflare): implement crypto-dependent interface functions * refactor(remix-deno): conform to the remix server runtime interface * refactor(remix-deno): implement crypto-dependent interface functions * refactor(@remix-run/architect): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/express): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/netlify): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/vercel): use `@remix-run/node` instead of `@remix-run/server-runtime` * refactor(@remix-run/cloudflare-workers): use `@remix-run/cloudflare` instead of `@remix-run/server-runtime` * refactor(@remix-run/cloudflare-pages): use `@remix-run/cloudflare` instead of `@remix-run/server-runtime` * refactor(server-runtimes,adapters): remove unused `platform` arg from `createRequestHandler`
Currently, we use "magic" imports to expose the entire Remix API through the
remix
package.import { anything } from 'remix'
To achieve this, we rely on the
remix setup
command to modifynode_modules/remix
post-installation. This is non-standard for annpm
package and causes problems with tools likepnpm
and Yarn Plug'n'Play.Instead, we'd like to refactor to only use standard JS package conventions via four PRs:
packages/*
(and also includingremix-deno
) to provide a common API for server runtimes (node
,cloudflare
,deno
) and a common API for adapters (express
,netlify
,cloudflare-workers
, etc...). No breaking changes (this PR)remix
"magic" imports with server runtime imports. No breaking changesremix
"magic" imports (e.g. console.warn when people use remix imports). No breaking changes