[astro-global] Support Astro v5
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
Can you create and share a small minimal project showing the incompatibility? Also does the dependency warning exist with npm and pnpm?
@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.
@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?
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.
Amazing! Thanks so much for your work 🙏🏻
@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
Am I missing something?
No, I think this will need a fix. The entire code dealing with .d.ts is not needed anymore.
@spacedawwwg Just pushed a patch release.