Commit Graph
6 Commits
Author SHA1 Message Date
Marvin Hagemeister f6e7ab3f75 feat: add fresh lint preset on update (#1459) 2023-07-13 11:08:19 +00:00
Reed von Redwitz ae984924e5 fix: update script broken when using src dir (#1353)
closes https://github.com/denoland/fresh/issues/1338

This is more complex than first expected. It turns out the head of main
no longer has this error, because we started swallowing errors in
https://github.com/denoland/fresh/pull/1327. I'm not sure this is the
right implementation. It seems like we should explicitly check for the
`islands` folder instead of ignoring errors. But the obvious approach
(https://deno.land/std@0.192.0/fs/mod.ts?s=exists) is apparently
forbidden, due to some sort of nonsense with race conditions. Well, not
being able to find `islands` because it doesn't exist at all is
definitely different than it being buried in a source directory, so
we'll need to sort this out at some point.

I suppose that's now some technical debt to deal with, and not related
to this issue. The latest "error" when running `update` and using a
source directory is the following:
```
deno run -A -r file:///Users/reed/code/fresh/update.ts .
The manifest has been generated for 0 routes and 0 islands.
```
i.e. it just doesn't do anything. (To be fair, it does generate a
`fresh.gen.ts` in the incorrect location, so I suppose it does
_something_.)

But of course this isn't what we want. So we'll hunt for a source
directory, as defined by the precense of `main.ts`.

The fix for this is relatively straightforward. The test implements the
user's actions, i.e. init a project, move things, and then try to
update.
2023-06-24 13:28:05 +02:00
Reed von Redwitz 03dbbd4f8e fix: update script supports deno.jsonc files (#1349) 2023-06-23 14:26:22 +02:00
Luca Casonato 1faa80db59 fix: update script to work with non-embedded import maps (#1283)
The script now updates non-embedded import maps to embedded ones.
2023-06-14 14:57:49 +02:00
Asher GomezandLuca Casonato 1b6678951a feat: support embedded import map in deno.json (#1188)
One can now inline the `imports` and `scopes` from the import map directly into deno.json.

For new projects, `import_map.json` is not generated anymore.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-06-03 10:46:40 +02:00
Luca Casonato b19c4bb041 feat: add update.ts script (#706)
This commit adds an update.ts tool that makes it easy to upgrade
existing Fresh projects to the latest version of Fresh. This tool
updates dependency versions in the import map, and includes some code
mods:

1. update projects from classic JSX to automatic JSX
2. update projects from legacy twind integration to twind plugin

Both of these code mods get you about 95% of the way there most of the
time. Users might still need to do some manual work to get their
projects fully updated.
2022-09-07 09:36:23 +00:00