gratelets icon indicating copy to clipboard operation
gratelets copied to clipboard

[astro-global] Support Astro v5

Open kjkent opened this issue 1 year ago • 2 comments

Astro v5 is currently in beta, and astro-global gives an unmet peer dependency warning if using it. I'm not sure if Astro's updates require any changes to astro-global; at a glance, the necessity for src/env.d.ts is gone, as Astro will now keep its type references in .astro/types.d.ts

kjkent avatar Sep 27 '24 02:09 kjkent

Can you create and share a small minimal project showing the incompatibility? Also does the dependency warning exist with npm and pnpm?

lilnasy avatar Oct 03 '24 14:10 lilnasy

@lilnasy sure! Will do when I'm back on a pc. After some testing, it seems to work just fine on the latest beta, even without the src/env.d.ts file, so it's just the dependency warning. It's there on pnpm but I'll check npm when I'm back.

kjkent avatar Oct 03 '24 16:10 kjkent

@lilnasy I've been using the integration for a while now and there seems to be no actual incompatibility, it works just fine - it's just the dependency version needs bumping to allow astro 5; as it's now out of beta, would you be open to a PR for this?

kjkent avatar Dec 08 '24 13:12 kjkent

Yes, I have the PR open, too! https://github.com/lilnasy/gratelets/pull/106 All that remains is some manual testing and writing the release notes.

lilnasy avatar Dec 08 '24 17:12 lilnasy

Amazing! Thanks so much for your work 🙏🏻

kjkent avatar Dec 11 '24 12:12 kjkent

@lilnasy After upgrading to v2.0.0 while using pnpm, I'm getting an error...

ENOENT: no such file or directory, open '/path/to/project/packages/src/env.d.ts'
Stack trace:
  at Object.readFileSync (node:fs:441:20)
  at config (/path/to/project/node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]_@azure+stora_xebp5qbugsp4wfkkbv5ecy6ld4/node_modules/astro-dynamic-import/integration.ts:37:15)

When I'm running astro sync. Am I missing something?

For now I'm just adding an empty env.d.ts to bypass this

spacedawwwg avatar Jan 07 '25 16:01 spacedawwwg

Am I missing something?

No, I think this will need a fix. The entire code dealing with .d.ts is not needed anymore.

lilnasy avatar Jan 07 '25 16:01 lilnasy

@spacedawwwg Just pushed a patch release.

lilnasy avatar Jan 07 '25 16:01 lilnasy