remix icon indicating copy to clipboard operation
remix copied to clipboard

Modernize Deno template

Open redabacha opened this issue 1 year ago • 3 comments

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

redabacha avatar Sep 02 '24 09:09 redabacha

🦋 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

changeset-bot[bot] avatar Sep 02 '24 09:09 changeset-bot[bot]

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.

zkdiff avatar Sep 25 '24 07:09 zkdiff

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.

  1. pull this branch locally and run pnpm install + pnpm run build
  2. run node packages/create-remix/dist/cli.js --template templates/deno --package-manager deno and follow the instructions
  3. 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)
  4. run deno task dev to launch the dev server, or run deno task build && deno task start to launch the prod server

redabacha avatar Sep 27 '24 14:09 redabacha

The work here is amazing, bumping this MR up to get more eyes on it

aarbi avatar Nov 16 '24 14:11 aarbi

I'm looking forward to this PR being merged. :+1:

t-jindai avatar Dec 04 '24 09:12 t-jindai

Almost started working on this myself 😅 but thought I'd check if there was an open PR already, and here we are! Nice work!

liamdebellada avatar Jan 12 '25 22:01 liamdebellada

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!

github-actions[bot] avatar May 26 '25 14:05 github-actions[bot]