Modernize Deno template
This modernizes the Deno template to use all the goodies of the releases over the past several years. It removes the need for a package.json file, any dependency on Node.js + npm and now uses Vite instead of the classic Remix compiler.
It also drops the need for the @remix-run/deno package, allowing it to be deprecated and removed in the future. I am not sure what the deprecation + removal process looks like for a remix package so I have opted to leave that out of this PR.
The new Deno template is currently setup to lint the app/ directory with eslint (which Deno can run) in order to align more closely with how the other templates are setup and provide better linting rules and flexibility which is needed for web development, e.g. eslint-plugin-react-hooks gives the rules-of-hooks lint rule that Deno does not have.
Furthermore, typechecking is now done with typescript's tsc for all files with app/. This allows again for more flexibility by being able to control the typescript version and configuration independent of Deno. In order to provide Deno API access within the app/ directory (without running into typescript errors), a task called typegen can be run to generate the Deno specific declarations.
Closes: https://github.com/denoland/deno/issues/20790
- [x] Docs
- [x] Tests
🦋 Changeset detected
Latest commit: 3907b73b6bca598d1ea2d6b0095f314e07891dc8
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 16 packages
| Name | Type |
|---|---|
| create-remix | Minor |
| @remix-run/node | Minor |
| @remix-run/dev | Minor |
| @remix-run/architect | Minor |
| @remix-run/express | Minor |
| @remix-run/react | Minor |
| @remix-run/serve | Minor |
| @remix-run/testing | Minor |
| remix | Minor |
| @remix-run/cloudflare | Minor |
| @remix-run/cloudflare-pages | Minor |
| @remix-run/cloudflare-workers | Minor |
| @remix-run/css-bundle | Minor |
| @remix-run/deno | Minor |
| @remix-run/eslint-config | Minor |
| @remix-run/server-runtime | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Would you mind writing a short explanation on how to test this out locally? I'm clearly not clueing into something and I can't get this to run.
Would you mind writing a short explanation on how to test this out locally? I'm clearly not clueing into something and I can't get this to run.
sure no worries @zkdiff, here's some instructions.
- pull this branch locally and run
pnpm install+pnpm run build - run
node packages/create-remix/dist/cli.js --template templates/deno --package-manager denoand follow the instructions - create an package.json file with
{}in the created directory (due to the current versions of remix requiring a package.json file for no good reason, fixed in this pr) - run
deno task devto launch the dev server, or rundeno task build && deno task startto launch the prod server
The work here is amazing, bumping this MR up to get more eyes on it
I'm looking forward to this PR being merged. :+1:
Almost started working on this myself 😅 but thought I'd check if there was an open PR already, and here we are! Nice work!
Thank you for opening this pull request, and our apologies we haven't gotten around to it yet!
With the release of React Router v7 we are sun-setting continued development/maintenance on Remix v2. If you have not already upgraded to React Router v7, we recommend you do so. We've tried to make the upgrade process as smooth as possible with our Future Flags. We are now in the process of cleaning up outdated issues and pull requests to improve the overall hygiene of our repositories.
We plan to continue to address 2 types of issues in Remix v2:
- Bugs that pose security concerns
- Bugs that prevent upgrading to React Router v7
If you believe this pull request meets one of those criteria, please respond or create a new pull request so it pops up on our radar (since github notifications may get lost in the noise 😕).
For all other issues/changes, ongoing maintenance will be happening in React Router v7, so:
- If this is a bug fix, please reopen against React Router v7
- If this is a new feature, please open a new Proposal Discussion in React Router, and if it gets enough community support it can be considered for implementation
If you have any questions you can always reach out on Discord. Thanks again for providing feedback and helping us make our framework even better!