-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
npx sv migrate app-state
only migrates some files
#368
Comments
Here is a failing test (note the word test('Updates $app/store #4', () => {
const result = transform_svelte_code(
`<script>
import { page } from '$app/stores';
import Comp from '$lib/page/Comp.svelte'
</script>
<div>{$page.url}</div>
<button onclick={() => {
console.log($page.state);
}}></button>
`
);
assert.equal(
result,
`<script>
import { page } from '$app/state';
import Comp from '$lib/page/Comp.svelte'
</script>
<div>{page.url}</div>
<button onclick={() => {
console.log(page.state);
}}></button>
`
);
}); FYI @dummdidumm |
I think it fails due to this line:
Here we return early and skip the migration if the imported store alias is not prefixed with a For e.g., if a component has the following line, it won't be migrated according to the current logic: const str = "before page after"; or // this is a page |
One thing I noticed when working on #494 was that if I ran the migration on a newly created project it would work great. However, when I changed an I don't know if that helps pinpoint any issues here or just muddies the waters. |
That's because the word |
Run it in the
web
directory of https://github.com/immich-app/immich and it won't migrate anything. Some stuff was already migrated in immich-app/immich#14807, but it only got 9 out of 22 occurrences of$app/stores
The text was updated successfully, but these errors were encountered: